From patchwork Mon Apr 19 14:08:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27078 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp567838iob; Mon, 19 Apr 2021 07:25:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYhncaIKZcNOhDKONE7M7b5mEORaDSIYAGhktZps2qhWPkdPNSNs3dCQCl+B9Yi1NftHuy X-Received: by 2002:a05:6402:1a47:: with SMTP id bf7mr14180631edb.173.1618842357875; Mon, 19 Apr 2021 07:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842357; cv=none; d=google.com; s=arc-20160816; b=J7Q0cY0WpsucepG5egiJ3VcbXubsilhhH1aX/cOT5chWNdZWegCSbQZ8t2zjuEoLT9 bAoVJRircEIqAx2jBz5mZE44DpkHCDvbI2mSGOBqYj0P/oLLaTu04Lk7TXEGc+sqr1SC DVl8ipokm8D7V/RqIpXnBTkbwxUDumbHGi8ocQtOxUNY2dhPDRAmdNyUcPC/ZaxQfs9T LEb0BLEg1WlCfxSy8/LihD2xbHzi9ujg5vCHNMCK9em+ORO0fpsQAluj0i8C4pfM/zJa d7AfR5mPkP+hFEx/Xe9ru+iwU2QxK1F1yvlgr3IgnLR9PEWT5zbR+L+lLEBoPCCJ+fwv HwoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=c9HKIZ/eOaN88XId53HW0CfAqW73B9ycPnEnnUIz0w8=; b=BLj2hhd+aQ5h3qqw4RmV7COXx9wQQUDVQDz5s8AvTDSBUm2XI71iMAhFbkjX2rKJda HEUa+IHx12env14iUuhf2q7NajFaRyzhPa6VY/aZNaPFgT5gIYIkRwCGjsTW8yCDCcN8 Y8W+9FYnk9uVnTzxyEaTYpLk9BtDtkB8xuxVamyO6FR5LVSnsylIDr9U+mZ1KCbdkqgO eDqdAUHf6SnU044HgCFDIKZhUKR/NfdfynnvMxld08BH6Db+kXwk7/20rRDA+aTsaZOa bymuhhLhL0wrDldGf2moVGMJiHPK/tUPAXpSzdksfCD5EZN1ULYzB6FVRNw36Oxi9AMx kXzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=biBeM0h9; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d12si10653764ejj.422.2021.04.19.07.25.57; Mon, 19 Apr 2021 07:25:57 -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=@gmail.com header.s=20161025 header.b=biBeM0h9; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 34B7668A0B7; Mon, 19 Apr 2021 17:16:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2E4BD68A085 for ; Mon, 19 Apr 2021 17:16:40 +0300 (EEST) Received: by mail-qk1-f172.google.com with SMTP id t17so7398714qkg.4 for ; Mon, 19 Apr 2021 07:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=O0vqli+4JcFa4E+lGiQE/xB1aNvil2vr9O2aLzOdTHc=; b=biBeM0h9jMR5KyCmMFpFf6UIFXv2u0Sb5fOcJKmg7Yak9cTmtS0dZt8OuyDtoPvHIt ZmduFu6H5XSi921Z+1HRIQlBLwdRx69jIheTZKx28xrVvg6XPq+nI7PQBJsoPSwYSmn1 4aLwDWZ262l3swN58p4a+e3JheMG2hg6LB13sgzjY2KOWc7uW1Da2DDdz+GkWq1dafRm da/D3fg8Bsx77q66BucNen+yltBBfbo6/LQgqJ1y8FcjJ39v9BkwX4WcAFYXvbiAUqId /F/PEzXuXm9TAYuyj4seg5HWmDf6pMEaQd3+GzxmYG/d1j6sC+Tx9ZATq6OIJX6vZDbw j8wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O0vqli+4JcFa4E+lGiQE/xB1aNvil2vr9O2aLzOdTHc=; b=UxwzTSTJNFW/oqDHawBSeEH+5w1Fcl+zh6he7/+f1I7lnFTdhRzbuwR2rDfva/aO+7 FdzWCtqqt95wFnj0scBJCUWXH2aS7MuvPw4/rnh0ma5Uip9qVv4USpjI7LGUZilZmFhH /MhUvnCUlzWKZSsDhc+LCQ7PAJuTA/RejfPIEy+jU3s9KW14fBxKE6i8O6FXcmomhYdo +R3SF2z1EeA+hWF5Pk/cwbkgliIby+W5FD+xS5RRoDExD7ffZ4AxRIcTOml1LwVfgP8K G/McQfoz7QNwVXyf2+7z0dse2IZWNmoUdyufaSD2jWp3oAvuh84A+KYs5dRsivUK5BKA IZ9w== X-Gm-Message-State: AOAM532DkhFSgxdk7baHMGSYQc61yyl6gQn569fUAhV1D6luYOPgGnHd M2gKPmpZRai16RtT+Dpaw/KvWzaNyRg= X-Received: by 2002:ac8:5704:: with SMTP id 4mr1671777qtw.379.1618841463798; Mon, 19 Apr 2021 07:11:03 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:03 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:08:58 -0300 Message-Id: <20210419141024.8174-2-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/87] avcodec: Remove AVCodec, AVParser and AVBitStreamFilter next 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: GGwxwbXLsTbi From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavcodec/allcodecs.c | 39 --------------------------------- libavcodec/avcodec.h | 40 ---------------------------------- libavcodec/bitstream_filters.c | 6 ----- libavcodec/codec.h | 3 --- libavcodec/parsers.c | 35 ----------------------------- libavcodec/version.h | 3 --- 6 files changed, 126 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 2e9a3581de..3194232500 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -869,45 +869,6 @@ const AVCodec *av_codec_iterate(void **opaque) return c; } -#if FF_API_NEXT -FF_DISABLE_DEPRECATION_WARNINGS -static AVOnce av_codec_next_init = AV_ONCE_INIT; - -static void av_codec_init_next(void) -{ - AVCodec *prev = NULL, *p; - void *i = 0; - while ((p = (AVCodec*)av_codec_iterate(&i))) { - if (prev) - prev->next = p; - prev = p; - } -} - - - -av_cold void avcodec_register(AVCodec *codec) -{ - ff_thread_once(&av_codec_next_init, av_codec_init_next); -} - -AVCodec *av_codec_next(const AVCodec *c) -{ - ff_thread_once(&av_codec_next_init, av_codec_init_next); - - if (c) - return c->next; - else - return (AVCodec*)codec_list[0]; -} - -void avcodec_register_all(void) -{ - ff_thread_once(&av_codec_next_init, av_codec_init_next); -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) { switch(id){ diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8a71c04230..483ab9a358 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2728,16 +2728,6 @@ typedef struct AVSubtitle { int64_t pts; ///< Same as packet pts, in AV_TIME_BASE } AVSubtitle; -#if FF_API_NEXT -/** - * If c is NULL, returns the first registered codec, - * if c is non-NULL, returns the next registered codec after c, - * or NULL if c is the last one. - */ -attribute_deprecated -AVCodec *av_codec_next(const AVCodec *c); -#endif - /** * Return the LIBAVCODEC_VERSION_INT constant. */ @@ -2753,20 +2743,6 @@ const char *avcodec_configuration(void); */ const char *avcodec_license(void); -#if FF_API_NEXT -/** - * @deprecated Calling this function is unnecessary. - */ -attribute_deprecated -void avcodec_register(AVCodec *codec); - -/** - * @deprecated Calling this function is unnecessary. - */ -attribute_deprecated -void avcodec_register_all(void); -#endif - /** * Allocate an AVCodecContext and set its fields to default values. The * resulting struct should be freed with avcodec_free_context(). @@ -3553,10 +3529,6 @@ typedef struct AVCodecParser { const uint8_t *buf, int buf_size); void (*parser_close)(AVCodecParserContext *s); int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); -#if FF_API_NEXT - attribute_deprecated - struct AVCodecParser *next; -#endif } AVCodecParser; /** @@ -3570,13 +3542,6 @@ typedef struct AVCodecParser { */ const AVCodecParser *av_parser_iterate(void **opaque); -#if FF_API_NEXT -attribute_deprecated -AVCodecParser *av_parser_next(const AVCodecParser *c); - -attribute_deprecated -void av_register_codec_parser(AVCodecParser *parser); -#endif AVCodecParserContext *av_parser_init(int codec_id); /** @@ -4065,11 +4030,6 @@ attribute_deprecated const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f); #endif -#if FF_API_NEXT -attribute_deprecated -const AVBitStreamFilter *av_bsf_next(void **opaque); -#endif - /* memory */ /** diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c index 02d33abb18..3de2af92d3 100644 --- a/libavcodec/bitstream_filters.c +++ b/libavcodec/bitstream_filters.c @@ -75,12 +75,6 @@ const AVBitStreamFilter *av_bsf_iterate(void **opaque) return f; } -#if FF_API_NEXT -const AVBitStreamFilter *av_bsf_next(void **opaque) { - return av_bsf_iterate(opaque); -} -#endif - const AVBitStreamFilter *av_bsf_get_by_name(const char *name) { const AVBitStreamFilter *f = NULL; diff --git a/libavcodec/codec.h b/libavcodec/codec.h index de050b2815..c95078491d 100644 --- a/libavcodec/codec.h +++ b/libavcodec/codec.h @@ -243,9 +243,6 @@ typedef struct AVCodec { ***************************************************************** */ int priv_data_size; -#if FF_API_NEXT - struct AVCodec *next; -#endif /** * @name Frame-level threading support functions * @{ diff --git a/libavcodec/parsers.c b/libavcodec/parsers.c index 3d944f5222..40b42e6d1a 100644 --- a/libavcodec/parsers.c +++ b/libavcodec/parsers.c @@ -18,10 +18,7 @@ #include -#include "libavutil/thread.h" - #include "avcodec.h" -#include "version.h" extern AVCodecParser ff_aac_parser; extern AVCodecParser ff_aac_latm_parser; @@ -78,38 +75,6 @@ extern AVCodecParser ff_xma_parser; #include "libavcodec/parser_list.c" -#if FF_API_NEXT -FF_DISABLE_DEPRECATION_WARNINGS -static AVOnce av_parser_next_init = AV_ONCE_INIT; - -static void av_parser_init_next(void) -{ - AVCodecParser *prev = NULL, *p; - int i = 0; - while ((p = (AVCodecParser*)parser_list[i++])) { - if (prev) - prev->next = p; - prev = p; - } -} - -AVCodecParser *av_parser_next(const AVCodecParser *p) -{ - ff_thread_once(&av_parser_next_init, av_parser_init_next); - - if (p) - return p->next; - else - return (AVCodecParser*)parser_list[0]; -} - -void av_register_codec_parser(AVCodecParser *parser) -{ - ff_thread_once(&av_parser_next_init, av_parser_init_next); -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - const AVCodecParser *av_parser_iterate(void **opaque) { uintptr_t i = (uintptr_t)*opaque; diff --git a/libavcodec/version.h b/libavcodec/version.h index 349b4b1269..20641c2d2b 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -120,9 +120,6 @@ #ifndef FF_API_LOCKMGR #define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_NEXT -#define FF_API_NEXT (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_UNSANITIZED_BITRATES #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:08:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27079 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp568775iob; Mon, 19 Apr 2021 07:27:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkA+zTubyDKEIjW6K0hT4Q5jTgr5N6AH7e3lY4GVnsk+i0uV/3j3wf+BddRo+PmWbyNqjC X-Received: by 2002:a05:6402:441:: with SMTP id p1mr26039578edw.298.1618842434344; Mon, 19 Apr 2021 07:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842434; cv=none; d=google.com; s=arc-20160816; b=tRxSNMI13mTv4xjCzide7MaDzQ9ysuQb99a4BzdDhz8/4HmJrPyWJH2rGXT7/vrSoX eXfL3AzqRvZypXmj0ePRGb0TsxLTGH6jNyW85znOo4Dybd+P3GXoV1UXze1+zu6wrx3n 0VcQrLW2aLdWxowmSRou+mViIMdzWayjaBVY8OhLoR3IoDblipdxTmVo92JHaChYHGxm PkGGg4hogZeqcWhL6xlO0Wjm6Usvp0dACa7u4w/HhR2qLcCrK+9QvEGfkUp5TwBguJMi BG3vRX0WrKlnNb4mwa1AFk53R2OhzY0X2U4Sx6FtaagFdqkZFCXsE8A9r71JoVk3bhAz NwAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=bg+mX0LIML4em2/O6FO9iikYF2N9/AVCSzeI5JEZxds=; b=pt5ZWVqV1xDwYRtV/bXUCjZJtdFZwKyX4OdVtujQzvhPl6C2mKWv6MG+iJGMCtiY9C d+Qf0uks4wgGB0Me7alYmt4JPMRPuYf6XXqQzk8InXo7ajk/Qshw42t3/6/xEeU1KioS 8LRC7DxFTqJQrFQcKUqw/dZb++FzV659RnSixRkAre2Qydh/NuxUUHaKcLT3nYAvNySG mc8SCKJ3XwQDtTyp32U3zZwn9lN8Dil3fdA2r8kdJQFGP68/oUDqdBdeh6WDV6iPs52p A857bEDWibn6NK5tfYbdZZTJPk6nbmnHZqiQBwq3fTGDiVZJyOCwPr/kMF3AdlPnoUZ0 RQAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=RR4d7phM; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a1si8990862edr.67.2021.04.19.07.27.13; Mon, 19 Apr 2021 07:27: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=@gmail.com header.s=20161025 header.b=RR4d7phM; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 93892680BD2; Mon, 19 Apr 2021 17:18:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C6D9668A202 for ; Mon, 19 Apr 2021 17:18:03 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id y136so3782006qkb.1 for ; Mon, 19 Apr 2021 07:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=JBh9NkHM92EUCYvqpap9WuB+51u4132JuWLSgOgw8mQ=; b=RR4d7phMqTldGjxLGO55XynhoCGLeLfVQXiPFMDuf1yY9L2U06ksuBKzPXYGeZypey 7tGDdLnqujNrDxEFoUWKXIJIqdwfz17vzA0wr7DegjXJfgI/A41gfNqfNeVn+68korxW asDPBpvJDAq1yhG7ztrzXXFkkSuHIyd9LW3rbjwn9eHEO6pFWsmwG0UBkIeEBRlMX6rr DiKgHGqhgeX+xZ9lJbLkFZzZvThcmWaFg7nsKKncIM6SzKN0pYWZ9mv3MsVtnEauUUOz w6BCFgyEeLs8j2SglYorc8OHzzSPIsEw9U7X59qCHpxYM2SImDQCoKW7z1U2PK0/4jyS wz6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JBh9NkHM92EUCYvqpap9WuB+51u4132JuWLSgOgw8mQ=; b=JxYpSTeQ6OQdKvqiaZf+CgWSyFuESFdyuUcu+xFnawg9+tob+DdoZcqP/OFT0/LJJ8 rPocxx+tD0/tEdH6iFeIe89A1I81+YZjHyrBoqGz4pxhAI88eGomMjxTr7VH3X9XEdnj cvk+mdPtqZ+VOrHa1Jmm+iFbc8Q6WFbFgtP8/OebrYpYejnXU4NpwF8Ay6cKs1f5vITv pW0yoA4VHtZJ/y58B5UfVtUh9PDJGQfhL8LnR5ZaJmSzqbO4VHclb1+lERwH2uH5r1ds 02Fws6uEVsTmLat/+j5MIQDsrUsgnPo75CA2otLRJGhZinVacre9yWetFLZ4klJbsuk+ coRQ== X-Gm-Message-State: AOAM532fBNrEmKrVGh7dlj4NO29mQnc8Zp0oFxCN5basAZxtEk7U+wr1 jyZMYl2b9hM4LRe+uZr1ht+1d0jSWqw= X-Received: by 2002:a37:dce:: with SMTP id 197mr12049569qkn.180.1618841464982; Mon, 19 Apr 2021 07:11:04 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:04 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:08:59 -0300 Message-Id: <20210419141024.8174-3-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 02/87] avformat: Remove next API for AV(In|Out)putFormat 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: gn0sZK4Z8D0D From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavformat/allformats.c | 98 ---------------------------------------- libavformat/avformat.h | 43 ------------------ libavformat/version.h | 3 -- 3 files changed, 144 deletions(-) diff --git a/libavformat/allformats.c b/libavformat/allformats.c index fa093c7ac2..f450c1709b 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -22,10 +22,6 @@ #include "libavutil/thread.h" #include "libavformat/internal.h" #include "avformat.h" -#include "rtp.h" -#include "rdt.h" -#include "url.h" -#include "version.h" /* (de)muxers */ extern AVOutputFormat ff_a64_muxer; @@ -573,104 +569,10 @@ const AVInputFormat *av_demuxer_iterate(void **opaque) static AVMutex avpriv_register_devices_mutex = AV_MUTEX_INITIALIZER; -#if FF_API_NEXT -FF_DISABLE_DEPRECATION_WARNINGS -static AVOnce av_format_next_init = AV_ONCE_INIT; - -static void av_format_init_next(void) -{ - AVOutputFormat *prevout = NULL, *out; - AVInputFormat *previn = NULL, *in; - - ff_mutex_lock(&avpriv_register_devices_mutex); - - for (int i = 0; (out = (AVOutputFormat*)muxer_list[i]); i++) { - if (prevout) - prevout->next = out; - prevout = out; - } - - if (outdev_list) { - for (int i = 0; (out = (AVOutputFormat*)outdev_list[i]); i++) { - if (prevout) - prevout->next = out; - prevout = out; - } - } - - for (int i = 0; (in = (AVInputFormat*)demuxer_list[i]); i++) { - if (previn) - previn->next = in; - previn = in; - } - - if (indev_list) { - for (int i = 0; (in = (AVInputFormat*)indev_list[i]); i++) { - if (previn) - previn->next = in; - previn = in; - } - } - - ff_mutex_unlock(&avpriv_register_devices_mutex); -} - -AVInputFormat *av_iformat_next(const AVInputFormat *f) -{ - ff_thread_once(&av_format_next_init, av_format_init_next); - - if (f) -#if FF_API_AVIOFORMAT - return f->next; -#else - return (AVInputFormat *) f->next; -#endif - else { - void *opaque = NULL; - return (AVInputFormat *)av_demuxer_iterate(&opaque); - } -} - -AVOutputFormat *av_oformat_next(const AVOutputFormat *f) -{ - ff_thread_once(&av_format_next_init, av_format_init_next); - - if (f) -#if FF_API_AVIOFORMAT - return f->next; -#else - return (AVOutputFormat *) f->next; -#endif - else { - void *opaque = NULL; - return (AVOutputFormat *)av_muxer_iterate(&opaque); - } -} - -void av_register_all(void) -{ - ff_thread_once(&av_format_next_init, av_format_init_next); -} - -void av_register_input_format(AVInputFormat *format) -{ - ff_thread_once(&av_format_next_init, av_format_init_next); -} - -void av_register_output_format(AVOutputFormat *format) -{ - ff_thread_once(&av_format_next_init, av_format_init_next); -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - void avpriv_register_devices(const AVOutputFormat * const o[], const AVInputFormat * const i[]) { ff_mutex_lock(&avpriv_register_devices_mutex); outdev_list = o; indev_list = i; ff_mutex_unlock(&avpriv_register_devices_mutex); -#if FF_API_NEXT - av_format_init_next(); -#endif } diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8600ee1bf7..6c97aff423 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -533,9 +533,6 @@ typedef struct AVOutputFormat { #define ff_const59 #else #define ff_const59 const -#endif -#if FF_API_NEXT - ff_const59 struct AVOutputFormat *next; #endif /** * size of private data so that it can be allocated in the wrapper @@ -683,10 +680,6 @@ typedef struct AVInputFormat { * New public fields should be added right above. ***************************************************************** */ -#if FF_API_NEXT - ff_const59 struct AVInputFormat *next; -#endif - /** * Raw demuxers store their codec ID here. */ @@ -1941,24 +1934,6 @@ const char *avformat_configuration(void); */ const char *avformat_license(void); -#if FF_API_NEXT -/** - * Initialize libavformat and register all the muxers, demuxers and - * protocols. If you do not call this function, then you can select - * exactly which formats you want to support. - * - * @see av_register_input_format() - * @see av_register_output_format() - */ -attribute_deprecated -void av_register_all(void); - -attribute_deprecated -void av_register_input_format(AVInputFormat *format); -attribute_deprecated -void av_register_output_format(AVOutputFormat *format); -#endif - /** * Do global initialization of network libraries. This is optional, * and not recommended anymore. @@ -1981,24 +1956,6 @@ int avformat_network_init(void); */ int avformat_network_deinit(void); -#if FF_API_NEXT -/** - * If f is NULL, returns the first registered input format, - * if f is non-NULL, returns the next registered input format after f - * or NULL if f is the last one. - */ -attribute_deprecated -AVInputFormat *av_iformat_next(const AVInputFormat *f); - -/** - * If f is NULL, returns the first registered output format, - * if f is non-NULL, returns the next registered output format after f - * or NULL if f is the last one. - */ -attribute_deprecated -AVOutputFormat *av_oformat_next(const AVOutputFormat *f); -#endif - /** * Iterate over all registered muxers. * diff --git a/libavformat/version.h b/libavformat/version.h index 66068d4d56..d82adba668 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -91,9 +91,6 @@ #ifndef FF_API_OLD_RTSP_OPTIONS #define FF_API_OLD_RTSP_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_NEXT -#define FF_API_NEXT (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_DASH_MIN_SEG_DURATION #define FF_API_DASH_MIN_SEG_DURATION (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27071 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp568373iob; Mon, 19 Apr 2021 07:26:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynBjd+eDsOGwHchiqPLhqvu2rT3KnncTxykCRoPdi+2jS4FIerUWzR05ay7DVekDdx+6Sb X-Received: by 2002:a05:6402:1393:: with SMTP id b19mr25707745edv.333.1618842397741; Mon, 19 Apr 2021 07:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842397; cv=none; d=google.com; s=arc-20160816; b=cNT6JVJWODVMIlgIEpALD/u5yZFDkeVcnqpfmEvHZOI5803tROnObjAYltDWCsrnti BdQmfSEIT6AdIMHi0ukp+Zrf+WjmBsNMBgpTMjYSXE7duLkJpk5o/WUYljyk1tr4f39M M4W/Cb+2B267Papf3BBrfQlfjfoHVgGaQynohSA4SSlVZoW4ak5Qrr+gcMe4D4NAoVgP Ld/iLPMx3pm4I+/aL2kC24jnEIhzg0hovn80TcUnvCuYsuA/m2NDZ21oCPF7+sMx1Uj9 4COUhD4xrBCSfLx3uLdKDE7WfmVJQZWB95OmXmzVlM0hfdd5LTh16ZC71ENOm+mkrCDM JBFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=RvsWH3ZFnltENLvTBUDiSqbB3cKyk+sM6P+W1Ot1t9M=; b=B4Fxmq0CFEViDlWhz9t1EWSzsNT0Pt4ii9q+c5PFaMsii/jAf39xf0EcesDcoHO5cN XaWpg5K3k/sVh4Mm0FP6NhDXXJT2ZJh0XsJgKjyHhFxOE5doax8T8Af3D6AnDXA/Sm+1 lZXriI21RCWLjgs5cijh7pr/rF9yN3Q1PsQeFCudsbHaZ+MTFnLXlGd3rk/YcmMUoVdo AB1yFVIS8jnUS+Ylc8gD/O3B4iVn3wTxC86oJ3tEFR3p2NuJu0wlobP95URjq14g41Ib 2z4bmmzOtvbcyKQRWXCryBSvHYb0lcWnBSYrnTVLGSxt6XgA2GWIijaOF9K1RvpQdb/V m78A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=GA22oAoX; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y11si12351213edd.539.2021.04.19.07.26.37; Mon, 19 Apr 2021 07:26: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=@gmail.com header.s=20161025 header.b=GA22oAoX; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 417D968A148; Mon, 19 Apr 2021 17:17:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AFE3F68A12B for ; Mon, 19 Apr 2021 17:17:04 +0300 (EEST) Received: by mail-qt1-f180.google.com with SMTP id 18so12731666qtz.6 for ; Mon, 19 Apr 2021 07:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=QlPqmVoo+gP5vxIbjosIUY8yTiO0ZnmWrBbDjsbOOV8=; b=GA22oAoXsBbgomsxNlnmfAAygrR+C9L4oWq2STb1ohAJq02mubgCccKiyAWn8WriqX nmwNfrqtMaaDI52l+5YqFK+QV+LFxf+Kw+tOAiW2T9Ren2/tQwvkFTB63bM235YuJXrv Mzqe5ul3ldyoKXUKM/nY3+Gq4ZWJqO2Q0EHh7TEqwXTxKQFx9jcQqyEOGQG2B0RjMe+h qy0BQhsHeXbLvc3MDUKyd39sFsyDmF25TrKQX2CKHxgyXdKw5M5Xfy94m5/rFn48OPgi YOPJWsJ3zKsPL/xzv4vQSTze1yWHA6eBjRO3cQi44Pbnveb7iKE+gGltQLV5elQ6CRPO xTzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QlPqmVoo+gP5vxIbjosIUY8yTiO0ZnmWrBbDjsbOOV8=; b=bmIkLQFJbgsJfGv4qiXr0IhaqHDJJnJpOJoXIjvNLPShIK26Gm4/Bpk1uNzVTMk3on IHdWOOlF6nKr0qhBWGk4DlnIdepeCS8qaQ5hWmI3UYcjctfSNk9rwd2HRQcntAMy/GMH riPp9b/kdEMqIcdKdwVz21uvtbWK+WMwkA5RjHYwwv26Sb8s70fcU05SbQLTSOS+Fv+w 6aUD326AktM9a8rI3vSrbKoLttK621Cxwge3ckp5o1Jdl+CCmd/w0oy2LzDgNjShFx6I i6UPp9+d3HAJSy5SonxQRvjjnnq5kts5spHXJgz1N6KpVTN5KGxlPBB6bgEpo6yuXFjO 820Q== X-Gm-Message-State: AOAM5315+xz0luDZRozBATuR41t0m5/uKEpDA0W+tu5DN8AiycV9/7S8 4c+LBK9HtT/WmbnEzNhQSR4HMUVtkgg= X-Received: by 2002:a37:a98e:: with SMTP id s136mr3478209qke.16.1618841466461; Mon, 19 Apr 2021 07:11:06 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:05 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:00 -0300 Message-Id: <20210419141024.8174-4-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/87] avcodec, avformat: Remove old BSF 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yCE44GTcVd4L From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 1 - libavcodec/avcodec.h | 52 ---------- libavcodec/bitstream_filter.c | 185 ---------------------------------- libavcodec/version.h | 3 - libavformat/avformat.h | 17 ---- libavformat/utils.c | 58 ----------- 6 files changed, 316 deletions(-) delete mode 100644 libavcodec/bitstream_filter.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 4a597f727a..5b41450b86 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -34,7 +34,6 @@ OBJS = ac3_parser.o \ avpacket.o \ avpicture.o \ bitstream.o \ - bitstream_filter.o \ bitstream_filters.o \ bsf.o \ codec_desc.o \ diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 483ab9a358..5e6967df0d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3978,58 +3978,6 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes); */ int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes); -#if FF_API_OLD_BSF -typedef struct AVBitStreamFilterContext { - void *priv_data; - const struct AVBitStreamFilter *filter; - AVCodecParserContext *parser; - struct AVBitStreamFilterContext *next; - /** - * Internal default arguments, used if NULL is passed to av_bitstream_filter_filter(). - * Not for access by library users. - */ - char *args; -} AVBitStreamFilterContext; - -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use the new bitstream filtering API (using AVBSFContext). - */ -attribute_deprecated -void av_register_bitstream_filter(AVBitStreamFilter *bsf); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_get_by_name(), av_bsf_alloc(), and av_bsf_init() - * from the new bitstream filtering API (using AVBSFContext). - */ -attribute_deprecated -AVBitStreamFilterContext *av_bitstream_filter_init(const char *name); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_send_packet() and av_bsf_receive_packet() from the - * new bitstream filtering API (using AVBSFContext). - */ -attribute_deprecated -int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, - AVCodecContext *avctx, const char *args, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, int keyframe); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_free() from the new bitstream filtering API (using - * AVBSFContext). - */ -attribute_deprecated -void av_bitstream_filter_close(AVBitStreamFilterContext *bsf); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_iterate() from the new bitstream filtering API (using - * AVBSFContext). - */ -attribute_deprecated -const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f); -#endif - /* memory */ /** diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c deleted file mode 100644 index ca11ed371e..0000000000 --- a/libavcodec/bitstream_filter.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - * copyright (c) 2006 Michael Niedermayer - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "avcodec.h" -#include "libavutil/internal.h" -#include "libavutil/mem.h" -#include "libavutil/opt.h" - -#if FF_API_OLD_BSF -FF_DISABLE_DEPRECATION_WARNINGS - -const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f) -{ - const AVBitStreamFilter *filter = NULL; - void *opaque = NULL; - - while (filter != f) - filter = av_bsf_iterate(&opaque); - - return av_bsf_iterate(&opaque); -} - -void av_register_bitstream_filter(AVBitStreamFilter *bsf) -{ -} - -typedef struct BSFCompatContext { - AVBSFContext *ctx; - int extradata_updated; -} BSFCompatContext; - -AVBitStreamFilterContext *av_bitstream_filter_init(const char *name) -{ - AVBitStreamFilterContext *ctx = NULL; - BSFCompatContext *priv = NULL; - const AVBitStreamFilter *bsf; - - bsf = av_bsf_get_by_name(name); - if (!bsf) - return NULL; - - ctx = av_mallocz(sizeof(*ctx)); - if (!ctx) - return NULL; - - priv = av_mallocz(sizeof(*priv)); - if (!priv) - goto fail; - - - ctx->filter = bsf; - ctx->priv_data = priv; - - return ctx; - -fail: - if (priv) - av_bsf_free(&priv->ctx); - av_freep(&priv); - av_freep(&ctx); - return NULL; -} - -void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc) -{ - BSFCompatContext *priv; - - if (!bsfc) - return; - - priv = bsfc->priv_data; - - av_bsf_free(&priv->ctx); - av_freep(&bsfc->priv_data); - av_free(bsfc); -} - -int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, - AVCodecContext *avctx, const char *args, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, int keyframe) -{ - BSFCompatContext *priv = bsfc->priv_data; - AVPacket pkt = { 0 }; - int ret; - - if (!priv->ctx) { - ret = av_bsf_alloc(bsfc->filter, &priv->ctx); - if (ret < 0) - return ret; - - ret = avcodec_parameters_from_context(priv->ctx->par_in, avctx); - if (ret < 0) - return ret; - - priv->ctx->time_base_in = avctx->time_base; - - if (bsfc->args && bsfc->filter->priv_class) { - const AVOption *opt = av_opt_next(priv->ctx->priv_data, NULL); - const char * shorthand[2] = {NULL}; - - if (opt) - shorthand[0] = opt->name; - - ret = av_opt_set_from_string(priv->ctx->priv_data, bsfc->args, shorthand, "=", ":"); - if (ret < 0) - return ret; - } - - ret = av_bsf_init(priv->ctx); - if (ret < 0) - return ret; - } - - pkt.data = (uint8_t *)buf; - pkt.size = buf_size; - - ret = av_bsf_send_packet(priv->ctx, &pkt); - if (ret < 0) - return ret; - - *poutbuf = NULL; - *poutbuf_size = 0; - - ret = av_bsf_receive_packet(priv->ctx, &pkt); - if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) - return 0; - else if (ret < 0) - return ret; - - *poutbuf = av_malloc(pkt.size + AV_INPUT_BUFFER_PADDING_SIZE); - if (!*poutbuf) { - av_packet_unref(&pkt); - return AVERROR(ENOMEM); - } - - *poutbuf_size = pkt.size; - memcpy(*poutbuf, pkt.data, pkt.size); - - av_packet_unref(&pkt); - - /* drain all the remaining packets we cannot return */ - while (ret >= 0) { - ret = av_bsf_receive_packet(priv->ctx, &pkt); - av_packet_unref(&pkt); - } - - if (!priv->extradata_updated) { - /* update extradata in avctx from the output codec parameters */ - if (priv->ctx->par_out->extradata_size && (!args || !strstr(args, "private_spspps_buf"))) { - av_freep(&avctx->extradata); - avctx->extradata_size = 0; - avctx->extradata = av_mallocz(priv->ctx->par_out->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE); - if (!avctx->extradata) - return AVERROR(ENOMEM); - memcpy(avctx->extradata, priv->ctx->par_out->extradata, priv->ctx->par_out->extradata_size); - avctx->extradata_size = priv->ctx->par_out->extradata_size; - } - - priv->extradata_updated = 1; - } - - return 1; -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif diff --git a/libavcodec/version.h b/libavcodec/version.h index 20641c2d2b..1068716eb9 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -87,9 +87,6 @@ #ifndef FF_API_ASS_TIMING #define FF_API_ASS_TIMING (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_OLD_BSF -#define FF_API_OLD_BSF (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_COPY_CONTEXT #define FF_API_COPY_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) #endif diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6c97aff423..17b54c0997 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2953,23 +2953,6 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, int avformat_queue_attached_pictures(AVFormatContext *s); -#if FF_API_OLD_BSF -/** - * Apply a list of bitstream filters to a packet. - * - * @param codec AVCodecContext, usually from an AVStream - * @param pkt the packet to apply filters to. If, on success, the returned - * packet has size == 0 and side_data_elems == 0, it indicates that - * the packet should be dropped - * @param bsfc a NULL-terminated list of filters to apply - * @return >=0 on success; - * AVERROR code on failure - */ -attribute_deprecated -int av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt, - AVBitStreamFilterContext *bsfc); -#endif - enum AVTimebaseSource { AVFMT_TBCF_AUTO = -1, AVFMT_TBCF_DECODER, diff --git a/libavformat/utils.c b/libavformat/utils.c index d4ec3d0190..02768aca1f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -5669,64 +5669,6 @@ int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *a return 1; } -#if FF_API_OLD_BSF -FF_DISABLE_DEPRECATION_WARNINGS -int av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt, - AVBitStreamFilterContext *bsfc) -{ - int ret = 0; - while (bsfc) { - AVPacket new_pkt = *pkt; - int a = av_bitstream_filter_filter(bsfc, codec, NULL, - &new_pkt.data, &new_pkt.size, - pkt->data, pkt->size, - pkt->flags & AV_PKT_FLAG_KEY); - if (a == 0 && new_pkt.size == 0 && new_pkt.side_data_elems == 0) { - av_packet_unref(pkt); - memset(pkt, 0, sizeof(*pkt)); - return 0; - } - if(a == 0 && new_pkt.data != pkt->data) { - uint8_t *t = av_malloc(new_pkt.size + AV_INPUT_BUFFER_PADDING_SIZE); //the new should be a subset of the old so cannot overflow - if (t) { - memcpy(t, new_pkt.data, new_pkt.size); - memset(t + new_pkt.size, 0, AV_INPUT_BUFFER_PADDING_SIZE); - new_pkt.data = t; - new_pkt.buf = NULL; - a = 1; - } else { - a = AVERROR(ENOMEM); - } - } - if (a > 0) { - new_pkt.buf = av_buffer_create(new_pkt.data, new_pkt.size, - av_buffer_default_free, NULL, 0); - if (new_pkt.buf) { - pkt->side_data = NULL; - pkt->side_data_elems = 0; - av_packet_unref(pkt); - } else { - av_freep(&new_pkt.data); - a = AVERROR(ENOMEM); - } - } - if (a < 0) { - av_log(codec, AV_LOG_ERROR, - "Failed to open bitstream filter %s for stream %d with codec %s", - bsfc->filter->name, pkt->stream_index, - codec->codec ? codec->codec->name : "copy"); - ret = a; - break; - } - *pkt = new_pkt; - - bsfc = bsfc->next; - } - return ret; -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - int ff_format_output_open(AVFormatContext *s, const char *url, AVDictionary **options) { if (!s->oformat) From patchwork Mon Apr 19 14:09:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27077 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp567994iob; Mon, 19 Apr 2021 07:26:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6+6YMzHV6uRd+yA6lPQtxydGPvonWSgGaCDfbM+UEBIhltw+qlq9uoWeFQGtYGWH4X2rB X-Received: by 2002:a17:906:9bd3:: with SMTP id de19mr21597532ejc.329.1618842370700; Mon, 19 Apr 2021 07:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842370; cv=none; d=google.com; s=arc-20160816; b=gC0RvyXSYyH1CECRWF7/TreC8eIxcnkWv3vs4ZP3mzX1yDjobbp5p92Hq4qXjkruDq ldBGdDCLnHNK69RGBcddq7CQhGDACirecQHZ967UW1DKgRHrnsLdu58iIV2Imv/u+q+/ 4OZNbC4AddcJu7ek+eOCcVXgX5KULm6ZkI+u85Vz3gFACl8aFh8dBAP5qmam1cuNESSn 7oIls+OTyAV7SpBO0NEfYJ3ImHZOBpu3CqovamazcO65IKvpdsJFZY4sSKvEdlNkXJbZ EB85q94UIcwTTbu3kW4X+lqRpydbWayY0H55ACRQ+NB7yhnhmTmQZV+rHhwTzZT4w7n7 nUgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=gddU9uoAd/WEL0t/eemZtLjgdVqgzrwsM6a1Lx2VmBw=; b=yTIkP4U/9e+9EVIjqpyGWOfVwK+lzlVWRPsd4JyZazFeAFItcnqrRXNLepSy0NXn7H S/0VgOwM903QjMGoAdRfVOyEz54MoPFVfpoclFJuv54mNANJzpqPNqN2fMuZuSqL8aXC 4zaHJ6HC7EYe7caV6eqSj/sN3rSgktKgvBbui/0XqTI0dOuuRIXJuahLaU+X1U1g/sTu zb9ZYQiWNyuMf7P3X8BMSkDvCkSZJgY1oabFe40z3J3YFzhBH9wAJHhsKYYTMCWJnEAj gIs7NNtUjFe4Mend5ZxsC87m96uDtCPv2g+MVtrrZNw8EURJzoelSOnIg/rno9WxdQuG sVow== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=WObBC+l2; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q9si12216936ejz.674.2021.04.19.07.26.10; Mon, 19 Apr 2021 07:26: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=@gmail.com header.s=20161025 header.b=WObBC+l2; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5D81E68A0AE; Mon, 19 Apr 2021 17:17:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4096868A0E9 for ; Mon, 19 Apr 2021 17:16:56 +0300 (EEST) Received: by mail-io1-f51.google.com with SMTP id h141so26622798iof.2 for ; Mon, 19 Apr 2021 07:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9Wj3qHmE5JUn3MtJQWeC39U12zCStsMxY5hyIznsWN8=; b=WObBC+l24atfeat2kp3rsG33MugWeIH+nadIMDb+rLfqZTdAhpkZMQa3c+YJeqouoR 5QLAmK70DHgchUg0Yq2SZgbAEiFGbvUcW/hdYTSP+2yHpKWuKY0sZSla2O+wO3qbYi/V IZIZWUqwFwBMmTWfnbdgoa+Bak6peUcVSZ+xDcIgYC85obS/A1fEa54gt6QwQWKZM2s3 FTgbE92DRDVqYTlrQaxg5Tnud6UWhq1kxzT99tIWq1KHezRwx0exbZwo63CQH3JfcVIe ljOl+KwI2zmQt9eEIgiW+W253lLXse8WVn6aqPYLOPduGD6cDCMA7+tFd3pDV4GRLINr RN5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9Wj3qHmE5JUn3MtJQWeC39U12zCStsMxY5hyIznsWN8=; b=F9FHf3yofgNUVsp1grtSr28ivjWiHZ70ymMsaPV8cJyYQIqk6YhZdpeVZzNMZmUdO1 KExO04B4uVfxvwsrPTtivmmxSRiMPBF82MZEgEj17lFpXC6RuIkt8CU5o8JvvF1Mp6S0 nbN3xzJP66q+K+4nWRKvIyznkiRbyA8FpIEcHtycnWJMgQaszGh3ZbD4ABXix6koFqtT LE2g9c6lqQ3G00Vam+ZCDRWSJfEilcTSpvJpwGQTph4lCw4AQwDds6SmII3zSBI6hkN7 Vt/IxOR26ZufiXJrjuXgwtJoflEJ2QPSOG3PpxpVOyU6tsymwojPwmVvu9f74nF9iAYM 35Kg== X-Gm-Message-State: AOAM530rA+utELJWYfszSeL8O9RzyFUbc11mrsF1MpY4pR/VST9oW/UT ifKV/x4e2I0cMU78BOrm7uZLfCYzfJI= X-Received: by 2002:ac8:5d52:: with SMTP id g18mr12297574qtx.380.1618841467574; Mon, 19 Apr 2021 07:11:07 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:07 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:01 -0300 Message-Id: <20210419141024.8174-5-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/87] avcodec: Remove sidedata-only-packet cruft 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ugsq3uHZxK6F From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 15 --------------- libavcodec/flacenc.c | 6 ------ libavcodec/options_table.h | 3 --- libavcodec/version.h | 3 --- 4 files changed, 27 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 5e6967df0d..b46b858416 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2029,21 +2029,6 @@ typedef struct AVCodecContext { uint64_t vbv_delay; #endif -#if FF_API_SIDEDATA_ONLY_PKT - /** - * Encoding only and set by default. Allow encoders to output packets - * that do not contain any encoded data, only side data. - * - * Some encoders need to output such packets, e.g. to update some stream - * parameters at the end of encoding. - * - * @deprecated this field disables the default behaviour and - * it is kept only for compatibility. - */ - attribute_deprecated - int side_data_only_packets; -#endif - /** * Audio only. The number of "priming" samples (padding) inserted by the * encoder at the beginning of the audio. I.e. this number of leading diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 05a85d830f..38571ec9c9 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -1370,13 +1370,7 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, av_md5_final(s->md5ctx, s->md5sum); write_streaminfo(s, avctx->extradata); -#if FF_API_SIDEDATA_ONLY_PKT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->side_data_only_packets && !s->flushed) { -FF_ENABLE_DEPRECATION_WARNINGS -#else if (!s->flushed) { -#endif uint8_t *side_data = av_packet_new_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, avctx->extradata_size); if (!side_data) diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index e12159f734..956132437a 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -444,9 +444,6 @@ static const AVOption avcodec_options[] = { #if FF_API_OLD_ENCDEC {"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|V|D }, #endif -#if FF_API_SIDEDATA_ONLY_PKT -{"side_data_only_packets", NULL, OFFSET(side_data_only_packets), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, A|V|E }, -#endif {"apply_cropping", NULL, OFFSET(apply_cropping), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, V | D }, {"skip_alpha", "Skip processing alpha", OFFSET(skip_alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, V|D }, {"field_order", "Field order", OFFSET(field_order), AV_OPT_TYPE_INT, {.i64 = AV_FIELD_UNKNOWN }, 0, 5, V|D|E, "field_order" }, diff --git a/libavcodec/version.h b/libavcodec/version.h index 1068716eb9..9b017d1980 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -54,9 +54,6 @@ #ifndef FF_API_CODED_FRAME #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_SIDEDATA_ONLY_PKT -#define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_VDPAU_PROFILE #define FF_API_VDPAU_PROFILE (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27084 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp580567iob; Mon, 19 Apr 2021 07:40:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOsY68mdnvA4Zck/4rs7U5TYl2IJIrBcOVRPzRn4Omz2N2G2Mgz9b2lEfdlIboREmpgfN8 X-Received: by 2002:aa7:d15a:: with SMTP id r26mr3458586edo.283.1618843255720; Mon, 19 Apr 2021 07:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618843255; cv=none; d=google.com; s=arc-20160816; b=ZdHDlylI+EzPKtvocKzz7shHzmmXRLDUaNXVBDUEi1vYjSnwHNLgifJmD6ig9dqmAe tZfGYD74uJgemvkNgpMkII3QioiPhR+4R0hpmJXNrdGeWxWbfVZ8bl8aq6j7Ff1RpLUI t0rts4VQWBIVJu07wewBDI16XSRev5YIVk95IppZ7a+LwiNf8jB6GR1+g4ql7ok+WAZd UXBVRP/hLyTSopbu+TbQlAnh/HVjtJfEwEsjeZjaJ9OT/YwROKDbcdjdCGyygyIupTKH 7DjcePbeotFxxij72SlbFHhMR4EjhV6WhffO/b0/2GsV+xSq9/1luvi29vh2L1Jd3kFz 5CSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=2eLHPM9Urzu8/V6RFxdq6GDGai2CoE2ayUxIt4o947I=; b=CyPJlqdOgHK4dcp8hF2vJvWit3WZr6Dr3z9gfF1XSI0oy6w3Je/WuCapSJY7JbLgq1 wjXOFVxFGKGqz06RUr8gyNj0CL/qFZa0fVlFd8oYE/stwhxQukIiAoiHkXRtAFdEHSkf 9YiWK3hSBY05si24PSzeoM5QKM3oHJCStHbl3fG2+0l/kpJBROvczU7bCRmL9+Sfu9z4 Pyqaok0ajMMhwc2W4TtJjbhHna1QYnqNXL6+Z3cUIrtnc0jW0CUjjTBGyh3v9zzAP5Nt FnQbhXmvsNTuoqtfN/Q1xe2b/tmXoug4f1i4+sNgT/8NxTU/84uWnirKWuENy58dPZIE p4Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=B5BkYp7v; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id kq9si12311614ejb.12.2021.04.19.07.40.55; Mon, 19 Apr 2021 07:40: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=@gmail.com header.s=20161025 header.b=B5BkYp7v; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6719368A48A; Mon, 19 Apr 2021 17:40:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D0CB568004F for ; Mon, 19 Apr 2021 17:40:46 +0300 (EEST) Received: by mail-qt1-f174.google.com with SMTP id h7so26229534qtx.3 for ; Mon, 19 Apr 2021 07:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=JmoKnBP5VBa++NmsVmDs99lWoD0druf0LW2W4p7Uj3I=; b=B5BkYp7vabwyIz7exhqMg0l94SrayVqeX8R57XzduLvyBACRS+7oro0B1KWHwIK9bj h/xpKQFXkmjaKxBp0OiLxDgArpA8eD/c9nZ0pSkVXx3sBJ48AasMRmeydzlCro0he533 Rp4xvJhqspK11RCpd87i9LOlS/ldoYdwgdGJIoL89hzR/nIQYZQw9jYiTWag7+H9tgCU uGcSGHTVMe41HxUbOWbCpL/fMiIq2ZS49V4BdULkiAOnKaFfUdNKpiTM3E/ikw2kfS0j JOn3Ai/zgnmlHhE/CHnDVPi5DKHtzahY1/RYU5cqn55oEfKBMUPjrswgtcQu/zbV22W7 /aEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JmoKnBP5VBa++NmsVmDs99lWoD0druf0LW2W4p7Uj3I=; b=rkJ1aPfUmzZCKNRzR0ziG84YBq2cMSyT3epZ74TV+Zd0Dnw1/pzCQGXHESHG0M3ema eLLXu54bj10VN+OmB3gCj2+MkKcNx2qSA1lnkXShAPVmiqa8Z0o8kR/306RjsPFYhVKU ou6eRZ3Auf/7Oc3mqPk1RgPzGo7ZGt5NGBl7iXeM9ckWaUdvHOI61mC7bFmFTQQD6oaO CLZURZR00a6bvMpbZdtVnPx0Yc9TjLLKhJLZiXTwOfDMRg4bPkQ7dhCUBWCvlZ0S38cR BbzH33CowXnTXvoI1Aj0sRUzJtRvA8/lBmWr8pgGLHW2sY52yvZtCu8z3g1gp7pLDM0W sKMg== X-Gm-Message-State: AOAM533Ay5YByDRlE+DPnYQsRit4mEnjLTtrmdqT/Kcuz8rsRPahFCLN Rkeu0VcXqZP5ABHqfkw7zY2lMZ9IRi4= X-Received: by 2002:ac8:7b32:: with SMTP id l18mr7538704qtu.210.1618841468714; Mon, 19 Apr 2021 07:11:08 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:08 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:02 -0300 Message-Id: <20210419141024.8174-6-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/87] avcodec, avformat: Remove AVPacket.convergence_duration 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: UmnJ0AFHvW9u From: Andreas Rheinhardt Deprecated in 948f3c19a8bd069768ca411212aaf8c1ed96b10d. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 8 -------- libavcodec/avpacket.c | 16 ---------------- libavcodec/packet.h | 10 ---------- libavcodec/parser.c | 5 ----- libavcodec/version.h | 3 --- libavformat/matroskadec.c | 8 -------- libavformat/matroskaenc.c | 8 -------- libavformat/srtenc.c | 7 ------- libavformat/utils.c | 6 ------ 9 files changed, 71 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index b46b858416..81a18e2cde 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3386,14 +3386,6 @@ typedef struct AVCodecParserContext { */ int key_frame; -#if FF_API_CONVERGENCE_DURATION - /** - * @deprecated unused - */ - attribute_deprecated - int64_t convergence_duration; -#endif - // Timestamp generation support: /** * Synchronization point for start of timestamp generation. diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index b5bac5c5f2..b726a8db0e 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -39,11 +39,6 @@ void av_init_packet(AVPacket *pkt) pkt->dts = AV_NOPTS_VALUE; pkt->pos = -1; pkt->duration = 0; -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - pkt->convergence_duration = 0; -FF_ENABLE_DEPRECATION_WARNINGS -#endif pkt->flags = 0; pkt->stream_index = 0; pkt->buf = NULL; @@ -605,11 +600,6 @@ int av_packet_copy_props(AVPacket *dst, const AVPacket *src) dst->dts = src->dts; dst->pos = src->pos; dst->duration = src->duration; -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - dst->convergence_duration = src->convergence_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif dst->flags = src->flags; dst->stream_index = src->stream_index; @@ -742,12 +732,6 @@ void av_packet_rescale_ts(AVPacket *pkt, AVRational src_tb, AVRational dst_tb) pkt->dts = av_rescale_q(pkt->dts, src_tb, dst_tb); if (pkt->duration > 0) pkt->duration = av_rescale_q(pkt->duration, src_tb, dst_tb); -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (pkt->convergence_duration > 0) - pkt->convergence_duration = av_rescale_q(pkt->convergence_duration, src_tb, dst_tb); -FF_ENABLE_DEPRECATION_WARNINGS -#endif } int avpriv_packet_list_put(PacketList **packet_buffer, diff --git a/libavcodec/packet.h b/libavcodec/packet.h index ca18ae631f..47e9b8999b 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -387,16 +387,6 @@ typedef struct AVPacket { int64_t duration; int64_t pos; ///< byte position in stream, -1 if unknown - -#if FF_API_CONVERGENCE_DURATION - /** - * @deprecated Same as the duration field, but as int64_t. This was required - * for Matroska subtitles, whose duration values could overflow when the - * duration field was still an int. - */ - attribute_deprecated - int64_t convergence_duration; -#endif } AVPacket; #if FF_API_INIT_PACKET diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 11c41d6a0a..08b9945a57 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -67,11 +67,6 @@ found: goto err_out; } s->key_frame = -1; -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - s->convergence_duration = 0; -FF_ENABLE_DEPRECATION_WARNINGS -#endif s->dts_sync_point = INT_MIN; s->dts_ref_dts_delta = INT_MIN; s->pts_dts_delta = INT_MIN; diff --git a/libavcodec/version.h b/libavcodec/version.h index 9b017d1980..b2882361bc 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -57,9 +57,6 @@ #ifndef FF_API_VDPAU_PROFILE #define FF_API_VDPAU_PROFILE (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_CONVERGENCE_DURATION -#define FF_API_CONVERGENCE_DURATION (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_AVPICTURE #define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59) #endif diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e8c76f9cfb..116e331215 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3572,14 +3572,6 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska, pkt->pos = pos; pkt->duration = lace_duration; -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (st->codecpar->codec_id == AV_CODEC_ID_SUBRIP) { - pkt->convergence_duration = lace_duration; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - res = avpriv_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, NULL, 0); if (res < 0) { av_packet_unref(pkt); diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 0141fb0b8d..b36e86ecb1 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2372,14 +2372,6 @@ static int mkv_write_packet_internal(AVFormatContext *s, const AVPacket *pkt) mkv_blockgroup_size(pkt->size, track->track_num_size)); -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - /* For backward compatibility, prefer convergence_duration. */ - if (pkt->convergence_duration > 0) { - duration = pkt->convergence_duration; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif /* All subtitle blocks are considered to be keyframes. */ mkv_write_block(s, pb, MATROSKA_ID_BLOCK, pkt, 1); put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, duration); diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index 484dd4d230..9bb0ff94c1 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -73,13 +73,6 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt) y2 = AV_RL32(p + 12); } -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (d <= 0) - /* For backward compatibility, fallback to convergence_duration. */ - d = pkt->convergence_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (s == AV_NOPTS_VALUE || d < 0) { av_log(avf, AV_LOG_WARNING, "Insufficient timestamps in event number %d.\n", srt->index); diff --git a/libavformat/utils.c b/libavformat/utils.c index 02768aca1f..322ccd3af2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1439,12 +1439,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, /* update flags */ if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA || ff_is_intra_only(st->codecpar->codec_id)) pkt->flags |= AV_PKT_FLAG_KEY; -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (pc) - pkt->convergence_duration = pc->convergence_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } /** From patchwork Mon Apr 19 14:09:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27072 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp567412iob; Mon, 19 Apr 2021 07:25:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysryNfUmCc4yTyc63nIEgCpFnooivjXSPcpWiPNIAssMlsiklaIRaF4qBDt+ajiBNPSq41 X-Received: by 2002:a17:906:8293:: with SMTP id h19mr22280363ejx.217.1618842330038; Mon, 19 Apr 2021 07:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842330; cv=none; d=google.com; s=arc-20160816; b=rjTbaHhEneKtBxNEOJIUaFpCksHCVv5n/HXOLwTsQobvi7AWngVNU/Se88wQFF/RZB 83E1iyTjB848LLeglfKpqDQYJnaDIVMMc2+D/2RuY5vD1aikO8l/qZGLyonyWsEyA383 AAlp7dYMBecilY9nzlgbM2/D0e/fbuc8SConNPBdyEALyX4d3PGZqLKslX9q2/OxXLXR 3PVSBUv6JlqAw4R+hh7eeq53yxAMkW3Z2TpP/TkHzR/mVK/bwt0j0yJUFn5VjOUEHyiM a8IIQqWJNyBUg+ZZN8EiY+bTW/yU6dWM+IAUE0FhCZofdwEtjnRyzTMDzjEAOPM+vCwN TjUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=zPLycW5HA8rbAfRJmlSzt71IOXwWGWk9NmmjsGRfkeI=; b=QkcW2tQHsy972KUIaMupw3ArN0McWGtM62cFJD8QIxrEzFXN2ruIY5I329oMXL81Or s9QU6ptu5B/kvqy6LjN24D5ezS08OHhzMnTVcCgMHwyhWabkMqHsH4Kp6YBgvnvG1ymO o+S7/wSINBomrTo8dG90TXSXbrOLrCScDUR1mOMO/GIPUXKrTBJrkc6OVoSXLDTEOEVx szfvOd1DHzaWCziNdAj4o9F81g6Cuqg2l66WmhJGLrhBmkcAcYswkvan0USRuyUCMkGN wrHrJERg5608JuPaTQkwu5g9et28b45EnsXqL3vllafpbJgTl/4+D8Od2rbZRMD7qtBR 2Q7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=QCo5JWgq; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f11si593803edx.163.2021.04.19.07.25.29; Mon, 19 Apr 2021 07:25: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=@gmail.com header.s=20161025 header.b=QCo5JWgq; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A5C4689FF0; Mon, 19 Apr 2021 17:16:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8E593689FD1 for ; Mon, 19 Apr 2021 17:16:18 +0300 (EEST) Received: by mail-qt1-f180.google.com with SMTP id y12so26153129qtx.11 for ; Mon, 19 Apr 2021 07:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=quB/Y7YwMZzWaDeEhcndyGYbc2pUraxBVz/y9I17Ggs=; b=QCo5JWgq2/mfJWg0bzdkw+cittzfUR0lVj/xJp4XMsTQo655toelST40k57s25CwS2 n4Iav86ffLgaB3OInC2lyvnwC8/B5dQDdIYPS5Rw+w3NeBvJIganoCELLiYQh414z4KX Y5JIzY0H49AiM+VISt8SVo3sUrGxYSxqWRk5TCQQb02iMHfO3QKfol2EAz4Y1PCNW6H1 ukrjcr7gKPvZNgt76oHGWFq8+DcXJeHVwjQPqfbjh6TOP0qPmrOaA82dPUgp1TAU/Wv9 mudZD7bir1nW0rZ7URkjmLCrwJXyLRsXXmWMA+6O5a9g2xtfFsTIw5kEQ+0fgBk4NGPw 86Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=quB/Y7YwMZzWaDeEhcndyGYbc2pUraxBVz/y9I17Ggs=; b=Ezb+mD0o0Vehc5Sud/QS142JibGAv7/foiAjciLj3TsXlAQpUb+yv2y7z/xWCql9tk +iMCXyRmDs7YQ5jbC+26FsB221CloxpaQ6urBJRglHWac/8BJtdS0kRyVC4vPux7dJPL AjENUhlJWf3vixtY+9efXRrxb6TFEOyYvjFe3Esz7xvIeFF7Vxd4wtGmlkzkPiIzp90s Ear4NU0L63Eov8fxWdEOLKtjElOdDtIT7zCBH1A0Sez+8+uMv8OWJbxL7ZQjxMfgAxhu sydWLXX9TwyJoE6EFV6S8+WPV25NaVRP7j1MeSDCWTGjOESWzaKtC7HN0NmByEirzYJo uPjQ== X-Gm-Message-State: AOAM5307CVqoKscjqdZ+ElxDHb/fpye7XzQG5B55oODH2nQtOcG7sT5o hKTXaBC0ABEt68S8GX30fgsLs4ZlMn0= X-Received: by 2002:ac8:5cc4:: with SMTP id s4mr11693275qta.214.1618841469847; Mon, 19 Apr 2021 07:11:09 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:09 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:03 -0300 Message-Id: <20210419141024.8174-7-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/87] avcodec: Remove deprecated AVPacket 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: CRJc6zF28y1Q From: Andreas Rheinhardt Deprecated in ce70f28a1732c74a9cd7fec2d56178750bd6e457. Signed-off-by: Andreas Rheinhardt --- libavcodec/avpacket.c | 118 ------------------------------------------ libavcodec/packet.h | 39 -------------- libavcodec/version.h | 3 -- 3 files changed, 160 deletions(-) diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index b726a8db0e..4995a83bf8 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -174,108 +174,6 @@ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size) return 0; } -#if FF_API_AVPACKET_OLD_API -FF_DISABLE_DEPRECATION_WARNINGS -#define ALLOC_MALLOC(data, size) data = av_malloc(size) -#define ALLOC_BUF(data, size) \ -do { \ - av_buffer_realloc(&pkt->buf, size); \ - data = pkt->buf ? pkt->buf->data : NULL; \ -} while (0) - -#define DUP_DATA(dst, src, size, padding, ALLOC) \ - do { \ - void *data; \ - if (padding) { \ - if ((unsigned)(size) > \ - (unsigned)(size) + AV_INPUT_BUFFER_PADDING_SIZE) \ - goto failed_alloc; \ - ALLOC(data, size + AV_INPUT_BUFFER_PADDING_SIZE); \ - } else { \ - ALLOC(data, size); \ - } \ - if (!data) \ - goto failed_alloc; \ - memcpy(data, src, size); \ - if (padding) \ - memset((uint8_t *)data + size, 0, \ - AV_INPUT_BUFFER_PADDING_SIZE); \ - dst = data; \ - } while (0) - -/* Makes duplicates of data, side_data, but does not copy any other fields */ -static int copy_packet_data(AVPacket *pkt, const AVPacket *src, int dup) -{ - pkt->data = NULL; - pkt->side_data = NULL; - pkt->side_data_elems = 0; - if (pkt->buf) { - AVBufferRef *ref = av_buffer_ref(src->buf); - if (!ref) - return AVERROR(ENOMEM); - pkt->buf = ref; - pkt->data = ref->data; - } else { - DUP_DATA(pkt->data, src->data, pkt->size, 1, ALLOC_BUF); - } - if (src->side_data_elems && dup) { - pkt->side_data = src->side_data; - pkt->side_data_elems = src->side_data_elems; - } - if (src->side_data_elems && !dup) { - return av_copy_packet_side_data(pkt, src); - } - return 0; - -failed_alloc: - av_packet_unref(pkt); - return AVERROR(ENOMEM); -} - -int av_copy_packet_side_data(AVPacket *pkt, const AVPacket *src) -{ - if (src->side_data_elems) { - int i; - DUP_DATA(pkt->side_data, src->side_data, - src->side_data_elems * sizeof(*src->side_data), 0, ALLOC_MALLOC); - if (src != pkt) { - memset(pkt->side_data, 0, - src->side_data_elems * sizeof(*src->side_data)); - } - for (i = 0; i < src->side_data_elems; i++) { - DUP_DATA(pkt->side_data[i].data, src->side_data[i].data, - src->side_data[i].size, 1, ALLOC_MALLOC); - pkt->side_data[i].size = src->side_data[i].size; - pkt->side_data[i].type = src->side_data[i].type; - } - } - pkt->side_data_elems = src->side_data_elems; - return 0; - -failed_alloc: - av_packet_unref(pkt); - return AVERROR(ENOMEM); -} - -int av_dup_packet(AVPacket *pkt) -{ - AVPacket tmp_pkt; - - if (!pkt->buf && pkt->data) { - tmp_pkt = *pkt; - return copy_packet_data(pkt, &tmp_pkt, 1); - } - return 0; -} - -int av_copy_packet(AVPacket *dst, const AVPacket *src) -{ - *dst = *src; - return copy_packet_data(dst, src, 0); -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - void av_packet_free_side_data(AVPacket *pkt) { int i; @@ -285,22 +183,6 @@ void av_packet_free_side_data(AVPacket *pkt) pkt->side_data_elems = 0; } -#if FF_API_AVPACKET_OLD_API -FF_DISABLE_DEPRECATION_WARNINGS -void av_free_packet(AVPacket *pkt) -{ - if (pkt) { - if (pkt->buf) - av_buffer_unref(&pkt->buf); - pkt->data = NULL; - pkt->size = 0; - - av_packet_free_side_data(pkt); - } -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *data, size_t size) { diff --git a/libavcodec/packet.h b/libavcodec/packet.h index 47e9b8999b..a4cd8f5615 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -519,45 +519,6 @@ int av_grow_packet(AVPacket *pkt, int grow_by); */ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size); -#if FF_API_AVPACKET_OLD_API -/** - * @warning This is a hack - the packet memory allocation stuff is broken. The - * packet is allocated if it was not really allocated. - * - * @deprecated Use av_packet_ref or av_packet_make_refcounted - */ -attribute_deprecated -int av_dup_packet(AVPacket *pkt); -/** - * Copy packet, including contents - * - * @return 0 on success, negative AVERROR on fail - * - * @deprecated Use av_packet_ref - */ -attribute_deprecated -int av_copy_packet(AVPacket *dst, const AVPacket *src); - -/** - * Copy packet side data - * - * @return 0 on success, negative AVERROR on fail - * - * @deprecated Use av_packet_copy_props - */ -attribute_deprecated -int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src); - -/** - * Free a packet. - * - * @deprecated Use av_packet_unref - * - * @param pkt packet to free - */ -attribute_deprecated -void av_free_packet(AVPacket *pkt); -#endif /** * Allocate new information of a packet. * diff --git a/libavcodec/version.h b/libavcodec/version.h index b2882361bc..3e8e429153 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -60,9 +60,6 @@ #ifndef FF_API_AVPICTURE #define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_AVPACKET_OLD_API -#define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_RTP_CALLBACK #define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27086 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp580156iob; Mon, 19 Apr 2021 07:40:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbwbb61jnZHBcOb7KlerfDlAyElqjzIkm3OgRENux7luOo4agAtHfdCJImkTDyLbeFLtOg X-Received: by 2002:a17:906:1101:: with SMTP id h1mr22617361eja.179.1618843229157; Mon, 19 Apr 2021 07:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618843229; cv=none; d=google.com; s=arc-20160816; b=vI9JJs2MWlMhWW6Krfcy67PzyLre+V7ZK7honmq+GurdqFn01BmQ0YS5VlDrw9fJio iT0EPM41BaV2paj/rIs93A+ESa5wfvw57JvkucWYtgoJxFlz93KZ60Io3TB5Z0tc3R39 MSmPiob2CW6CgfnsIUJqfjAt9FPz95kj78rUcVSBhmEsQw9gZgOCdQhq2j/ZlfICU2OT 1j+hJq0hkEOXv6ZbesVNNJAxvszNdMz0RArGAga7iSbGxWIPb0f8zs7ZXO5XmFLUXo8D Lm/S9FoGKP6dTfaXkYJyi+yVERfpzfE2n+/j3LryKdflCx1Qj7vQ0u8mJtAPLiJkM21C IU5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=wdq/pcrS5j4kir/c+ZABCORiQEnIG5g3V4NFXsTwygA=; b=ivkVUZQK4N1AAJmDu+S33j1XdkQdv+0arImjjIQKlzgHomqvDm1qaCTeHyfcH2vyz3 VxX0Y5ahC+RPcCOaA6IksnPz+hWllV6Q1XX78gSwPOpkbTMYzvxOjBnMTjsoYRbynlMq 0cF0bApRMemU+HDGSwOS/heTUuMo9JpaancTqCyE6cF3GI9JSGnY28DIy88efotLwxFx u1Ks7hIh5FaL9/81swu4LaRRZbm2vSN2SXQn7911QUFnvPItPEboJSAm4E8BVK3OwptV N51MvheS4KbrB+LVM0fVohihtZSJYUZq70ld/+R5y2xNVt920cAtscvid9q+ld0BYqK7 l/6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="pZq//6Nn"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gx23si3791824ejb.463.2021.04.19.07.40.28; Mon, 19 Apr 2021 07:40:29 -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=@gmail.com header.s=20161025 header.b="pZq//6Nn"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4BD4868A451; Mon, 19 Apr 2021 17:40:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C36C68004F for ; Mon, 19 Apr 2021 17:40:19 +0300 (EEST) Received: by mail-io1-f51.google.com with SMTP id s16so29826013iog.9 for ; Mon, 19 Apr 2021 07:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FJjGslHmc2VPqwxxHKZlheTyV9mZwXpbxNPEE8alwNY=; b=pZq//6Nn7NE9amhw5Hg9JPLalOC0bKsOmR4HgqP8gkii6g0z5GmcrEcNpjYkGZRUc3 EblaHkGH+gYW9sOz2iGfMqnOLD1aAVCBTA8jc/T0Rn7Tm6Qtc1rAHVu6Zatxr2oelVhR sA0ej8Dz9FzrC4rp0PHrmkdxvnyH4TkTMqiO2Zg3JRp8UnzOZ2h3C7yALPsV7lGFAHC9 2oazDaCKGhzAmbbYUb7NtwQDuvTR+34WSIWP51cI0ETgkLSeODpdvxvD8oblOVhyodU5 zapbBXQx7gF4mpv0g6+q9WExTTc+Aitx/nnsVDB/p0QQeMznk1uQq61hmCRpLkn3ZmPI O3ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FJjGslHmc2VPqwxxHKZlheTyV9mZwXpbxNPEE8alwNY=; b=HBtDQwTMoQkGCilrVdJJc//zWfczSPViSlG/wzTirXXgacvzyl3TupwWKWuGGgKQC9 xz6RD6h185bhAhxThei2HxRUJn5VOQmnrTKAQpqTvuwsWVGyPVEArGB2Rc20T+HActWL shIwtJJLLYEIH0pHvPNQvkjbDx/j+U5hULYAw7DChae5njDNZdczOq9gK1jOPGgTaV7v +J3/ayDIwrhce85tIawLZRlFTCDWX4r8lopykme2Lf1FPmlqnD0AjzT5gSwr88qO6dMv MlctU/EC4zrja+DOlsPOEqTmW2QXe5gXCYRCAGHvviXAgEbj92uq10pNmT8ZBszUSONY /aSw== X-Gm-Message-State: AOAM531+bMrsaXW0aOLqm7doxCVCzZQLkCtQTbMu5DGWVvpWle9Q2fXl oMejq64+9iid0F1sZUov5xB8nX/WBAw= X-Received: by 2002:ac8:5913:: with SMTP id 19mr11968754qty.391.1618841471142; Mon, 19 Apr 2021 07:11:11 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:10 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:04 -0300 Message-Id: <20210419141024.8174-8-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/87] avcodec: Remove deprecated stat-bits fields 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tfPzIY0+mKMT From: Andreas Rheinhardt Deprecated in 16216b713f9a21865cc07993961cf5d0ece24916. Signed-off-by: Andreas Rheinhardt --- doc/codecs.texi | 9 --------- libavcodec/avcodec.h | 24 ------------------------ libavcodec/mpegvideo_enc.c | 20 -------------------- libavcodec/options_table.h | 11 ----------- libavcodec/snowenc.c | 8 -------- libavcodec/version.h | 3 --- 6 files changed, 75 deletions(-) diff --git a/doc/codecs.texi b/doc/codecs.texi index 9add7629cf..4a481dd5bf 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -150,15 +150,6 @@ Set strategy to choose between I/P/B-frames. @item ps @var{integer} (@emph{encoding,video}) Set RTP payload size in bytes. -@item mv_bits @var{integer} -@item header_bits @var{integer} -@item i_tex_bits @var{integer} -@item p_tex_bits @var{integer} -@item i_count @var{integer} -@item p_count @var{integer} -@item skip_count @var{integer} -@item misc_bits @var{integer} -@item frame_bits @var{integer} @item codec_tag @var{integer} @item bug @var{flags} (@emph{decoding,video}) Workaround not auto detected encoder bugs. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 81a18e2cde..ee2350bcb0 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1525,30 +1525,6 @@ typedef struct AVCodecContext { /* headers inside the transmitted RTP payload. */ #endif -#if FF_API_STAT_BITS - /* statistics, used for 2-pass encoding */ - attribute_deprecated - int mv_bits; - attribute_deprecated - int header_bits; - attribute_deprecated - int i_tex_bits; - attribute_deprecated - int p_tex_bits; - attribute_deprecated - int i_count; - attribute_deprecated - int p_count; - attribute_deprecated - int skip_count; - attribute_deprecated - int misc_bits; - - /** @deprecated this field is unused */ - attribute_deprecated - int frame_bits; -#endif - /** * pass1 encoding statistics output buffer * - encoding: Set by libavcodec. diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 7909a5630a..e1864f2afb 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1841,20 +1841,6 @@ vbv_retry: if (ret < 0) return -1; -#if FF_API_STAT_BITS -FF_DISABLE_DEPRECATION_WARNINGS - avctx->header_bits = s->header_bits; - avctx->mv_bits = s->mv_bits; - avctx->misc_bits = s->misc_bits; - avctx->i_tex_bits = s->i_tex_bits; - avctx->p_tex_bits = s->p_tex_bits; - avctx->i_count = s->i_count; - // FIXME f/b_count in avctx - avctx->p_count = s->mb_num - s->i_count - s->skip_count; - avctx->skip_count = s->skip_count; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - frame_end(s); if ((CONFIG_MJPEG_ENCODER || CONFIG_AMV_ENCODER) && s->out_format == FMT_MJPEG) @@ -2006,12 +1992,6 @@ FF_ENABLE_DEPRECATION_WARNINGS #endif } s->total_bits += s->frame_bits; -#if FF_API_STAT_BITS -FF_DISABLE_DEPRECATION_WARNINGS - avctx->frame_bits = s->frame_bits; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - pkt->pts = s->current_picture.f->pts; if (!s->low_delay && s->pict_type != AV_PICTURE_TYPE_B) { diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 956132437a..b3d8a79f11 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -105,17 +105,6 @@ static const AVOption avcodec_options[] = { {"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, V|E}, {"ps", "RTP payload size in bytes", OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, #endif -#if FF_API_STAT_BITS -{"mv_bits", NULL, OFFSET(mv_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"header_bits", NULL, OFFSET(header_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"i_tex_bits", NULL, OFFSET(i_tex_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"p_tex_bits", NULL, OFFSET(p_tex_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"i_count", NULL, OFFSET(i_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"p_count", NULL, OFFSET(p_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"skip_count", NULL, OFFSET(skip_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"misc_bits", NULL, OFFSET(misc_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -{"frame_bits", NULL, OFFSET(frame_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -#endif {"codec_tag", NULL, OFFSET(codec_tag), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"bug", "work around not autodetected encoder bugs", OFFSET(workaround_bugs), AV_OPT_TYPE_FLAGS, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, {"autodetect", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 16d2b7c302..1c1080ac76 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1890,14 +1890,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if(avctx->flags&AV_CODEC_FLAG_PASS1) ff_write_pass1_stats(&s->m); s->m.last_pict_type = s->m.pict_type; -#if FF_API_STAT_BITS -FF_DISABLE_DEPRECATION_WARNINGS - avctx->frame_bits = s->m.frame_bits; - avctx->mv_bits = s->m.mv_bits; - avctx->misc_bits = s->m.misc_bits; - avctx->p_tex_bits = s->m.p_tex_bits; -FF_ENABLE_DEPRECATION_WARNINGS -#endif emms_c(); diff --git a/libavcodec/version.h b/libavcodec/version.h index 3e8e429153..03aba06056 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -69,9 +69,6 @@ #ifndef FF_API_CODER_TYPE #define FF_API_CODER_TYPE (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_STAT_BITS -#define FF_API_STAT_BITS (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_PRIVATE_OPT #define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27075 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp569231iob; Mon, 19 Apr 2021 07:27:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynYZLh9r/bfL2VByBZ/r161LVe0r08ygDaw3I/OaCE5aGf+np8Vm5pG2mhxxMeNLgW9cbt X-Received: by 2002:a50:9fa1:: with SMTP id c30mr26306890edf.66.1618842470986; Mon, 19 Apr 2021 07:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842470; cv=none; d=google.com; s=arc-20160816; b=xnR/Y2S2iHqqjWDl6vJOG9KiIfrd+H+/y7vHH8YlhdtwNBOqXWpFD7NouxW81CxIWa j9pPcEP+EqUlFDzpMMYLfPieHsm2bihte1KlYRilGZFcFgRrG3tjpEBoFuQL3F5Vc/wa 4HVyLlHtawMO7URml+oeIqUpb97Pk2i1wvdr1pKLj7D7AT75LqHHe+eP+nFmCFOHetiu 4NFpHOf34jZZnSLL7sW0VLLaP9VoaJstlbm3ygaEdp2O8sEzbV2kCICGSvCQEjyi7FGq 1E1N04OpIDfx+2kCv5xU4PKhJ06d2bd0KFdyEpTHdxsEPpUVaDYH7r14HslUwq6wt8y3 A+WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=UMQ2mDYF6nEoUgtdnaZdK10VMKcBzNCT+E9setSieAA=; b=EmBwOJb6+ffryuQibMn0Japj8Zhjbf8RdAQhO27sFDC+SfJNG+/C6g+hoWG8uXNfLD QPZ0pNyl6SJPQ1VlTcgyk4da6tWob2Pr79lje62t5jFkLiapROYcVSNYkuNXEP5PeSKW pijm5SLtqCNxrpZP2ESU8r7maUd4+ckUf+hcu+mYkzuvoCxwYV3CO5CbXTz5r0v4oNcy e7EblsQ+xMlTmNTOn4yFjbtNbykS/4NZwFF9kdR1QFcIqQbuPG/FHCztCVLLvMDBpXnx W6Tvaom3j5kwzLbr55n4D4WDiJTyZgHCN4q3wcuF9e+CiIh5iHatae6FuSj3crKv/wCm b3Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=bxyonCQe; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l1si11746884edv.565.2021.04.19.07.27.50; Mon, 19 Apr 2021 07:27:50 -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=@gmail.com header.s=20161025 header.b=bxyonCQe; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A417F68A2CC; Mon, 19 Apr 2021 17:18:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3595A68A2B8 for ; Mon, 19 Apr 2021 17:18:23 +0300 (EEST) Received: by mail-qk1-f181.google.com with SMTP id y136so3783216qkb.1 for ; Mon, 19 Apr 2021 07:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=OCKZZ2O0C0a/kTLyzO8JXojIXshtwXSmBCuiNosoeLo=; b=bxyonCQeXTdlz4zF+M+GWWpGwAUKu7HP+jQZsLxV+MczZLzaPOXF8ZZ7+HS4qyviZF xJdB5nHfe3PQGr/d7C9PSeM8SVOaHXr6CF196FimGZFuoI+SIgHj2s61G0pDR6bylulw Zw2CDATSeaZ+hBM2NDLk5Bf2AY1XJzvDFJpuHHL3ayOQGVi3e+d06yRQOKMxn+KxaqIp 2owjpGomnO2+Pi+5JIiI6LLsTOD2w5/X8zoAn4atJdV4Y9Tmivf7jqcQTiP/mxMFyoIG 3UwQ7UQ5LJIbT2QscjcOVEKm1LuuZ3l9s0GQrFyX2Ga4VaFab+gQ708q9lKxqaDF7ANS Cp2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OCKZZ2O0C0a/kTLyzO8JXojIXshtwXSmBCuiNosoeLo=; b=A8WuJtWMytq1cnivgrUYn+kTwNIwkNBlkF3fYTnV3e3OHaXn3YqPUtKNeNY9VTF2lH Uwv1hwSAXIdVwcQ70uzLBER1PmjUfyghcHai7miBQcBuCKzwYfjBIWBjQCAQB+/NZz0h uCAuyHg08z0axtgkopQFJo93GUAbnt6FlVTiOXPvWS4/ezpQdNR0xUWZpd4L/1b+F/au O8IvuNhuHqoDf6S4FS6HQQ/Cf/so84iNfutpn3HkHNGmwBfqh2iNQUlDeOoRnhJPXV7x +N5JZfhmco1EKQmUuMcwQajTFpjIjjvOeD6NtVTfjnCJMsIkSqVxs1DgUE468/B0gVe+ YrpA== X-Gm-Message-State: AOAM531bXnTugfpfxvp/34RM6ndNEgTYp2Zq7j5C+zWwiTYDyFRKzUL0 Mqzfyh8vTgy56YIctcThfVfrffSrJZg= X-Received: by 2002:a37:d4e:: with SMTP id 75mr11713630qkn.457.1618841472484; Mon, 19 Apr 2021 07:11:12 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:12 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:05 -0300 Message-Id: <20210419141024.8174-9-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/87] avcodec: Remove deprecated coder type options 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: RXPIaAoAzzg6 From: Andreas Rheinhardt Deprecated in be00ec832c519427cd92218abac77dafdc1d5487. Signed-off-by: Andreas Rheinhardt --- doc/codecs.texi | 14 -------------- libavcodec/avcodec.h | 12 ------------ libavcodec/ffv1enc.c | 17 ----------------- libavcodec/libopenh264enc.c | 10 ---------- libavcodec/libx264.c | 9 --------- libavcodec/options_table.h | 7 ------- libavcodec/qsvenc.c | 6 ------ libavcodec/qsvenc_h264.c | 3 --- libavcodec/sgienc.c | 7 ------- libavcodec/sunrastenc.c | 26 -------------------------- libavcodec/targaenc.c | 7 ------- libavcodec/version.h | 3 --- 12 files changed, 121 deletions(-) diff --git a/doc/codecs.texi b/doc/codecs.texi index 4a481dd5bf..702caa2a1d 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -627,20 +627,6 @@ Set limit motion vectors range (1023 for DivX player). @item global_quality @var{integer} (@emph{encoding,audio,video}) -@item coder @var{integer} (@emph{encoding,video}) - -Possible values: -@table @samp -@item vlc -variable length coder / huffman coder -@item ac -arithmetic coder -@item raw -raw (no encoding) -@item rle -run-length coder -@end table - @item context @var{integer} (@emph{encoding,video}) Set context model. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index ee2350bcb0..b468ee7c6f 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1443,18 +1443,6 @@ typedef struct AVCodecContext { */ int rc_initial_buffer_occupancy; -#if FF_API_CODER_TYPE -#define FF_CODER_TYPE_VLC 0 -#define FF_CODER_TYPE_AC 1 -#define FF_CODER_TYPE_RAW 2 -#define FF_CODER_TYPE_RLE 3 - /** - * @deprecated use encoder private options instead - */ - attribute_deprecated - int coder_type; -#endif /* FF_API_CODER_TYPE */ - #if FF_API_PRIVATE_OPT /** @deprecated use encoder private options instead */ attribute_deprecated diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index cdad65a4f9..de28ac44f1 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -554,13 +554,6 @@ static av_cold int encode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } -#if FF_API_CODER_TYPE -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->coder_type != -1) - s->ac = avctx->coder_type > 0 ? AC_RANGE_CUSTOM_TAB : AC_GOLOMB_RICE; - else -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (s->ac == 1) // Compatbility with common command line usage s->ac = AC_RANGE_CUSTOM_TAB; else if (s->ac == AC_RANGE_DEFAULT_TAB_FORCE) @@ -1310,13 +1303,6 @@ static const AVClass ffv1_class = { .version = LIBAVUTIL_VERSION_INT, }; -#if FF_API_CODER_TYPE -static const AVCodecDefault ffv1_defaults[] = { - { "coder", "-1" }, - { NULL }, -}; -#endif - AVCodec ff_ffv1_encoder = { .name = "ffv1", .long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), @@ -1350,9 +1336,6 @@ AVCodec ff_ffv1_encoder = { AV_PIX_FMT_NONE }, -#if FF_API_CODER_TYPE - .defaults = ffv1_defaults, -#endif .priv_class = &ffv1_class, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 0eade73498..608fa59cdd 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -210,16 +210,6 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) break; } -#if FF_API_CODER_TYPE && FF_API_OPENH264_CABAC -FF_DISABLE_DEPRECATION_WARNINGS - if (s->coder < 0 && avctx->coder_type == FF_CODER_TYPE_AC) - s->coder = 1; - - if (s->coder < 0) - s->coder = s->cabac; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->profile == FF_PROFILE_UNKNOWN && s->coder >= 0) s->profile = s->coder == 0 ? FF_PROFILE_H264_CONSTRAINED_BASELINE : #if OPENH264_VER_AT_LEAST(1, 8) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 4ddc4973a4..6d945fc3fb 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -747,12 +747,6 @@ FF_ENABLE_DEPRECATION_WARNINGS #endif if (avctx->keyint_min >= 0) x4->params.i_keyint_min = avctx->keyint_min; -#if FF_API_CODER_TYPE -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->coder_type >= 0) - x4->coder = avctx->coder_type == FF_CODER_TYPE_AC; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (avctx->me_cmp >= 0) x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA; @@ -1174,9 +1168,6 @@ static const AVCodecDefault x264_defaults[] = { { "b_strategy", "-1" }, #endif { "keyint_min", "-1" }, -#if FF_API_CODER_TYPE - { "coder", "-1" }, -#endif { "cmp", "-1" }, { "threads", AV_STRINGIFY(X264_THREADS_AUTO) }, { "thread_type", "0" }, diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index b3d8a79f11..9b77428a50 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -216,13 +216,6 @@ static const AVOption avcodec_options[] = { {"subq", "sub-pel motion estimation quality", OFFSET(me_subpel_quality), AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E}, {"me_range", "limit motion vectors range (1023 for DivX player)", OFFSET(me_range), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, -#if FF_API_CODER_TYPE -{"coder", NULL, OFFSET(coder_type), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"}, -{"vlc", "variable length coder / Huffman coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"}, -{"ac", "arithmetic coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_AC }, INT_MIN, INT_MAX, V|E, "coder"}, -{"raw", "raw (no encoding)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RAW }, INT_MIN, INT_MAX, V|E, "coder"}, -{"rle", "run-length coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RLE }, INT_MIN, INT_MAX, V|E, "coder"}, -#endif /* FF_API_CODER_TYPE */ #if FF_API_PRIVATE_OPT {"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, #endif diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 566a5c8552..d30c289fce 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -667,12 +667,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) q->extco.RateDistortionOpt = q->rdo > 0 ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF; if (avctx->codec_id == AV_CODEC_ID_H264) { -#if FF_API_CODER_TYPE -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->coder_type >= 0) - q->cavlc = avctx->coder_type == FF_CODER_TYPE_VLC; -FF_ENABLE_DEPRECATION_WARNINGS -#endif q->extco.CAVLC = q->cavlc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN; diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index ddafc45ec3..df70f30271 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -169,9 +169,6 @@ static const AVCodecDefault qsv_enc_defaults[] = { { "bf", "3" }, { "qmin", "-1" }, { "qmax", "-1" }, -#if FF_API_CODER_TYPE - { "coder", "-1" }, -#endif { "trellis", "-1" }, { "flags", "+cgop" }, #if FF_API_PRIVATE_OPT diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index 3aa0c7f4a5..2a898f5a4f 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -105,13 +105,6 @@ FF_DISABLE_DEPRECATION_WARNINGS avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; FF_ENABLE_DEPRECATION_WARNINGS -#endif - -#if FF_API_CODER_TYPE -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->coder_type == FF_CODER_TYPE_RAW) - s->rle = 0; -FF_ENABLE_DEPRECATION_WARNINGS #endif width = avctx->width; diff --git a/libavcodec/sunrastenc.c b/libavcodec/sunrastenc.c index 97b2242a6e..af4529815b 100644 --- a/libavcodec/sunrastenc.c +++ b/libavcodec/sunrastenc.c @@ -140,22 +140,6 @@ static av_cold int sunrast_encode_init(AVCodecContext *avctx) { SUNRASTContext *s = avctx->priv_data; -#if FF_API_CODER_TYPE -FF_DISABLE_DEPRECATION_WARNINGS - switch (avctx->coder_type) { - case FF_CODER_TYPE_RLE: - s->type = RT_BYTE_ENCODED; - break; - case FF_CODER_TYPE_RAW: - s->type = RT_STANDARD; - break; - default: - av_log(avctx, AV_LOG_ERROR, "invalid coder_type\n"); - return AVERROR(EINVAL); - } -FF_ENABLE_DEPRECATION_WARNINGS - if (s->type != RT_BYTE_ENCODED && s->type != RT_STANDARD) -#endif // adjust boolean option to RT equivalent s->type++; @@ -224,13 +208,6 @@ static const AVClass sunrast_class = { .version = LIBAVUTIL_VERSION_INT, }; -#if FF_API_CODER_TYPE -static const AVCodecDefault sunrast_defaults[] = { - { "coder", "rle" }, - { NULL }, -}; -#endif - AVCodec ff_sunrast_encoder = { .name = "sunrast", .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"), @@ -239,9 +216,6 @@ AVCodec ff_sunrast_encoder = { .priv_data_size = sizeof(SUNRASTContext), .init = sunrast_encode_init, .encode2 = sunrast_encode_frame, -#if FF_API_CODER_TYPE - .defaults = sunrast_defaults, -#endif .priv_class = &sunrast_class, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_PAL8, diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c index 79030a012b..f662e4a489 100644 --- a/libavcodec/targaenc.c +++ b/libavcodec/targaenc.c @@ -152,13 +152,6 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt, bpp = pkt->data[16] >> 3; -#if FF_API_CODER_TYPE -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->coder_type == FF_CODER_TYPE_RAW) - s->rle = 0; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - /* try RLE compression */ if (s->rle) datasize = targa_encode_rle(out, picsize, p, bpp, avctx->width, avctx->height); diff --git a/libavcodec/version.h b/libavcodec/version.h index 03aba06056..31d0d26abc 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -66,9 +66,6 @@ #ifndef FF_API_VBV_DELAY #define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_CODER_TYPE -#define FF_API_CODER_TYPE (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_PRIVATE_OPT #define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27017 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp555474iob; Mon, 19 Apr 2021 07:11:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/8GuC500kW5/dXP8Hf8saSD6tKPs4EfRvroOsDyKoYbjPKt6/qdv9Mr0esP5+UEdh/S+s X-Received: by 2002:a05:600c:365a:: with SMTP id y26mr21227139wmq.102.1618841487946; Mon, 19 Apr 2021 07:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841487; cv=none; d=google.com; s=arc-20160816; b=kPo9FpMNcaxgjNZ0MREWgZAE8X3bVy6lqhw6UomVawHJjnuPghvRFkUcQmoz00goTx i5E1E/Pe37B7euACA39g+F7f1fGxunmIO9fm8w1kVcRNHb4M0FBbsjo0qLAgxsmobtRm Rq+srh9r6JbB21UlFmDtYPIV+eIKUxbRsS6yti6G9QfyGkICMAVKHluuECTrP/XwtHPj u088hoo2Jc6+p3dr1aZjcDZcyCMc0htZkana2XnXi41kHMAiBHizkp5uRdBRZvfTKTWj 3tKml4aAeWcYqhYISfxtEfx3rmQ4A/G6tNoPuvHaFhb8JtXbrzwQqeaimyOOR2TDtvdF 3E6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=p8IgLpPpNhGZINxPWyz86qHZ07MpR4wNSg1Ik3D7gu4=; b=xKliF+v35igPDMqHxV0osOUUL3PXPwJqvLRUEpYWODlfutuEtLJ16jPAg4KA50eNdN tTj16K2VaTFFRXBiYi9+XNvmA8U5bSDZYBeqcCZz9KJhDkaKoB3DSJh3H7V5HunSK05f Ntd8wM2jxCT+Nzs7nNCP623+d640m6NpRbBNTNBUb5txeZ3IOpyP1+J0wv66S4LFdP0O hc7FirN0AJkYVu6yPIc4+1vwuCUc6Sj/2GaDhVefuF+OaT4hVLHz4W0x9UBojPRBVZxw elHnG3QmwE+h4dXcvKHb3kbucMN6wJpxk11b0n/IliCt0n2GOYjuH7HhCOnYdhYKHCss kIvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=X+N66RGt; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g9si3768084edq.301.2021.04.19.07.11.26; Mon, 19 Apr 2021 07:11:27 -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=@gmail.com header.s=20161025 header.b=X+N66RGt; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AAF60680740; Mon, 19 Apr 2021 17:11:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 153A0680271 for ; Mon, 19 Apr 2021 17:11:15 +0300 (EEST) Received: by mail-qk1-f179.google.com with SMTP id q136so14895035qka.7 for ; Mon, 19 Apr 2021 07:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Z9M26Uu0ZxbU2mLO8e222CW0RKIPKR6xnthcOM0GYIA=; b=X+N66RGtY/1tJnc0y9TTZVvAadnO2UY0fR7GBKnwPaAeYGh1WzwehuNS8yvs2okGXC bIUK5TfB1bXIUt7ed5x0q+Rr4f8kSPTm9Gf2x3xW8EgXPd80kfFq3VmLdSh7b5f6q5Iy U6B6Tv0ddy68zexu1xR+YRfVTjmNhEGOPrXmuipF+EeEQ7kBjAw6x15qLfJHCi2mdwPB Em1JPBtlPFtGULaZ3nyDLodSZ1OkZ5HBvBGX+Vyq+2M6UES2GOSRX8gQ+vlKUbB7ezZz zCkumMpOgMmQZ9FBczGjnOOz80RfrUUDJnlY7aUUc+hSatdTRgrucpvTCKTERUbxD1yq yzuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z9M26Uu0ZxbU2mLO8e222CW0RKIPKR6xnthcOM0GYIA=; b=ErKER7ckViJ8IAQC53csJaNUfyrEFN5gE8fr4Ue5xf15ui6paULGsYpQrM5edsHfK+ 7AdoN1LE5AfuGv4+Ly7QYXm2P60GUcw4ggAZqP2L2yN0/YZHR9OFEwWvXkqsYz4o4FG8 gTS3CzILP+SoaxWZsXcmTiHG29p+hVDNba1+PKwNE2hC+h7HTHtmGVWXJNwKupiSR2Bq 9TffRs8fO0vhO8n2VxHyeXA1IL3YBCByOjrzjX4o/eaWP+apRp4+Ky1Ify0P5gu1xjQN M/2ywU/+uYGedih8e5NixhNDFgUEGwyGtqxHNv0zyXQ+KaJ6/U4scqtD6AXcu04OL+GS LvKQ== X-Gm-Message-State: AOAM531E6+/Aj1t5/SWkrHtsJP2NvbUvTGHlrQ9lse/9f/+asnw0MEyb STREYwPWkzX69/NYAk+WfDO1TDV7G6E= X-Received: by 2002:a37:b103:: with SMTP id a3mr12610224qkf.261.1618841473598; Mon, 19 Apr 2021 07:11:13 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:13 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:06 -0300 Message-Id: <20210419141024.8174-10-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/87] avcodec: Remove deprecated API to split/merge side-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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yn79vMQPQnxk From: Andreas Rheinhardt Deprecated in d682ae70b4b3a53fb73ec30281f9f4cfbc531edd. Signed-off-by: Andreas Rheinhardt --- libavcodec/avpacket.c | 87 ------------------------------------------- libavcodec/packet.h | 8 ---- libavcodec/version.h | 3 -- 3 files changed, 98 deletions(-) diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 4995a83bf8..622b50d5eb 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -297,93 +297,6 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type) return NULL; } -#if FF_API_MERGE_SD_API - -#define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL - -int av_packet_merge_side_data(AVPacket *pkt){ - if(pkt->side_data_elems){ - AVBufferRef *buf; - int i; - uint8_t *p; - uint64_t size= pkt->size + 8LL + AV_INPUT_BUFFER_PADDING_SIZE; - AVPacket old= *pkt; - for (i=0; i INT_MAX) - return AVERROR(EINVAL); - buf = av_buffer_alloc(size); - if (!buf) - return AVERROR(ENOMEM); - pkt->buf = buf; - pkt->data = p = buf->data; - pkt->size = size - AV_INPUT_BUFFER_PADDING_SIZE; - bytestream_put_buffer(&p, old.data, old.size); - for (i=old.side_data_elems-1; i>=0; i--) { - bytestream_put_buffer(&p, old.side_data[i].data, old.side_data[i].size); - bytestream_put_be32(&p, old.side_data[i].size); - *p++ = old.side_data[i].type | ((i==old.side_data_elems-1)*128); - } - bytestream_put_be64(&p, FF_MERGE_MARKER); - av_assert0(p-pkt->data == pkt->size); - memset(p, 0, AV_INPUT_BUFFER_PADDING_SIZE); - av_packet_unref(&old); - pkt->side_data_elems = 0; - pkt->side_data = NULL; - return 1; - } - return 0; -} - -int av_packet_split_side_data(AVPacket *pkt){ - if (!pkt->side_data_elems && pkt->size >12 && AV_RB64(pkt->data + pkt->size - 8) == FF_MERGE_MARKER){ - int i; - unsigned int size; - uint8_t *p; - - p = pkt->data + pkt->size - 8 - 5; - for (i=1; ; i++){ - size = AV_RB32(p); - if (size>INT_MAX - 5 || p - pkt->data < size) - return 0; - if (p[4]&128) - break; - if (p - pkt->data < size + 5) - return 0; - p-= size+5; - } - - if (i > AV_PKT_DATA_NB) - return AVERROR(ERANGE); - - pkt->side_data = av_malloc_array(i, sizeof(*pkt->side_data)); - if (!pkt->side_data) - return AVERROR(ENOMEM); - - p= pkt->data + pkt->size - 8 - 5; - for (i=0; ; i++){ - size= AV_RB32(p); - av_assert0(size<=INT_MAX - 5 && p - pkt->data >= size); - pkt->side_data[i].data = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE); - pkt->side_data[i].size = size; - pkt->side_data[i].type = p[4]&127; - if (!pkt->side_data[i].data) - return AVERROR(ENOMEM); - memcpy(pkt->side_data[i].data, p-size, size); - pkt->size -= size + 5; - if(p[4]&128) - break; - p-= size+5; - } - pkt->size -= 8; - pkt->side_data_elems = i+1; - return 1; - } - return 0; -} -#endif - #if FF_API_BUFFER_SIZE_T uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size) #else diff --git a/libavcodec/packet.h b/libavcodec/packet.h index a4cd8f5615..6e6d9c58c9 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -581,14 +581,6 @@ uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType size_t *size); #endif -#if FF_API_MERGE_SD_API -attribute_deprecated -int av_packet_merge_side_data(AVPacket *pkt); - -attribute_deprecated -int av_packet_split_side_data(AVPacket *pkt); -#endif - const char *av_packet_side_data_name(enum AVPacketSideDataType type); /** diff --git a/libavcodec/version.h b/libavcodec/version.h index 31d0d26abc..5e122847ac 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -84,9 +84,6 @@ #ifndef FF_API_STRUCT_VAAPI_CONTEXT #define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_MERGE_SD_API -#define FF_API_MERGE_SD_API (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_TAG_STRING #define FF_API_TAG_STRING (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27080 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp569697iob; Mon, 19 Apr 2021 07:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLmNHcpcqgtrE5hXOEiVzud1+LnJicbkrTrBj2cFfhEkd1L4VAntYCGip+oNp/cgrIlJTm X-Received: by 2002:a17:906:5490:: with SMTP id r16mr23076271ejo.352.1618842502470; Mon, 19 Apr 2021 07:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842502; cv=none; d=google.com; s=arc-20160816; b=Hv+LomULiRwIJzJrsIPmi9D8WUCAzRQBEwxvRtd+isnQTJJvLn9JG4a85dt6S1PmJH nPobRV99iO3oUj5giWPnWXFraCWikq+X8aVzy4T0XmFQJIUk39fN9VcPFGBgJ5udfwhd aBgwPM49cg57npjAmViwOmsJevQ9iY+o5RnLsOrVNccflAfRubjhs2lrJgU/P2ub6V/I A5Kn1QPUio0caIWr4lIo+MaqnSc7I4zVT87MKsDQWcXj25aTVaN59x5ancJMbxaHQhCr K87UCaYAXVYv6o1iGKzcokS9eL4PYHcs4kXdCsfRwBjNeHm7oMlt8fmSHbt8G9RMHUlo +OZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=VYh6rADufBCCPCPPZU8+x3zvj3WJXitFPSzkN+cDbSk=; b=SH7rOC1JfHFtgvPEj0krP3rjAmR/mw+uqft49Up5KBPDyHpKSQkQEILT6SkDHhRATH +w9QjOAwiGJz+kB2uULV4jAlb8ddA+eRG36+gKL7uza9iofNaHALcPkj4oiyjluWZnVR RJ8JApFwiqt01NNBktb1AjPzMWxO29/nRyC9+DnYaeKUD1LFqs1wY0v5RTR1nAK7ObSF cF+aOz6SCa4wEEV4OxQXmvTLcDsRDd0HV5pjfNhOlrKQ7a+/FoI3jDwuGU3Xz1XKeKJ3 cHJySZ7990pFoqleeGeDm/b+zTAGu9X6V304yBe0XCgMDClaFDiJHsTVH/rx0vRpO3h7 Zjfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=WZIlSGsm; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l1si11747847edv.565.2021.04.19.07.28.21; Mon, 19 Apr 2021 07:28:22 -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=@gmail.com header.s=20161025 header.b=WZIlSGsm; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B1E3168A320; Mon, 19 Apr 2021 17:19:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 088D268A31A for ; Mon, 19 Apr 2021 17:19:16 +0300 (EEST) Received: by mail-qt1-f175.google.com with SMTP id o2so12732165qtr.4 for ; Mon, 19 Apr 2021 07:19:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+PEGXsb0opa3upRre20xh+saIK79zHuHS2Gijfqwk/0=; b=WZIlSGsm1mzVj/Ekoqac1MOwR3zI+B9qG5PUJnBTPHfkVWJriCjDyA+sNBgoMdk0+J riKalgYB1yT7pk4mVfD2AeZ77d0gZNW8RhCbsPZ8g1p/5uJgGoSoUDtXMJUVbRBM2F9k sN/kbdQk5QXgniYnGYTj0LoXe5w+1ga8DBUxVrwTKjrjcybBfA6ohMiDACl/Gx7IxDer X+/aVpiz+Iew9Ta6i5iTxVTiSM+oOFOp0Sc4oeWVJa+E96T/dS+lXHvq/t7G7W7So5my 6gmE+jXFihTLi4cb/LZSzLm/0DzgVwz7/Mh94ED7ACW53tLS3HTFFvHk/u+Ttjk68ghe E7Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+PEGXsb0opa3upRre20xh+saIK79zHuHS2Gijfqwk/0=; b=S2075oLXAWy+kcMD6b/2H4KGsf1hCtqqDCEa/A5sc80Xyb6+XhPT1A173kIgI+zdYQ KrA6H6bltZodmOFZFvfKe0KBCBQiLkOcUaw4/SCEhslAGrmmRkLJG1wDacqOucoP6uDd /JJS1LQL7BLJcoNu9VmHY2nXvlPdDSxD9TEVoG+Nd1rgSCv03IWHYQdSrHEub/j8/Lnf xHBGN39/AaUuCq9zTQkgOrt/UF6xHhRkTM3yKimbMu82i3t0Q0mJT52tNeBuqhPVfriw I5z3hDvnIMPTxgJXlJsEcGsyYydEx8QwLdg3bKFWoR632Z2Nr5dHc68LDg+HVHe18kK7 a6aw== X-Gm-Message-State: AOAM5308+khHEXPvRmieae2BD5OrAN8iBZ/BPRs25pAsbJ/S8EVlGSN2 r0H2I/hHCOkBcFcu+XaaKCgEg1rkM5w= X-Received: by 2002:a37:bc43:: with SMTP id m64mr12305852qkf.186.1618841474927; Mon, 19 Apr 2021 07:11:14 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:14 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:07 -0300 Message-Id: <20210419141024.8174-11-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/87] avcodec: Remove private options from AVCodecContext 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: FUQqLz8UJRkw From: Andreas Rheinhardt Several options that were too codec-specific were deprecated between 0e6c8532215790bbe560a9eea4f3cc82bb55cf92 and 0e9c4fe254073b209970df3e3cb84531bc388e99. Signed-off-by: Andreas Rheinhardt --- doc/codecs.texi | 100 --------------------------------- libavcodec/alacenc.c | 26 --------- libavcodec/avcodec.h | 112 ------------------------------------- libavcodec/ffv1enc.c | 10 ---- libavcodec/flacenc.c | 36 ------------ libavcodec/huffyuvenc.c | 26 --------- libavcodec/j2kenc.c | 7 --- libavcodec/jpeglsenc.c | 7 --- libavcodec/libvpxenc.c | 12 ---- libavcodec/libx264.c | 33 ----------- libavcodec/libxavs.c | 28 ---------- libavcodec/libxvid.c | 7 --- libavcodec/ljpegenc.c | 14 ----- libavcodec/mpeg12dec.c | 7 --- libavcodec/mpeg12enc.c | 7 --- libavcodec/mpegvideo_enc.c | 71 ----------------------- libavcodec/options_table.h | 48 ---------------- libavcodec/pngenc.c | 9 --- libavcodec/qsvenc.c | 6 -- libavcodec/qsvenc_h264.c | 3 - libavcodec/qsvenc_hevc.c | 3 - libavcodec/qsvenc_mpeg2.c | 3 - libavcodec/snowenc.c | 14 ----- libavcodec/utvideoenc.c | 28 ---------- libavcodec/version.h | 3 - 25 files changed, 620 deletions(-) diff --git a/doc/codecs.texi b/doc/codecs.texi index 702caa2a1d..5e10020900 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -144,12 +144,6 @@ Default value is 0. @item b_qfactor @var{float} (@emph{encoding,video}) Set qp factor between P and B frames. -@item b_strategy @var{integer} (@emph{encoding,video}) -Set strategy to choose between I/P/B-frames. - -@item ps @var{integer} (@emph{encoding,video}) -Set RTP payload size in bytes. - @item codec_tag @var{integer} @item bug @var{flags} (@emph{decoding,video}) Workaround not auto detected encoder bugs. @@ -239,9 +233,6 @@ consider things that a sane encoder should not do as an error @item block_align @var{integer} -@item mpeg_quant @var{integer} (@emph{encoding,video}) -Use MPEG quantizers instead of H.263. - @item rc_override_count @var{integer} @item maxrate @var{integer} (@emph{encoding,audio,video}) @@ -347,19 +338,6 @@ favor predicting from the previous frame instead of the current @item bits_per_coded_sample @var{integer} -@item pred @var{integer} (@emph{encoding,video}) -Set prediction method. - -Possible values: -@table @samp -@item left - -@item plane - -@item median - -@end table - @item aspect @var{rational number} (@emph{encoding,video}) Set sample aspect ratio. @@ -576,9 +554,6 @@ sab diamond motion estimation @item last_pred @var{integer} (@emph{encoding,video}) Set amount of motion predictors from the previous frame. -@item preme @var{integer} (@emph{encoding,video}) -Set pre motion estimation. - @item precmp @var{integer} (@emph{encoding,video}) Set pre motion estimation compare function. @@ -627,9 +602,6 @@ Set limit motion vectors range (1023 for DivX player). @item global_quality @var{integer} (@emph{encoding,audio,video}) -@item context @var{integer} (@emph{encoding,video}) -Set context model. - @item slice_flags @var{integer} @item mbd @var{integer} (@emph{encoding,video}) @@ -645,12 +617,6 @@ use fewest bits use best rate distortion @end table -@item sc_threshold @var{integer} (@emph{encoding,video}) -Set scene change threshold. - -@item nr @var{integer} (@emph{encoding,video}) -Set noise reduction. - @item rc_init_occupancy @var{integer} (@emph{encoding,video}) Set number of bits which should be loaded into the rc buffer before decoding starts. @@ -738,64 +704,12 @@ Possible values: @item lowres @var{integer} (@emph{decoding,audio,video}) Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions. -@item skip_threshold @var{integer} (@emph{encoding,video}) -Set frame skip threshold. - -@item skip_factor @var{integer} (@emph{encoding,video}) -Set frame skip factor. - -@item skip_exp @var{integer} (@emph{encoding,video}) -Set frame skip exponent. -Negative values behave identical to the corresponding positive ones, except -that the score is normalized. -Positive values exist primarily for compatibility reasons and are not so useful. - -@item skipcmp @var{integer} (@emph{encoding,video}) -Set frame skip compare function. - -Possible values: -@table @samp -@item sad -sum of absolute differences, fast (default) -@item sse -sum of squared errors -@item satd -sum of absolute Hadamard transformed differences -@item dct -sum of absolute DCT transformed differences -@item psnr -sum of squared quantization errors (avoid, low quality) -@item bit -number of bits needed for the block -@item rd -rate distortion optimal, slow -@item zero -0 -@item vsad -sum of absolute vertical differences -@item vsse -sum of squared vertical differences -@item nsse -noise preserving sum of squared differences -@item w53 -5/3 wavelet, only used in snow -@item w97 -9/7 wavelet, only used in snow -@item dctmax - -@item chroma - -@end table - @item mblmin @var{integer} (@emph{encoding,video}) Set min macroblock lagrange factor (VBR). @item mblmax @var{integer} (@emph{encoding,video}) Set max macroblock lagrange factor (VBR). -@item mepc @var{integer} (@emph{encoding,video}) -Set motion estimation bitrate penalty compensation (1.0 = 256). - @item skip_loop_filter @var{integer} (@emph{decoding,video}) @item skip_idct @var{integer} (@emph{decoding,video}) @item skip_frame @var{integer} (@emph{decoding,video}) @@ -835,31 +749,17 @@ Default value is @samp{default}. @item bidir_refine @var{integer} (@emph{encoding,video}) Refine the two motion vectors used in bidirectional macroblocks. -@item brd_scale @var{integer} (@emph{encoding,video}) -Downscale frames for dynamic B-frame decision. - @item keyint_min @var{integer} (@emph{encoding,video}) Set minimum interval between IDR-frames. @item refs @var{integer} (@emph{encoding,video}) Set reference frames to consider for motion compensation. -@item chromaoffset @var{integer} (@emph{encoding,video}) -Set chroma qp offset from luma. - @item trellis @var{integer} (@emph{encoding,audio,video}) Set rate-distortion optimal quantization. @item mv0_threshold @var{integer} (@emph{encoding,video}) -@item b_sensitivity @var{integer} (@emph{encoding,video}) -Adjust sensitivity of b_frame_strategy 1. - @item compression_level @var{integer} (@emph{encoding,audio,video}) -@item min_prediction_order @var{integer} (@emph{encoding,audio}) -@item max_prediction_order @var{integer} (@emph{encoding,audio}) -@item timecode_frame_start @var{integer} (@emph{encoding,video}) -Set GOP timecode frame start number, in non drop frame format. - @item bits_per_raw_sample @var{integer} @item channel_layout @var{integer} (@emph{decoding/encoding,audio}) diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index ecdd46cac3..7c7a35c002 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -557,32 +557,6 @@ static av_cold int alac_encode_init(AVCodecContext *avctx) AV_WB8(alac_extradata+20, s->rc.k_modifier); } -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->min_prediction_order >= 0) { - if (avctx->min_prediction_order < MIN_LPC_ORDER || - avctx->min_prediction_order > ALAC_MAX_LPC_ORDER) { - av_log(avctx, AV_LOG_ERROR, "invalid min prediction order: %d\n", - avctx->min_prediction_order); - return AVERROR(EINVAL); - } - - s->min_prediction_order = avctx->min_prediction_order; - } - - if (avctx->max_prediction_order >= 0) { - if (avctx->max_prediction_order < MIN_LPC_ORDER || - avctx->max_prediction_order > ALAC_MAX_LPC_ORDER) { - av_log(avctx, AV_LOG_ERROR, "invalid max prediction order: %d\n", - avctx->max_prediction_order); - return AVERROR(EINVAL); - } - - s->max_prediction_order = avctx->max_prediction_order; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->max_prediction_order < s->min_prediction_order) { av_log(avctx, AV_LOG_ERROR, "invalid prediction orders: min=%d max=%d\n", diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index b468ee7c6f..696025ceda 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -804,12 +804,6 @@ typedef struct AVCodecContext { */ float b_quant_factor; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int b_frame_strategy; -#endif - /** * qscale offset between IP and B-frames * - encoding: Set by user. @@ -825,12 +819,6 @@ typedef struct AVCodecContext { */ int has_b_frames; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int mpeg_quant; -#endif - /** * qscale factor between P- and I-frames * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset). @@ -889,15 +877,6 @@ typedef struct AVCodecContext { */ int slice_count; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int prediction_method; -#define FF_PRED_LEFT 0 -#define FF_PRED_PLANE 1 -#define FF_PRED_MEDIAN 2 -#endif - /** * slice offsets in the frame in bytes * - encoding: Set/allocated by libavcodec. @@ -970,12 +949,6 @@ typedef struct AVCodecContext { */ int last_predictor_count; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int pre_me; -#endif - /** * motion estimation prepass comparison function * - encoding: Set by user. @@ -1044,16 +1017,6 @@ typedef struct AVCodecContext { */ uint16_t *inter_matrix; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int scenechange_threshold; - - /** @deprecated use encoder private options instead */ - attribute_deprecated - int noise_reduction; -#endif - /** * precision of the intra DC coefficient - 8 * - encoding: Set by user. @@ -1089,26 +1052,12 @@ typedef struct AVCodecContext { */ int mb_lmax; -#if FF_API_PRIVATE_OPT - /** - * @deprecated use encoder private options instead - */ - attribute_deprecated - int me_penalty_compensation; -#endif - /** * - encoding: Set by user. * - decoding: unused */ int bidir_refine; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int brd_scale; -#endif - /** * minimum GOP size * - encoding: Set by user. @@ -1123,12 +1072,6 @@ typedef struct AVCodecContext { */ int refs; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int chromaoffset; -#endif - /** * Note: Value depends upon the compare function used for fullpel ME. * - encoding: Set by user. @@ -1136,12 +1079,6 @@ typedef struct AVCodecContext { */ int mv0_threshold; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int b_sensitivity; -#endif - /** * Chromaticity coordinates of the source primaries. * - encoding: Set by user @@ -1443,30 +1380,6 @@ typedef struct AVCodecContext { */ int rc_initial_buffer_occupancy; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int context_model; -#endif - -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int frame_skip_threshold; - - /** @deprecated use encoder private options instead */ - attribute_deprecated - int frame_skip_factor; - - /** @deprecated use encoder private options instead */ - attribute_deprecated - int frame_skip_exp; - - /** @deprecated use encoder private options instead */ - attribute_deprecated - int frame_skip_cmp; -#endif /* FF_API_PRIVATE_OPT */ - /** * trellis RD quantization * - encoding: Set by user. @@ -1474,20 +1387,6 @@ typedef struct AVCodecContext { */ int trellis; -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int min_prediction_order; - - /** @deprecated use encoder private options instead */ - attribute_deprecated - int max_prediction_order; - - /** @deprecated use encoder private options instead */ - attribute_deprecated - int64_t timecode_frame_start; -#endif - #if FF_API_RTP_CALLBACK /** * @deprecated unused @@ -1502,17 +1401,6 @@ typedef struct AVCodecContext { void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); #endif -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int rtp_payload_size; /* The size of the RTP payload: the coder will */ - /* do its best to deliver a chunk with size */ - /* below rtp_payload_size, the chunk will start */ - /* with a start code on some codecs like H.263. */ - /* This doesn't take account of any particular */ - /* headers inside the transmitted RTP payload. */ -#endif - /** * pass1 encoding statistics output buffer * - encoding: Set by libavcodec. diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index de28ac44f1..b610d5d65e 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -696,16 +696,6 @@ static av_cold int encode_init(AVCodecContext *avctx) s->ac = AC_RANGE_CUSTOM_TAB; } } -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->context_model) - s->context_model = avctx->context_model; - if (avctx->context_model > 1U) { - av_log(avctx, AV_LOG_ERROR, "Invalid context model %d, valid values are 0 and 1\n", avctx->context_model); - return AVERROR(EINVAL); - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (s->ac == AC_RANGE_CUSTOM_TAB) { for (i = 1; i < 256; i++) diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 38571ec9c9..9460b1afc8 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -339,42 +339,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) if (s->options.max_partition_order < 0) s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level]; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->min_prediction_order >= 0) { - if (s->options.lpc_type == FF_LPC_TYPE_FIXED) { - if (avctx->min_prediction_order > MAX_FIXED_ORDER) { - av_log(avctx, AV_LOG_WARNING, - "invalid min prediction order %d, clamped to %d\n", - avctx->min_prediction_order, MAX_FIXED_ORDER); - avctx->min_prediction_order = MAX_FIXED_ORDER; - } - } else if (avctx->min_prediction_order < MIN_LPC_ORDER || - avctx->min_prediction_order > MAX_LPC_ORDER) { - av_log(avctx, AV_LOG_ERROR, "invalid min prediction order: %d\n", - avctx->min_prediction_order); - return AVERROR(EINVAL); - } - s->options.min_prediction_order = avctx->min_prediction_order; - } - if (avctx->max_prediction_order >= 0) { - if (s->options.lpc_type == FF_LPC_TYPE_FIXED) { - if (avctx->max_prediction_order > MAX_FIXED_ORDER) { - av_log(avctx, AV_LOG_WARNING, - "invalid max prediction order %d, clamped to %d\n", - avctx->max_prediction_order, MAX_FIXED_ORDER); - avctx->max_prediction_order = MAX_FIXED_ORDER; - } - } else if (avctx->max_prediction_order < MIN_LPC_ORDER || - avctx->max_prediction_order > MAX_LPC_ORDER) { - av_log(avctx, AV_LOG_ERROR, "invalid max prediction order: %d\n", - avctx->max_prediction_order); - return AVERROR(EINVAL); - } - s->options.max_prediction_order = avctx->max_prediction_order; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (s->options.lpc_type == FF_LPC_TYPE_NONE) { s->options.min_prediction_order = 0; s->options.max_prediction_order = 0; diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index 2882433db5..218e57600d 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -227,12 +227,6 @@ FF_DISABLE_DEPRECATION_WARNINGS avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; FF_ENABLE_DEPRECATION_WARNINGS -#endif -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->context_model == 1) - s->context = avctx->context_model; -FF_ENABLE_DEPRECATION_WARNINGS #endif s->bps = desc->comp[0].depth; @@ -309,12 +303,6 @@ FF_ENABLE_DEPRECATION_WARNINGS avctx->bits_per_coded_sample = s->bitstream_bpp; s->decorrelate = s->bitstream_bpp >= 24 && !s->yuv && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR); -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->prediction_method) - s->predictor = avctx->prediction_method; -FF_ENABLE_DEPRECATION_WARNINGS -#endif s->interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_ME ? 1 : 0; if (s->context) { if (s->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) { @@ -332,20 +320,6 @@ FF_ENABLE_DEPRECATION_WARNINGS "vcodec=ffvhuff or format=422p\n"); return AVERROR(EINVAL); } -#if FF_API_PRIVATE_OPT - if (s->context) { - av_log(avctx, AV_LOG_ERROR, - "Error: per-frame huffman tables are not supported " - "by huffyuv; use vcodec=ffvhuff\n"); - return AVERROR(EINVAL); - } - if (s->version > 2) { - av_log(avctx, AV_LOG_ERROR, - "Error: ver>2 is not supported " - "by huffyuv; use vcodec=ffvhuff\n"); - return AVERROR(EINVAL); - } -#endif if (s->interlaced != ( s->height > 288 )) av_log(avctx, AV_LOG_INFO, "using huffyuv 2.2.0 or newer interlacing flag\n"); diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index e3c5a32188..40ba965cdb 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -1727,13 +1727,6 @@ static av_cold int j2kenc_init(AVCodecContext *avctx) s->compression_rate_enc = 0; } -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->prediction_method) - s->pred = avctx->prediction_method; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && (s->pred != FF_DWT97_INT || s->format != CODEC_JP2)) { av_log(s->avctx, AV_LOG_WARNING, "Forcing lossless jp2 for pal8\n"); s->pred = FF_DWT97_INT; diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index d03ce32f41..0f109c1304 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -282,13 +282,6 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, int i, size, ret; int comps; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->prediction_method) - ctx->pred = avctx->prediction_method; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (avctx->pix_fmt == AV_PIX_FMT_GRAY8 || avctx->pix_fmt == AV_PIX_FMT_GRAY16) comps = 1; diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 3f36943c12..76013a74d3 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -921,12 +921,6 @@ static av_cold int vpx_init(AVCodecContext *avctx, } } -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->frame_skip_threshold) - ctx->drop_threshold = avctx->frame_skip_threshold; -FF_ENABLE_DEPRECATION_WARNINGS -#endif enccfg.rc_dropframe_thresh = ctx->drop_threshold; //0-100 (0 => CBR, 100 => VBR) @@ -1066,12 +1060,6 @@ FF_ENABLE_DEPRECATION_WARNINGS codecctl_int(avctx, VP8E_SET_SHARPNESS, ctx->sharpness); if (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == AV_CODEC_ID_VP8) { -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->noise_reduction) - ctx->noise_sensitivity = avctx->noise_reduction; -FF_ENABLE_DEPRECATION_WARNINGS -#endif codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, ctx->noise_sensitivity); codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->slices)); } diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 6d945fc3fb..4e7097e569 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -680,12 +680,6 @@ static av_cold int X264_init(AVCodecContext *avctx) if (avctx->b_quant_factor > 0) x4->params.rc.f_pb_factor = avctx->b_quant_factor; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->chromaoffset) - x4->chroma_offset = avctx->chromaoffset; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (x4->chroma_offset) x4->params.analyse.i_chroma_qp_offset = x4->chroma_offset; @@ -694,12 +688,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if (avctx->max_b_frames >= 0) x4->params.i_bframe = avctx->max_b_frames; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->scenechange_threshold >= 0) - x4->scenechange_threshold = avctx->scenechange_threshold; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (x4->scenechange_threshold >= 0) x4->params.i_scenecut_threshold = x4->scenechange_threshold; @@ -729,22 +717,10 @@ FF_ENABLE_DEPRECATION_WARNINGS x4->params.analyse.i_trellis = avctx->trellis; if (avctx->me_range >= 0) x4->params.analyse.i_me_range = avctx->me_range; -#if FF_API_PRIVATE_OPT - FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->noise_reduction >= 0) - x4->noise_reduction = avctx->noise_reduction; - FF_ENABLE_DEPRECATION_WARNINGS -#endif if (x4->noise_reduction >= 0) x4->params.analyse.i_noise_reduction = x4->noise_reduction; if (avctx->me_subpel_quality >= 0) x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->b_frame_strategy >= 0) - x4->b_frame_strategy = avctx->b_frame_strategy; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (avctx->keyint_min >= 0) x4->params.i_keyint_min = avctx->keyint_min; if (avctx->me_cmp >= 0) @@ -1155,18 +1131,9 @@ static const AVCodecDefault x264_defaults[] = { { "qcomp", "-1" }, // { "rc_lookahead", "-1" }, { "refs", "-1" }, -#if FF_API_PRIVATE_OPT - { "sc_threshold", "-1" }, -#endif { "trellis", "-1" }, -#if FF_API_PRIVATE_OPT - { "nr", "-1" }, -#endif { "me_range", "-1" }, { "subq", "-1" }, -#if FF_API_PRIVATE_OPT - { "b_strategy", "-1" }, -#endif { "keyint_min", "-1" }, { "cmp", "-1" }, { "threads", AV_STRINGIFY(X264_THREADS_AUTO) }, diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index a83b93b836..0f22016731 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -288,13 +288,6 @@ static av_cold int XAVS_init(AVCodecContext *avctx) /* cabac is not included in AVS JiZhun Profile */ x4->params.b_cabac = 0; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->b_frame_strategy) - x4->b_frame_strategy = avctx->b_frame_strategy; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - x4->params.i_bframe_adaptive = x4->b_frame_strategy; avctx->has_b_frames = !!avctx->max_b_frames; @@ -305,13 +298,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if (x4->params.i_keyint_min > x4->params.i_keyint_max) x4->params.i_keyint_min = x4->params.i_keyint_max; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->scenechange_threshold) - x4->scenechange_threshold = avctx->scenechange_threshold; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - x4->params.i_scenecut_threshold = x4->scenechange_threshold; // x4->params.b_deblocking_filter = avctx->flags & AV_CODEC_FLAG_LOOP_FILTER; @@ -343,13 +329,6 @@ FF_ENABLE_DEPRECATION_WARNINGS x4->params.analyse.i_trellis = avctx->trellis; -#if FF_API_PRIVATE_OPT - FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->noise_reduction >= 0) - x4->noise_reduction = avctx->noise_reduction; - FF_ENABLE_DEPRECATION_WARNINGS -#endif - x4->params.analyse.i_noise_reduction = x4->noise_reduction; if (avctx->level > 0) @@ -371,13 +350,6 @@ FF_ENABLE_DEPRECATION_WARNINGS x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); x4->params.rc.f_pb_factor = avctx->b_quant_factor; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->chromaoffset) - x4->chroma_offset = avctx->chromaoffset; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - x4->params.analyse.i_chroma_qp_offset = x4->chroma_offset; x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR; diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index cb9135436a..22582680a0 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -617,13 +617,6 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) x->intra_matrix = x->inter_matrix = NULL; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->mpeg_quant) - x->mpeg_quant = avctx->mpeg_quant; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (x->mpeg_quant) x->vol_flags |= XVID_VOL_MPEGQUANT; if ((avctx->intra_matrix || avctx->inter_matrix)) { diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index 74a2cdcc46..9a107e85ce 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -72,13 +72,6 @@ static int ljpeg_encode_bgr(AVCodecContext *avctx, PutBitContext *pb, int left[4], top[4], topleft[4]; int x, y, i; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->prediction_method) - s->pred = avctx->prediction_method + 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - for (i = 0; i < 4; i++) buffer[0][i] = 1 << (9 - 1); @@ -203,13 +196,6 @@ static int ljpeg_encode_yuv(AVCodecContext *avctx, PutBitContext *pb, const int mb_height = (avctx->height + s->vsample[0] - 1) / s->vsample[0]; int mb_x, mb_y; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->prediction_method) - s->pred = avctx->prediction_method + 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - for (mb_y = 0; mb_y < mb_height; mb_y++) { if (put_bytes_left(pb, 0) < mb_width * 4 * 3 * s->hsample[0] * s->vsample[0]) { diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 2d2b7517ad..c4d89e10ce 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -49,7 +49,6 @@ #include "mpegvideodata.h" #include "profiles.h" #include "thread.h" -#include "version.h" #include "xvmc_internal.h" #define A53_MAX_CC_COUNT 2000 @@ -2440,12 +2439,6 @@ static void mpeg_decode_gop(AVCodecContext *avctx, tc = s-> timecode_frame_start = get_bits(&s->gb, 25); -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - avctx->timecode_frame_start = tc; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - s->closed_gop = get_bits1(&s->gb); /* broken_link indicates that after editing the * reference frames of the first B-Frames after GOP I-Frame diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index dccb11b222..fd3e7de94a 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -220,13 +220,6 @@ static av_cold int encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->timecode_frame_start) - s->timecode_frame_start = avctx->timecode_frame_start; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->tc_opt_str) { AVRational rate = ff_mpeg12_frame_rate_tab[s->frame_rate_index]; int ret = av_timecode_init_from_string(&s->tc, rate, s->tc_opt_str, s); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index e1864f2afb..f0490a39cc 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -325,17 +325,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample = av_clip(avctx->bits_per_raw_sample, 0, 8); -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->rtp_payload_size) - s->rtp_payload_size = avctx->rtp_payload_size; - if (avctx->me_penalty_compensation) - s->me_penalty_compensation = avctx->me_penalty_compensation; - if (avctx->pre_me) - s->me_pre = avctx->pre_me; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - s->bit_rate = avctx->bit_rate; s->width = avctx->width; s->height = avctx->height; @@ -561,20 +550,6 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR(EINVAL); } -#if FF_API_PRIVATE_OPT - FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->mpeg_quant) - s->mpeg_quant = 1; - FF_ENABLE_DEPRECATION_WARNINGS - - if (s->mpeg_quant && ( s->codec_id != AV_CODEC_ID_MPEG4 - && s->codec_id != AV_CODEC_ID_MPEG2VIDEO)) { - av_log(avctx, AV_LOG_ERROR, - "mpeg2 style quantization not supported by codec\n"); - return AVERROR(EINVAL); - } -#endif - if ((s->mpv_flags & FF_MPV_FLAG_CBP_RD) && !avctx->trellis) { av_log(avctx, AV_LOG_ERROR, "CBP RD needs trellis quant\n"); return AVERROR(EINVAL); @@ -595,13 +570,6 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR(EINVAL); } -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->scenechange_threshold) - s->scenechange_threshold = avctx->scenechange_threshold; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->scenechange_threshold < 1000000000 && (avctx->flags & AV_CODEC_FLAG_CLOSED_GOP)) { av_log(avctx, AV_LOG_ERROR, @@ -657,15 +625,6 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR_PATCHWELCOME; } -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->b_frame_strategy) - s->b_frame_strategy = avctx->b_frame_strategy; - if (avctx->b_sensitivity != 40) - s->b_sensitivity = avctx->b_sensitivity; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->b_frame_strategy && (avctx->flags & AV_CODEC_FLAG_PASS2)) { av_log(avctx, AV_LOG_INFO, "notice: b_frame_strategy only affects the first pass\n"); @@ -855,13 +814,6 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR(EINVAL); } -#if FF_API_PRIVATE_OPT - FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->noise_reduction) - s->noise_reduction = avctx->noise_reduction; - FF_ENABLE_DEPRECATION_WARNINGS -#endif - avctx->has_b_frames = !s->low_delay; s->encoding = 1; @@ -918,19 +870,6 @@ FF_ENABLE_DEPRECATION_WARNINGS s->quant_precision = 5; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->frame_skip_threshold) - s->frame_skip_threshold = avctx->frame_skip_threshold; - if (avctx->frame_skip_factor) - s->frame_skip_factor = avctx->frame_skip_factor; - if (avctx->frame_skip_exp) - s->frame_skip_exp = avctx->frame_skip_exp; - if (avctx->frame_skip_cmp != FF_CMP_DCTMAX) - s->frame_skip_cmp = avctx->frame_skip_cmp; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp); ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp); @@ -983,16 +922,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if ((ret = ff_rate_control_init(s)) < 0) return ret; -#if FF_API_PRIVATE_OPT - FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->brd_scale) - s->brd_scale = avctx->brd_scale; - - if (avctx->prediction_method) - s->pred = avctx->prediction_method + 1; - FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->b_frame_strategy == 2) { for (i = 0; i < s->max_b_frames + 2; i++) { s->tmp_frames[i] = av_frame_alloc(); diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 9b77428a50..313150eb73 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -101,10 +101,6 @@ static const AVOption avcodec_options[] = { {"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E}, {"bf", "set maximum number of B-frames between non-B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E}, {"b_qfactor", "QP factor between P- and B-frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, -#if FF_API_PRIVATE_OPT -{"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, V|E}, -{"ps", "RTP payload size in bytes", OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif {"codec_tag", NULL, OFFSET(codec_tag), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"bug", "work around not autodetected encoder bugs", OFFSET(workaround_bugs), AV_OPT_TYPE_FLAGS, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, {"autodetect", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, @@ -140,9 +136,6 @@ static const AVOption avcodec_options[] = { {"aggressive", "consider things that a sane encoder should not do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | AV_EF_CAREFUL}, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"}, {"has_b_frames", NULL, OFFSET(has_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, {"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, -#if FF_API_PRIVATE_OPT -{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif {"rc_override_count", NULL, OFFSET(rc_override_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"maxrate", "maximum bitrate (in bits/s). Used for VBV together with bufsize.", OFFSET(rc_max_rate), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT_MAX, V|A|E}, {"minrate", "minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.", @@ -183,12 +176,6 @@ static const AVOption avcodec_options[] = { {"deblock", "use strong deblock filter for damaged MBs", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_DEBLOCK }, INT_MIN, INT_MAX, V|D, "ec"}, {"favor_inter", "favor predicting from the previous frame", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_FAVOR_INTER }, INT_MIN, INT_MAX, V|D, "ec"}, {"bits_per_coded_sample", NULL, OFFSET(bits_per_coded_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, -#if FF_API_PRIVATE_OPT -{"pred", "prediction method", OFFSET(prediction_method), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "pred"}, -{"left", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_LEFT }, INT_MIN, INT_MAX, V|E, "pred"}, -{"plane", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_PLANE }, INT_MIN, INT_MAX, V|E, "pred"}, -{"median", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"}, -#endif {"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, {"sar", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, {"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"}, @@ -209,27 +196,15 @@ static const AVOption avcodec_options[] = { {"nomc", "skip motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_NOMC }, INT_MIN, INT_MAX, V|A|D, "debug"}, {"dia_size", "diamond type & size for motion estimation", OFFSET(dia_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"last_pred", "amount of motion predictors from the previous frame", OFFSET(last_predictor_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#if FF_API_PRIVATE_OPT -{"preme", "pre motion estimation", OFFSET(pre_me), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif {"pre_dia_size", "diamond type & size for motion estimation pre-pass", OFFSET(pre_dia_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"subq", "sub-pel motion estimation quality", OFFSET(me_subpel_quality), AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E}, {"me_range", "limit motion vectors range (1023 for DivX player)", OFFSET(me_range), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, -#if FF_API_PRIVATE_OPT -{"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif {"slice_flags", NULL, OFFSET(slice_flags), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 2, V|E, "mbd"}, {"simple", "use mbcmp", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"}, {"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"}, {"rd", "use best rate distortion", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"}, -#if FF_API_PRIVATE_OPT -{"sc_threshold", "scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif -#if FF_API_PRIVATE_OPT -{"nr", "noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif {"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, {"threads", "set the number of threads", OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, V|A|E|D, "threads"}, {"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"}, @@ -243,12 +218,6 @@ static const AVOption avcodec_options[] = { {"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.level"}, {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.level"}, {"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D}, -#if FF_API_PRIVATE_OPT -{"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skipcmp", "frame skip compare function", OFFSET(frame_skip_cmp), AV_OPT_TYPE_INT, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -#endif {"cmp", "full-pel ME compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"subcmp", "sub-pel ME compare function", OFFSET(me_sub_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"mbcmp", "macroblock compare function", OFFSET(mb_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, @@ -274,9 +243,6 @@ static const AVOption avcodec_options[] = { {"msad", "sum of absolute differences, median predicted", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_MEDIAN_SAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"mblmin", "minimum macroblock Lagrange factor (VBR)", OFFSET(mb_lmin), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 2 }, 1, FF_LAMBDA_MAX, V|E}, {"mblmax", "maximum macroblock Lagrange factor (VBR)", OFFSET(mb_lmax), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 31 }, 1, FF_LAMBDA_MAX, V|E}, -#if FF_API_PRIVATE_OPT -{"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, V|E}, -#endif {"skip_loop_filter", "skip loop filtering process for the selected frames", OFFSET(skip_loop_filter), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"skip_idct" , "skip IDCT/dequantization for the selected frames", OFFSET(skip_idct), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"skip_frame" , "skip decoding for the selected frames", OFFSET(skip_frame), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, @@ -288,25 +254,11 @@ static const AVOption avcodec_options[] = { {"nointra" , "discard all frames except I frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA}, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"all" , "discard all frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E}, -#if FF_API_PRIVATE_OPT -{"brd_scale", "downscale frames for dynamic B-frame decision", OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 10, V|E}, -#endif {"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E}, {"refs", "reference frames to consider for motion compensation", OFFSET(refs), AV_OPT_TYPE_INT, {.i64 = 1 }, INT_MIN, INT_MAX, V|E}, -#if FF_API_PRIVATE_OPT -{"chromaoffset", "chroma QP offset from luma", OFFSET(chromaoffset), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif {"trellis", "rate-distortion optimal quantization", OFFSET(trellis), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, {"mv0_threshold", NULL, OFFSET(mv0_threshold), AV_OPT_TYPE_INT, {.i64 = 256 }, 0, INT_MAX, V|E}, -#if FF_API_PRIVATE_OPT -{"b_sensitivity", "adjust sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, V|E}, -#endif {"compression_level", NULL, OFFSET(compression_level), AV_OPT_TYPE_INT, {.i64 = FF_COMPRESSION_DEFAULT }, INT_MIN, INT_MAX, V|A|E}, -#if FF_API_PRIVATE_OPT -{"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, -{"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, -{"timecode_frame_start", "GOP timecode frame start number, in non-drop-frame format", OFFSET(timecode_frame_start), AV_OPT_TYPE_INT64, {.i64 = -1 }, -1, INT64_MAX, V|E}, -#endif {"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, {"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|E|D, "channel_layout"}, {"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|D, "request_channel_layout"}, diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index eebb164440..e2636b7daf 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -1017,15 +1017,6 @@ FF_ENABLE_DEPRECATION_WARNINGS ff_llvidencdsp_init(&s->llvidencdsp); -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->prediction_method) - s->filter_type = av_clip(avctx->prediction_method, - PNG_FILTER_VALUE_NONE, - PNG_FILTER_VALUE_MIXED); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (avctx->pix_fmt == AV_PIX_FMT_MONOBLACK) s->filter_type = PNG_FILTER_VALUE_NONE; diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index d30c289fce..6281e63a54 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -716,12 +716,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) q->extco2.LookAheadDS = q->look_ahead_downsampling; q->extco2.RepeatPPS = q->repeat_pps ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->b_frame_strategy >= 0) - q->b_strategy = avctx->b_frame_strategy; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (q->b_strategy >= 0) q->extco2.BRefType = q->b_strategy ? MFX_B_REF_PYRAMID : MFX_B_REF_OFF; if (q->adaptive_i >= 0) diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index df70f30271..06b49c46ee 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -171,9 +171,6 @@ static const AVCodecDefault qsv_enc_defaults[] = { { "qmax", "-1" }, { "trellis", "-1" }, { "flags", "+cgop" }, -#if FF_API_PRIVATE_OPT - { "b_strategy", "-1" }, -#endif { NULL }, }; diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index 347f30655e..fc10459628 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -267,9 +267,6 @@ static const AVCodecDefault qsv_enc_defaults[] = { { "qmax", "-1" }, { "trellis", "-1" }, { "flags", "+cgop" }, -#if FF_API_PRIVATE_OPT - { "b_strategy", "-1" }, -#endif { NULL }, }; diff --git a/libavcodec/qsvenc_mpeg2.c b/libavcodec/qsvenc_mpeg2.c index 0e34bb75dc..538b937f74 100644 --- a/libavcodec/qsvenc_mpeg2.c +++ b/libavcodec/qsvenc_mpeg2.c @@ -89,9 +89,6 @@ static const AVCodecDefault qsv_enc_defaults[] = { { "bf", "3" }, { "trellis", "-1" }, { "flags", "+cgop" }, -#if FF_API_PRIVATE_OPT - { "b_strategy", "-1" }, -#endif { NULL }, }; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 1c1080ac76..fc0e5230a9 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -41,13 +41,6 @@ static av_cold int encode_init(AVCodecContext *avctx) int plane_index, ret; int i; -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->prediction_method) - s->pred = avctx->prediction_method; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if(s->pred == DWT_97 && (avctx->flags & AV_CODEC_FLAG_QSCALE) && avctx->global_quality == 0){ @@ -1759,13 +1752,6 @@ redo_frame: } predict_plane(s, s->spatial_idwt_buffer, plane_index, 0); -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - if(s->avctx->scenechange_threshold) - s->scenechange_threshold = s->avctx->scenechange_threshold; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if( plane_index==0 && pic->pict_type == AV_PICTURE_TYPE_P && !(avctx->flags&AV_CODEC_FLAG_PASS2) diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index 32c204a898..8c8a9535a1 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -43,12 +43,6 @@ typedef struct HuffEntry { uint32_t code; } HuffEntry; -#if FF_API_PRIVATE_OPT -static const int ut_pred_order[5] = { - PRED_LEFT, PRED_MEDIAN, PRED_MEDIAN, PRED_NONE, PRED_GRADIENT -}; -#endif - /* Compare huffman tree nodes */ static int ut_huff_cmp_len(const void *a, const void *b) { @@ -140,28 +134,6 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) ff_bswapdsp_init(&c->bdsp); ff_llvidencdsp_init(&c->llvidencdsp); -#if FF_API_PRIVATE_OPT -FF_DISABLE_DEPRECATION_WARNINGS - /* Check the prediction method, and error out if unsupported */ - if (avctx->prediction_method < 0 || avctx->prediction_method > 4) { - av_log(avctx, AV_LOG_WARNING, - "Prediction method %d is not supported in Ut Video.\n", - avctx->prediction_method); - return AVERROR_OPTION_NOT_FOUND; - } - - if (avctx->prediction_method == FF_PRED_PLANE) { - av_log(avctx, AV_LOG_ERROR, - "Plane prediction is not supported in Ut Video.\n"); - return AVERROR_OPTION_NOT_FOUND; - } - - /* Convert from libavcodec prediction type to Ut Video's */ - if (avctx->prediction_method) - c->frame_pred = ut_pred_order[avctx->prediction_method]; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (c->frame_pred == PRED_GRADIENT) { av_log(avctx, AV_LOG_ERROR, "Gradient prediction is not supported.\n"); return AVERROR_OPTION_NOT_FOUND; diff --git a/libavcodec/version.h b/libavcodec/version.h index 5e122847ac..2cca9839e2 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -66,9 +66,6 @@ #ifndef FF_API_VBV_DELAY #define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_PRIVATE_OPT -#define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_ASS_TIMING #define FF_API_ASS_TIMING (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27073 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp568939iob; Mon, 19 Apr 2021 07:27:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy43k46oXgcnP6z5Em5MK5ufmmXBxyJ1D6R7nEeyY8SUThotoLNsNUaXrgKL8MnrRhL0CCT X-Received: by 2002:a17:906:86da:: with SMTP id j26mr16373181ejy.187.1618842447119; Mon, 19 Apr 2021 07:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842447; cv=none; d=google.com; s=arc-20160816; b=B53jzsMcqa1pkMsXoPRd94N/mOFEyvmKf7T3gPuHp9CghU/QGpprzqKexSijEN+my9 hM5Bz97oPe9Fn+4SA5LYPMYbFskc/9WgNEMKJWe43bB5oNzB8Uqsh8o3fJyHJ0c2U2cL 44IFcwhtNQgTrqRY7nmz/UimbycYWWRp4tS3aCEFzW43fhk7/42q+qyIN+Yk/o8A72hX JVaYUQLjbFwtajstZsSUECC9xbn7gUArDfHLZeMy3lxdwSmbUImrbQxo6agIqxh6qbrv m4ub8ewHGnh+r2sDl3Jm7OueGBJwSjxJ3LbAOasgcEHfCOVMNcgwvDJJ4b7x56W8ne+S 90Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=e73oLuocGfpiCeEh9Zr6BnH/UP4Eyr84MVSaylcF5Ug=; b=p/sBH73gvTO+oemd4boF6AXcT8WNoHrz9FOKh2DTGyxMLfwwkJWgeJDoOa0TenDXsz Pqjrw6uRQJfIu3yzSiav3CbcQTzrIkGPDhZaRJ71b3qaAAp0Cba+Ko+6R/7kuNOjXs56 fXRvRaXEfGShsMaxjT3TkQwQSW8+nFOUxLYBpSAL7Wmq2psZZMMlQwC1i3E56tY1QStO x9VyD71S4kSkSUN77Yke7wpQryRY2SOrkcDzkb4KYizTNb1NO27L4dCeqGeruxv3SHN/ WzL3rZCq2DxL8grvIyBDKudUoJaump9v6sZsb9blzCjYFGREeG4IxPFr3LIxS99qS9uw 8Bhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=hKPurEuY; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id di10si7754093edb.378.2021.04.19.07.27.26; Mon, 19 Apr 2021 07:27:27 -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=@gmail.com header.s=20161025 header.b=hKPurEuY; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D5E968A27E; Mon, 19 Apr 2021 17:18:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 580C568A202 for ; Mon, 19 Apr 2021 17:18:04 +0300 (EEST) Received: by mail-qk1-f176.google.com with SMTP id t17so7404431qkg.4 for ; Mon, 19 Apr 2021 07:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/F2r3kklO+lecZcbVv0hQsEI+EbY/fkdbR9LHl+7bY8=; b=hKPurEuYP3N45M4WUZ8ZrLjYAdhL9iz0KP8tdpokKwOCHyDrfwrKteYwU7MRwdQx5O PStT07isrTUx2ehJfBlK0nY9dRjNvLdX9CVeJ742CQ4rOi6C0IITONGvBvYzXltiN9pe uLTTJ49u2KDnOR40k+851ZM8Owt8em8osVMJhVQEUEmzla9gZPgSoJ+JBefElyh1SCfd guDX+IkB38L2lZVEJEkMqbK56FCbpJ/lCO84HQmsFiZUMaKm+LLTzKdOcC2IB4krwQwU Yexmj/ooQ2uX+GuI7dLMr2YYZj5rRJWb9jIq/KkcfpBmBrCEik89lgVP3riXlfwHn68a PDhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/F2r3kklO+lecZcbVv0hQsEI+EbY/fkdbR9LHl+7bY8=; b=DFQpJueTRmSsJEPEX0eAlWZHXLp/UoaSVJ7XythtjTqjZ3prS24GgXoY1cIFDVzLjK nomoO512VSG5BTjixpHXsL2xEgKvsh+iD1GR0G87YtnyqTbYEbORpEMOimA6vx2SQZLF qBXXtQrIRADm8LioVXLgwcMu2W1U0oYUnnS3rVpwXQeN8x5z+/KsALFHF/6x3Ui2ah3A V/f29/d1B2XLyPLqO63XiTy8N3arWEOkDeTb0K5cFPvE0cX7XXE8E5sO4gwp8/mMpr43 14o1DZuBjD0SM1mCyP8WcUeIXaDl2NmR2SbbCR82fGW8i1r+MHDkqh4FM5DRyPsauh0X /Cjg== X-Gm-Message-State: AOAM5339mXM7f6PnJiHObu54jo23qahCWOHGIOFFnFlm8otWk214X2GW s8u4UU3ZeAWcjwI91XwSJwn4kbLvPTs= X-Received: by 2002:a05:620a:2058:: with SMTP id d24mr3495868qka.469.1618841476023; Mon, 19 Apr 2021 07:11:16 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:15 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:08 -0300 Message-Id: <20210419141024.8174-12-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 11/87] avcodec: Remove unneeded getters and setters 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: bs8Gsxrl7eam From: Andreas Rheinhardt Deprecated in c4131a0613c4b2c30c01b2550b41068815d27799. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 39 --------------------------------------- libavcodec/utils.c | 18 ------------------ libavcodec/version.h | 3 --- 3 files changed, 60 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 696025ceda..612135dba5 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2221,47 +2221,8 @@ typedef struct AVCodecContext { int (*get_encode_buffer)(struct AVCodecContext *s, AVPacket *pkt, int flags); } AVCodecContext; -#if FF_API_CODEC_GET_SET -/** - * Accessors for some AVCodecContext fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -attribute_deprecated -AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); -attribute_deprecated -void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val); - -attribute_deprecated -const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx); -attribute_deprecated -void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc); - -attribute_deprecated -unsigned av_codec_get_codec_properties(const AVCodecContext *avctx); - -attribute_deprecated -int av_codec_get_lowres(const AVCodecContext *avctx); -attribute_deprecated -void av_codec_set_lowres(AVCodecContext *avctx, int val); - -attribute_deprecated -int av_codec_get_seek_preroll(const AVCodecContext *avctx); -attribute_deprecated -void av_codec_set_seek_preroll(AVCodecContext *avctx, int val); - -attribute_deprecated -uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx); -attribute_deprecated -void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val); -#endif - struct AVSubtitle; -#if FF_API_CODEC_GET_SET -attribute_deprecated -int av_codec_get_max_lowres(const AVCodec *codec); -#endif - struct MpegEncContext; /** diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 896b99dc3f..25f69f59c6 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -429,24 +429,6 @@ enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, return AV_PIX_FMT_NONE; } -#if FF_API_CODEC_GET_SET -MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase) -MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor) -MAKE_ACCESSORS(AVCodecContext, codec, int, lowres) -MAKE_ACCESSORS(AVCodecContext, codec, int, seek_preroll) -MAKE_ACCESSORS(AVCodecContext, codec, uint16_t*, chroma_intra_matrix) - -unsigned av_codec_get_codec_properties(const AVCodecContext *codec) -{ - return codec->properties; -} - -int av_codec_get_max_lowres(const AVCodec *codec) -{ - return codec->max_lowres; -} -#endif - int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec){ return !!(codec->caps_internal & FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM); } diff --git a/libavcodec/version.h b/libavcodec/version.h index 2cca9839e2..87d54a4357 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -87,9 +87,6 @@ #ifndef FF_API_GETCHROMA #define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_CODEC_GET_SET -#define FF_API_CODEC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_USER_VISIBLE_AVHWACCEL #define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27067 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp569364iob; Mon, 19 Apr 2021 07:28:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybdWnOQ9k7mFyeV8ye0DNRJ7twVd73zoAkkthaSj+zRm4sR++aaJcUntEP9Y5y9L7HN9Ff X-Received: by 2002:a05:6402:145:: with SMTP id s5mr25900676edu.221.1618842480232; Mon, 19 Apr 2021 07:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842480; cv=none; d=google.com; s=arc-20160816; b=l7C8gXa5xZmb4IBkBAtYOLONuA9L8LeQxDT2iCGCrbfAwJH9e4zMauf4K5ujTLEt3S lN2l3kDa+Jj74y3FZvK4+tseiKE9S8O3DGVqghSQpmuMp7tPkA+EGhSw1r5+zIAyn5xR TPiRUSWplXoCMSdN+46MbeeX1eI+nsvoZ0QM7ABvH4sxLyGAx/O9MAy0hQw5T8kR5O1m uiQEifIXpZurBhU1o6VZpvReWphjAzmIcbnCp/SVqs+A9UFswDinoFd6b3nGmSi7qw7J 0vb+yGk4Rp9Wuc9CufFzg17GYZBnWVkXLIX6lP2W7WngkLqRMzEHc9LFN8jTQHsJf0dQ CcVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=dBVlnVXRShiRkGl7zhH4KhlfpkCpYYugE2Eoz1reqFU=; b=u3+7NRdxdQshHLKSLcODJFF5kxkaiR9TkSbpadW8/eHc13zYtynUtjM9EvegnPE8Zp tg4SBy89psXuhJwke7yPBY08Cor6wrIq28wrgrfKmUSLQjifcmApjBpBF58IKM5wVM5V j2PcZsJ4xYScey71KEDmzIOpL9MIsKcAzJr9WRT26OiBDQ5KUFGs23CxOuDCevY5tUfU d5MLzQdqUNtBlSVam8ggRS3JLVJr2DI/fFf+Zkwfb1omzxOB7a1alXCtMEnvUWBv11m2 BdJhC9INS8i9QD0IMLHhYqFhLp3circZ3blBVd1SwXHh1au65xcXwP/A9F82O4pUIZTz RW9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Z0kMSmZn; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o6si8528788edr.244.2021.04.19.07.27.59; Mon, 19 Apr 2021 07:28: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=@gmail.com header.s=20161025 header.b=Z0kMSmZn; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A54CC68A0E1; Mon, 19 Apr 2021 17:18:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C592D68A2B2 for ; Mon, 19 Apr 2021 17:18:25 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id d19so159736qkk.12 for ; Mon, 19 Apr 2021 07:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=13yIhhMIdlcploWfhCY/8MIBgRO0cyJWckPp2VAn+qE=; b=Z0kMSmZn+3C6BderI1ZvAHe6tmxLLIKHacO5VZnSa2V90r6eYFsdW+sQRscLD0U62P bpvN7CFat6plxWKLDzgohifFLqTDXRAir6o1K5W9FQcr7P4+qTJHLfZOwGPZk11ykeIV zVSGUNo0dYFYxmTNNZ5j09cH8Cjo3yypkH2vva2LmLHDVtjrw4GbvErNFX3+1GPBQFq3 VJwEOcRW/yw4EXG5mKvIFscE4yX/cwWjaCrhW8GqtSVwp4OJwqhY2pgWCCWZsoq3s/0f phUOVQsKrGeu9LE3AHa4iweQ0PKsDVkbmQfrWQ4/cMuRhWocFL0DDEEty1CYMaKmmWyI b/NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=13yIhhMIdlcploWfhCY/8MIBgRO0cyJWckPp2VAn+qE=; b=VkfQUzwOn/1SkVZTLhoEpyzmG+/EgNeNPoeQRUQPhNUp9e+KZ/jmNPlSQXipC5UviI 7zomDUuQqc6p6wPvhMC7mI9098rD//2IUz72Bf4X15GD7Eety5yazYwApQJt+BcxYjht o0KkqQfmt3CjjE9eP2LAKUkBDJq7lK1lGkMq+u1LTY8DT4Jixk/mqDaU/QVJGvk7usQY oEzFWmyw3F8fIKR5LLUHZCyP3T68Ozw9v1c3JbWfieTayGUKehfQnD8pM266ADJ+9mCA 1OfXZMaPKsfzZVLte+ffRUBwXXTpQr4O0JyTEkqKqbZx2LRKUA1xrOrYIXzy1GC7a7vA Vlag== X-Gm-Message-State: AOAM531dthoEl0XIXS0x2TFIFcjELCetJ4FTxUD+LlDFO2zE76VoAuxw x1nDTwNUxGuDWz0p+fhCTz6un4js9qc= X-Received: by 2002:a37:76c2:: with SMTP id r185mr11811702qkc.204.1618841477200; Mon, 19 Apr 2021 07:11:17 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:16 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:09 -0300 Message-Id: <20210419141024.8174-13-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/87] avcodec: Remove deprecated av_codec_get_tag_string 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: g1fDseOTVw7V From: Andreas Rheinhardt Deprecated in f156d35321bb600b2309b78185d600b2fa64d84a. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 16 ---------------- libavcodec/utils.c | 22 ---------------------- libavcodec/version.h | 3 --- 3 files changed, 41 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 612135dba5..0e86064ccb 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3636,22 +3636,6 @@ enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const en * @} */ -#if FF_API_TAG_STRING -/** - * Put a string representing the codec tag codec_tag in buf. - * - * @param buf buffer to place codec tag in - * @param buf_size size in bytes of buf - * @param codec_tag codec tag to assign - * @return the length of the string that would have been generated if - * enough space had been available, excluding the trailing null - * - * @deprecated see av_fourcc_make_string() and av_fourcc2str(). - */ -attribute_deprecated -size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag); -#endif - void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode); /** diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 25f69f59c6..643ea003df 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -453,28 +453,6 @@ const char *avcodec_get_name(enum AVCodecID id) return "unknown_codec"; } -#if FF_API_TAG_STRING -size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag) -{ - int i, len, ret = 0; - -#define TAG_PRINT(x) \ - (((x) >= '0' && (x) <= '9') || \ - ((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || \ - ((x) == '.' || (x) == ' ' || (x) == '-' || (x) == '_')) - - for (i = 0; i < 4; i++) { - len = snprintf(buf, buf_size, - TAG_PRINT(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF); - buf += len; - buf_size = buf_size > len ? buf_size - len : 0; - ret += len; - codec_tag >>= 8; - } - return ret; -} -#endif - const char *av_get_profile_name(const AVCodec *codec, int profile) { const AVProfile *p; diff --git a/libavcodec/version.h b/libavcodec/version.h index 87d54a4357..6d0f0f1d25 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -81,9 +81,6 @@ #ifndef FF_API_STRUCT_VAAPI_CONTEXT #define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_TAG_STRING -#define FF_API_TAG_STRING (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_GETCHROMA #define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27068 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp568511iob; Mon, 19 Apr 2021 07:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1a5MejBeYGMy6oYLm/TowafrkF/RJfVj+8DG3kmQQXxgGj6TN1fnqzgcF0lW1lJ2yFS5G X-Received: by 2002:a05:6402:2552:: with SMTP id l18mr25628628edb.71.1618842410841; Mon, 19 Apr 2021 07:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842410; cv=none; d=google.com; s=arc-20160816; b=Opz3zBXs9i6HuopId9LDy9BjRrW9LWKRFkNF5s77cPkgYixXP92w0tRLC8HDIqbCq1 XNs0gV87l8Y99iVMP7Abe5RzQ6KAXDQ8Z6g5aDbNmxy+rrcYGFR5UeDCIl68V+K0Fjpg L3cSzyhMjZeNWY6LqPM9cu5ApWCksXP7Ybi8Sgb3c4KlLIgMHvUZ1L9E8C+CZVnthkwS vCO+Gqk2VyrY0pNDHCH5c63pzghdCCGPwxg0zJDwJFhCn8Y1ykeRnjg8vLwbRsu8+4Bs s8yamFqP4AjgyPSvAHqSYzuA+LjrvUqtJHnK2WBZ/Kr6bhgjTr1AxSGtuooqnNx+1MH9 5whg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=sebe6Vc2nLU32qBwpYLgCGBPjUH857MP2/jaPXkeWAY=; b=qJmYzVokGEBd9SBNHIz7XSLWOsWyhZctIE3bNenYZfm8tmSBYLi3P9QNYN8Bz/ggL1 TXhMMySX4EO7tt3v9xBenqTV0j+TK4rFnlOr/vPOpMmhQ+uc/aUvVLQzGxnDylGLcXBz lPdA6Tkji47qZCzmOWLmrNOvrc/MA/TlnLoluwMZhp5XsKXCkvWnvphpxypiybyD6+4z b1XDL7T3oockIY/GA4ixQpF7252/x5HDqZmN4dUhEDKkjFKCjxwjNnmlHeAjJ/x4iLEK pfl5WaZ52RsrHfshYynNYYjrRGDcYKApIw+JTZrYed0UBwLoOc6n/Nsgam/upcEevA3H uywg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=taYQKskm; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y25si9453005ejb.256.2021.04.19.07.26.50; Mon, 19 Apr 2021 07:26:50 -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=@gmail.com header.s=20161025 header.b=taYQKskm; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5BB4068A177; Mon, 19 Apr 2021 17:17:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1F18168A0DE for ; Mon, 19 Apr 2021 17:17:06 +0300 (EEST) Received: by mail-qt1-f175.google.com with SMTP id 18so12731778qtz.6 for ; Mon, 19 Apr 2021 07:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+PG0sBq3IgNP4FwcEG6JcpGFnQmyHFBlAAlJaus5nJU=; b=taYQKskmeX0/vQnxOPMsbQSYPtExRmB7DzLHuSdk1jahoVYmBlh/JS6t4BDGmXyVAk 1LnXJ3624Z3YdFNMQu0ly5HZJJddztWzzstqZ+Q0utSudMy5Ez5uzD3sQt28cebZXIKH M6q8Zce5YGkOSaezvHgj6kTV7TP6hMfOJQLy2buzgP5JIvMZNcrri4sV5OgrN2xuSRG/ 2nvhpHRRP2S44XWMIk46L2IBt5QWu/HjwkChypWJhqLSr1hth58/Yi8v8y7W+31W8l1/ BMpeuPeViLPTZsRIpdpumFAZs4uEZfE9OkPHB7GH6OzDRLBjgNirRs0yYLXxKoSoBYPo a5nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+PG0sBq3IgNP4FwcEG6JcpGFnQmyHFBlAAlJaus5nJU=; b=Uyu+nwmHKwOW3PKYFoVwZ5KvuvN58t0RCJu9h3TRtAtV7mEiNlsuLVU1niLL5CDxnU AVnoBsBdAMoBxuR84UsJGrBOf0uh38TGdc0j3s4iX6C4H5IM3oglsGPPmh9k+qlHKH0S pq2K9s9Pqorx8I0wE5KZb4WNVbq6dHhGrkTmG7KTQOKxaIHzF1wBku1HRlIdcZ+cMzFm ZvjYpN/+PJt4rH7hZJREd8tFvhrPrK/3q/NsyaK9VXvGaRUTDBmc4GZT08PGQPzANFua Ek9/r8zXPi8FD6yYKhA2+WqkImsy2IWt94XKa9DYgVWllEk2UDle8AENEyxyn+Xbx+mj c74A== X-Gm-Message-State: AOAM533KtWIuj5Cx8/XQ/Ju0bXG7nDGlc4NgS6ZjyJro7CYEj81/Oo0a x1ElaExWqToWNAdU0SOOyznDXCbANn8= X-Received: by 2002:a05:620a:13ca:: with SMTP id g10mr11748113qkl.380.1618841478285; Mon, 19 Apr 2021 07:11:18 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:18 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:10 -0300 Message-Id: <20210419141024.8174-14-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 13/87] avcodec: Remove lock manager 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: broGEAVjbL/b From: Andreas Rheinhardt Deprecated in a04c2c707de2ce850f79870e84ac9d7ec7aa9143. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.c | 7 ------- libavcodec/avcodec.h | 43 ------------------------------------------- libavcodec/version.h | 3 --- 3 files changed, 53 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 760a98d8ef..8e91350d67 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -102,13 +102,6 @@ static void unlock_avcodec(const AVCodec *codec) ff_mutex_unlock(&codec_mutex); } -#if FF_API_LOCKMGR -int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) -{ - return 0; -} -#endif - static int64_t get_bit_rate(AVCodecContext *ctx) { int64_t bit_rate; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 0e86064ccb..7c6f5c1fc0 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3799,49 +3799,6 @@ attribute_deprecated AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel); #endif -#if FF_API_LOCKMGR -/** - * Lock operation used by lockmgr - * - * @deprecated Deprecated together with av_lockmgr_register(). - */ -enum AVLockOp { - AV_LOCK_CREATE, ///< Create a mutex - AV_LOCK_OBTAIN, ///< Lock the mutex - AV_LOCK_RELEASE, ///< Unlock the mutex - AV_LOCK_DESTROY, ///< Free mutex resources -}; - -/** - * Register a user provided lock manager supporting the operations - * specified by AVLockOp. The "mutex" argument to the function points - * to a (void *) where the lockmgr should store/get a pointer to a user - * allocated mutex. It is NULL upon AV_LOCK_CREATE and equal to the - * value left by the last call for all other ops. If the lock manager is - * unable to perform the op then it should leave the mutex in the same - * state as when it was called and return a non-zero value. However, - * when called with AV_LOCK_DESTROY the mutex will always be assumed to - * have been successfully destroyed. If av_lockmgr_register succeeds - * it will return a non-negative value, if it fails it will return a - * negative value and destroy all mutex and unregister all callbacks. - * av_lockmgr_register is not thread-safe, it must be called from a - * single thread before any calls which make use of locking are used. - * - * @param cb User defined callback. av_lockmgr_register invokes calls - * to this callback and the previously registered callback. - * The callback will be used to create more than one mutex - * each of which must be backed by its own underlying locking - * mechanism (i.e. do not use a single static object to - * implement your lock manager). If cb is set to NULL the - * lockmgr will be unregistered. - * - * @deprecated This function does nothing, and always returns 0. Be sure to - * build with thread support to get basic thread safety. - */ -attribute_deprecated -int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); -#endif - /** * @return a positive value if s is open (i.e. avcodec_open2() was called on it * with no corresponding avcodec_close()), 0 otherwise. diff --git a/libavcodec/version.h b/libavcodec/version.h index 6d0f0f1d25..c743d2a05c 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -87,9 +87,6 @@ #ifndef FF_API_USER_VISIBLE_AVHWACCEL #define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_LOCKMGR -#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_UNSANITIZED_BITRATES #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27020 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp555663iob; Mon, 19 Apr 2021 07:11:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0y7PQhqgWUytbTkWjibxWBkTob9lXsnLsvpSC96YZoOaYtiy06ORrgKnk55XVCPfl8fSA X-Received: by 2002:adf:ffc3:: with SMTP id x3mr14962117wrs.263.1618841501659; Mon, 19 Apr 2021 07:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841501; cv=none; d=google.com; s=arc-20160816; b=Oyq94Y58gQqZekAlZh+csQaJe5V6hcaamAZQhXi5WUtBPZPKjd/7UceQs/x+JoOGO0 hCGBsHSkuKATVaqqhX+zAWjy8kgNqyGAbVJh05/g/24lbdC/R6FWWiJrgeLBCXNj/RDb g7FU1QALA12+VrsCaaVzgCCe3CD5WTkE/x5WUq5W53bbbQk8awS8vedCw0t9Li9L/7BQ wWya1HjZOblBLWTO1AD+9H0GJ5Kh/HG+DXHVR8rV8+4fnrRH1eksTbzpeXvAe+g4OCNY uYSROXBVjRd/12xD8Z1GTJ+evSw0d1MJ3+ZEARIb0CuJzNbkfbwIg5K92hjo4Z82YhTm Qg6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=PYAepqVW4qVYpeXs+qvnmkGVPnfzO21DE5Efm6Lz9SI=; b=iCLp5KYNSBgAfdD6gMfhVUqAjTCMbx+J684qCz7CGtq2wqTt1RiYO3fDlbJoSwuRHc otjw8KQWLa5/fCTZ/I/g5YoFSwMfI6J+skAXsdArFbhgHGVejQLJG5t0v8CPn5pqJGRe YfCSxKWXFTpqKo8WS1Owz4v4GeFEP5W6BJug3scXo6NP3YqzduxkyCJ8Gca1XcFJEwp9 qnioxLVZuNg07iFx/T08MxJIpOBlS8nHmQyIoJ8vNp5K0t4vWebYEpPmKKw5KeVVUl0r WgpSYFApd+P7BdjAb0bLs33lr44i6/kzVoYsDXkIPKWGKv/xZ/Z2w8II+jj6CThKXbc7 +j3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=EO1kVEdg; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p25si12624840ejc.571.2021.04.19.07.11.41; Mon, 19 Apr 2021 07:11:41 -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=@gmail.com header.s=20161025 header.b=EO1kVEdg; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 070116806F8; Mon, 19 Apr 2021 17:11:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B70B8680271 for ; Mon, 19 Apr 2021 17:11:20 +0300 (EEST) Received: by mail-qk1-f176.google.com with SMTP id d19so132884qkk.12 for ; Mon, 19 Apr 2021 07:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UJUQ1FatloYwJNPBlOR0eMlZlyttJwi4w5DlFzg9g4M=; b=EO1kVEdgzyZW+C1Gtt6TrKqt/HJejfSEpQUCeXffc7q7c1d9+pkRER13p2nLHAtOnb r1NzUqyV6AqXbFzsEDBFbXtXDJA3HgujG0dQut4UposhMkSqmj/2UoUPYDAMtZyb72fX 8pCkRzFOVLjp9croZdKj78Obf5RsxMLRT6qJ07XaFs9O2kPk8NwHS88YsPOkE9lygW9Y 4EUOB5GKZdCX0rxeLCkPCd1L0VaP0WjXOYoUu60DYWHvGIdwfAxueYB0vXhID7r5Adsi Dcr0CSS6Y2HSVXSn5Oh2klN1470BnJO1ogDinYAmUtr5QMKR1AOStLoFcH96lLpscEu9 EvIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UJUQ1FatloYwJNPBlOR0eMlZlyttJwi4w5DlFzg9g4M=; b=t5cJdLVb82cENv4KiWoLRDyiZ7X5Q/J8mQz0oDGj6AI4zLkWYlowBbQnoqTLs2uLGE 5Zm3wu2avk0ZDzMSUwOGluj9haLR+MqKr2NrSphIBn5GCMLT4y3J2OpP733VNl1mctC8 EU+O5TdNvaR+LDHl4rZ9ZMRlF+pO4YsizV/3AZLRpK2ikdYu1IpnDl6te/J9/OQmvetc tKXGuPeyP6VQRZ2vw28JTCX2VbEReXUvBTtx1nICRaIUa09Zdgezckt/SlExKaevkSz6 4isDPjXVAa6O9cTHzAjtDw1KbM+l0nGBDPPu3TwrgKqrr4KQNIxgYptIHdCHEya9EjRM 924Q== X-Gm-Message-State: AOAM532UQ+DHOcVtRsdlf2KYxQWd3wgLJaMhv2SfQpYFHP8+n6LJW7g3 O4P3an2KreoC0HAlNybCTPg77a1jjnY= X-Received: by 2002:a05:620a:1522:: with SMTP id n2mr6457616qkk.298.1618841479402; Mon, 19 Apr 2021 07:11:19 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:19 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:11 -0300 Message-Id: <20210419141024.8174-15-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 14/87] avcodec: Remove remnants of user-visiable HW acceleration 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: iDM/o/WkFP6h From: Andreas Rheinhardt Disabled and deprecated in 3536a3efb9fde88d34d526a51b1080247326cd6e. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 21 --------------------- libavcodec/utils.c | 11 ----------- libavcodec/version.h | 3 --- 3 files changed, 35 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 7c6f5c1fc0..ff684d17e1 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3778,27 +3778,6 @@ void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size); */ unsigned int av_xiphlacing(unsigned char *s, unsigned int v); -#if FF_API_USER_VISIBLE_AVHWACCEL -/** - * Register the hardware accelerator hwaccel. - * - * @deprecated This function doesn't do anything. - */ -attribute_deprecated -void av_register_hwaccel(AVHWAccel *hwaccel); - -/** - * If hwaccel is NULL, returns the first registered hardware accelerator, - * if hwaccel is non-NULL, returns the next registered hardware accelerator - * after hwaccel, or NULL if hwaccel is the last one. - * - * @deprecated AVHWaccel structures contain no user-serviceable parts, so - * this function should not be used. - */ -attribute_deprecated -AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel); -#endif - /** * @return a positive value if s is open (i.e. avcodec_open2() was called on it * with no corresponding avcodec_close()), 0 otherwise. diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 643ea003df..0cc3a797f8 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -841,17 +841,6 @@ const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index) return &codec->hw_configs[index]->public; } -#if FF_API_USER_VISIBLE_AVHWACCEL -AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel) -{ - return NULL; -} - -void av_register_hwaccel(AVHWAccel *hwaccel) -{ -} -#endif - unsigned int avpriv_toupper4(unsigned int x) { return av_toupper(x & 0xFF) + diff --git a/libavcodec/version.h b/libavcodec/version.h index c743d2a05c..590a8d6f4e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -84,9 +84,6 @@ #ifndef FF_API_GETCHROMA #define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_USER_VISIBLE_AVHWACCEL -#define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_UNSANITIZED_BITRATES #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27018 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp555808iob; Mon, 19 Apr 2021 07:11:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpKfYjtfDo+JknmPp8TlnPpXj3ytXUhfhqZnhBnweki7pMHnhwe4qALFt2VGu6OwDsHcEV X-Received: by 2002:a17:906:6d50:: with SMTP id a16mr16299768ejt.31.1618841512520; Mon, 19 Apr 2021 07:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841512; cv=none; d=google.com; s=arc-20160816; b=LbcfpW0K5BxTyoT3xsF07qI6/8umzOwo0PR2hhmvTv8tVkN5SwrkNJKmQevmmzgTQZ VI1u15HWTlKmtvFnpw2/hP/L6D/PX/j2MB8BUww6lm8Kpa9bRCVEhWl2IJTiSlaUMmd6 2WXiRlnM8BuK268pwRhvir/QeUanbDQj8YxLSrr70pWgJ9ZvveyLqU9PUB36tNr4fZ6j 67V9UONVRXaSvbLnu8jVNF5ctNq4qNigLICeiJ9ykYyfjlph0ohQkb2CW/YUhxnCXl91 A1ULVmBKInumeXjeA4UCHVdOTFZuiHcXRx8XzDdmpCDPPxVoOpU7AAjZoZTPp2r0H3xn fZTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=4NG9DGOMdvJqLZncDP2XAk6RsENKHRzKHJAJ2Bor6ts=; b=qSmIhHvGdZ5VgUZn7vvD7F9lUhpL/sGaz/J0gK3T1AyCWIYYz4jHtx46hJCyJkhb4+ IPW4Clzg7kwkxRGlKZ60UfqxJOkFRQLjvBAnMx2zsN9mLI+rW0XhhEC5LQYEfdPtRPmr Y+W7ZUh+RYVuNGuU2FOqeqcwWvngD+DpYcf+l4WwzCSFIj/hgwMTMWllVm9xwHOLr2Z8 rdT2xjfjO1MRTOUVpL0TQgb/wjPMF2M6tbFU02kJvB9uNKF2InfzNv9IE0IjQ46Q0vML sz5glAIHt9SgAZi014MZ4KoCqPLbaN+eKqKTaPrjuHCLVKc1l/+71JPmFFJdhC4WtaXW q1Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=BFrceeRK; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h12si10852222ejc.210.2021.04.19.07.11.51; Mon, 19 Apr 2021 07:11:52 -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=@gmail.com header.s=20161025 header.b=BFrceeRK; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 14726680967; Mon, 19 Apr 2021 17:11:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CA345680742 for ; Mon, 19 Apr 2021 17:11:21 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id d19so132946qkk.12 for ; Mon, 19 Apr 2021 07:11:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TFyYbx6lDJ2YroaCm4ixzzMRRWWmgmiGadOHf5JY+OQ=; b=BFrceeRKou4sjldT+dhJhPpnVPhuhNADbQq9R41NP0Ma5khpRsBxg80d5/b8DSIkfF PshBlmYIciYTBvJ/xe+YlEsoOcuvnfoxpg08VZIEfV2KYMlskizjPI1ZZT+fM0nqMyep 78p6iW8UHZr/HAn6OZJ6ja63RxSUvXLPnVEI3eet2w4qKmB8ofjpNqqhVf8Iw95pLIuA g29iNx6Qr2nx/zHjnG9k0FdVQW/QFvPaotSw+5PTq+mSnf2k3wRmtYv+hx8zu+kmydd/ +zlUDSAqUSk/At4slWH8TnWNxThFNEIM27gYG6yukiNqTfGB957zRaegoFeR8WXUoeHG khuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TFyYbx6lDJ2YroaCm4ixzzMRRWWmgmiGadOHf5JY+OQ=; b=D775plvX1YgJlKcW2qaR1WEG/QZx4Gjn9buMexBpWRsYqat2W+Lvvs+ZbFJNiomUmE 730ZuavhyQOQf63oJpZy7GSKyAkkpb++ioX+kKlJZPNpdQyBbztPah1borUgLHJoSfAs w0Uvh8oFISi13AuBzlP0Ff0OhUI12fjG7aUbjUuk6WLsiYdynbZeMCqOO6Jd+StQvh6e Vj7lc4cwQX6/t1nEPqF67iFvWkSCBBEsN84cAbXAOuu/UMEN8cBoruroZXIM3Iv7KV9X f8SaxEJeDmX46ZguGE/A20YvMX0Z9e7Cz+1/tYmgpnOgTnz9OevO/NKnPMXP8tJmnl7N 43Ug== X-Gm-Message-State: AOAM532ZW3k/ElUCYGUZs/G7xEoVq0Jm4nnt7/REcqVogOYF2gSbKlZj 7stVLfnNsddqOJfOKj+RjUdUNbPxuO0= X-Received: by 2002:a37:492:: with SMTP id 140mr4232288qke.161.1618841480488; Mon, 19 Apr 2021 07:11:20 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:20 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:12 -0300 Message-Id: <20210419141024.8174-16-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 15/87] avcodec: Remove deprecated avcodec_get_chroma_sub_sample 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DBD2F0WzxyHG From: Andreas Rheinhardt Effectively deprecated in 2c800eb7375c65ffd56164b03bb035bdb3f1e172. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 9 --------- libavcodec/imgconvert.c | 11 ----------- libavcodec/version.h | 3 --- 3 files changed, 23 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index ff684d17e1..69f69a1aa4 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3574,15 +3574,6 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, * @{ */ -#if FF_API_GETCHROMA -/** - * @deprecated Use av_pix_fmt_get_chroma_sub_sample - */ - -attribute_deprecated -void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift); -#endif - /** * Return a value representing the fourCC code associated to the * pixel format pix_fmt, or 0 if no associated fourCC code can be diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 8de1563404..a3443d1c72 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -27,23 +27,12 @@ #include "avcodec.h" #include "internal.h" #include "mathops.h" -#include "libavutil/avassert.h" #include "libavutil/colorspace.h" #include "libavutil/common.h" #include "libavutil/pixdesc.h" #include "libavutil/internal.h" #include "libavutil/imgutils.h" -#if FF_API_GETCHROMA -void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift) -{ - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); - av_assert0(desc); - *h_shift = desc->log2_chroma_w; - *v_shift = desc->log2_chroma_h; -} -#endif - #if FF_API_AVCODEC_PIX_FMT int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, diff --git a/libavcodec/version.h b/libavcodec/version.h index 590a8d6f4e..0e9c92a9f2 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -81,9 +81,6 @@ #ifndef FF_API_STRUCT_VAAPI_CONTEXT #define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_GETCHROMA -#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_UNSANITIZED_BITRATES #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27015 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp555997iob; Mon, 19 Apr 2021 07:12:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSH/8aolBbAi1qSQ8cJQKgWrsWWXmiMFjWBu5N8aedVubGdyIgjqtDuwMOisM0JAdAzDR1 X-Received: by 2002:a17:907:3f08:: with SMTP id hq8mr22717990ejc.90.1618841522969; Mon, 19 Apr 2021 07:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841522; cv=none; d=google.com; s=arc-20160816; b=r88p9cJKXrTvRfym5XE7/AtFj30qQe/k3xyS9aDISgGVQT3nyQ3GwelqRDffbcHgvV 42iQ4RpKf3lTzdQTDiXErvWp6/XgLJ4PMOs3QaQt7vKN69w0++N3xINEziQRfoVaBCIX Se3tABzsIBW4YkQxQvjOwEyzrIFf/56PZB3QCk3ZRRYzwfkLmpoVJl8W44HQcTp8i6/4 onSlqA02xKATOZ1JBo/KebC1W/lsuSZ5hucsjLVWSFTHe2WTnXbkG5fy5Qt1NaYfsBZd 3suwsKKvafCKgPonRiCCUg57Ff1AbmN5G1PorSTHo9ZhukddPoba5MQWTVXl0GMVCVOq RdtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=/VsKwdVJm4TF/YrD6bXkbMjY+QdI8wSCX+RxKw2Aprg=; b=FABxo4jSsPbkV+kU3j7P3MTEdZmoK94/rK4V3hRdaYPRhkgyxTlL/LU777lWa/oW5F haDEZCPlvvDUnXaym0nINh48dgqtNN2rIP9Iaf3PUCnGetzlPm8zmbIJfcKMxOrtHxpR 9ItpWYdkMNttNt92uPG+8vxwP96TuSMlheVW4BLl6RZFCIczi65ssRJz3De8xEN1wTti 7+YyVu2o4FHGoN4Sx9W97n6fWJ9nZR/Xy1pXFzgVj9NjbHtL4scdSlAUNHaGGNLAGDHj nj8JSW1K31aaK/7BmkeLV5QuXe8OhsP0lQUIVJGbpvEg/kNwRuvEGzk6UElm4fd6gvNH 2CXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=di+1ers7; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z13si12773531edd.128.2021.04.19.07.12.02; Mon, 19 Apr 2021 07:12:02 -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=@gmail.com header.s=20161025 header.b=di+1ers7; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 13A1A680745; Mon, 19 Apr 2021 17:11:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED0B4680271 for ; Mon, 19 Apr 2021 17:11:22 +0300 (EEST) Received: by mail-qk1-f180.google.com with SMTP id v7so7769369qkj.13 for ; Mon, 19 Apr 2021 07:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=yXx0+JsBIYAKH844l9UwQ481DfoqxOCnPdyviey0/Do=; b=di+1ers7CsAXlduKBJ1SRb1M7yY2nelbwc6TfnTpvBGFG4FnDhv1/rqXA81jRTPUsI MLR8jHODQUnCX0xGr9tHBzGEghjmtI320olRV+FD+twcwarCUWNSOanhLprmWn6EWdTj E3MewqNnWkEex118azhhGZN7cNrdf8jSjCeN5MkARUU/punBCwSaVB9wKJPYKfZcDsxF KOb8llU+JjmJioiW/kUdlr2h8RjrDcnDJkzdaSwwjraZBB3sbNt9JI70Q3u8BoiGnwNl wXf3/RqdkWT2pW5YZl2QoZDXQnsI4ERfUbqZnGfE+t9WHEkyM1pDuYT/YDrC4SciZZ+H ldyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yXx0+JsBIYAKH844l9UwQ481DfoqxOCnPdyviey0/Do=; b=Sc1ZG6j4Qh5RbLahAwibNXMXD7OFAxjFZPEoJs/5dn9oryInhS3FQ2EG/KYs/9g9vE 1VvyVRBHEcspvnBrbNJ698ixa52y4g5nVznbowtTyQW4KgJmb2S5aY6oqRjFnSFmSdJD 4AlUlbJnbg3FMl9/OYuq34ffX3B2Zx/4R+aNpko2x7mEcM3Xkz0kuyVVjsAWHj8t7Gn9 XzCTTUlt0cWO2XOH1TQsi5In2kPV50NhGoCvNdGdtSC1NajBdggSAA0QDhp/ps3k3TmD A3p8RKnCHQAS0wOrMoYd2Gj9L8szvQdSpQCeij3IXWGbjRwBMh9sqkHi5r3zWfQJSE/I s94w== X-Gm-Message-State: AOAM5302OxVkxwtWjylLcUI+EhwFGQV3h6nJGyEy21CRtuOoOfW1paos g9RNsqDzmywcmk22ZWYRA2i77lDmKXs= X-Received: by 2002:a05:620a:1093:: with SMTP id g19mr12409979qkk.112.1618841481598; Mon, 19 Apr 2021 07:11:21 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:21 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:13 -0300 Message-Id: <20210419141024.8174-17-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 16/87] avcodec/bitstream: Remove avpriv PutBits API functions 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: kCY1aeGqXtTb From: Andreas Rheinhardt Scheduled for removal in 717503f7166d7032e32b935f2819d450524125d1. Also remove PutBitContext.size_in_bits which has been scheduled for removal in e7cbbd90267de2a0ad1b5fa8ccb29ab7bf8a26b8. Signed-off-by: Andreas Rheinhardt --- libavcodec/bitstream.c | 11 ----------- libavcodec/put_bits.h | 10 ---------- libavcodec/version.h | 3 --- 3 files changed, 24 deletions(-) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index e425ffdc96..f0488cafd4 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -45,17 +45,6 @@ const uint8_t ff_log2_run[41]={ 24, }; -#if FF_API_AVPRIV_PUT_BITS -void avpriv_align_put_bits(PutBitContext *s) -{ - align_put_bits(s); -} -void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length) -{ - ff_copy_bits(pb, src, length); -} -#endif - void ff_put_string(PutBitContext *pb, const char *string, int terminate_string) { while (*string) { diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 15c2650724..689c6b282e 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -33,8 +33,6 @@ #include "libavutil/intreadwrite.h" #include "libavutil/avassert.h" -#include "version.h" - #if ARCH_X86_64 // TODO: Benchmark and optionally enable on other 64-bit architectures. typedef uint64_t BitBuf; @@ -52,9 +50,6 @@ typedef struct PutBitContext { BitBuf bit_buf; int bit_left; uint8_t *buf, *buf_ptr, *buf_end; -#if LIBAVCODEC_VERSION_MAJOR < 59 - int size_in_bits; -#endif } PutBitContext; /** @@ -177,11 +172,6 @@ static inline void flush_put_bits_le(PutBitContext *s) s->bit_buf = 0; } -#if FF_API_AVPRIV_PUT_BITS -void avpriv_align_put_bits(PutBitContext *s); -void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length); -#endif - #ifdef BITSTREAM_WRITER_LE #define ff_put_string ff_put_string_unsupported_here #define ff_copy_bits ff_copy_bits_unsupported_here diff --git a/libavcodec/version.h b/libavcodec/version.h index 0e9c92a9f2..fbdc99abca 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -93,9 +93,6 @@ #ifndef FF_API_UNUSED_CODEC_CAPS #define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_AVPRIV_PUT_BITS -#define FF_API_AVPRIV_PUT_BITS (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OLD_ENCDEC #define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27027 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp556162iob; Mon, 19 Apr 2021 07:12:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEEwpnDM1BWTI3qDwWqaLsei8YVfZClR1z8Y59I+mXy4TTKkg9lU+uV5xypMskRuXh6t5v X-Received: by 2002:a17:906:7206:: with SMTP id m6mr22431712ejk.281.1618841534392; Mon, 19 Apr 2021 07:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841534; cv=none; d=google.com; s=arc-20160816; b=ZsaG4BJ5sV+owT5KqFzgB0kuQP/ID0GvFPy1M67s8CDDjYPxBMkssc4/xg/h+JG/nA X12XoIxRg2cZu826Xq9KA+rQF4Get+aqz29VJm/RhuyMppSo7nZmWafwIJhXd6YJ7Qmv Xhb86JY7dUPfMScvQuddhBnTMxNE8C2UiG0kN0mrhto0Ebbghy6GI7A2rSl2g7O6cx1/ V9BNzaGmqRcQB7yeGgNsNm10avKDZOyRKl4jfFPvM++O8J91T74e9VivzelWCRkfByUC jOwPoXkNMPCiCmVobNNXhYpjJerYA6HSTBNiLCricK1XqkJN+tdE3AYqGSKPwoCUguK1 i3Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=KTBA4Gu5kY5vPciHuHla5L8XkrsBdZ2MfmRbAOIOgsg=; b=vcmq6ke26aXmjWUsKuGJflHl8qvJyLRzQ21kdrr8+9e1tgKnN8h6fliKNXbzn3INlF OaCqFHYE7GzEDtArixrVPp/fF66xbmLx8i5kKUxhuabj8PRnhECjOyZr+mjuVqaOHNy5 A+hhIMP5f9MFOaL3UeTJquGn1VUufOIO8mUpK53iord0gFlbIBE8wN1yWFcSn6nnkZga LGFvm3b3pkI8bnZ5sCWGMVjny/gPqa31FkJrvHyC6EHMFC1pJVTibJQN5ZUB9byx2xo4 0kjgaasBljAZdbv2si8RuiLoP3H/7LXV4jETgg4FuJ8qWb1lZAfGrV2PBvJHScjgkErL topA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=OOY58guY; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id zm10si12656895ejb.623.2021.04.19.07.12.14; Mon, 19 Apr 2021 07:12: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=@gmail.com header.s=20161025 header.b=OOY58guY; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0C0006809E9; Mon, 19 Apr 2021 17:11:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 108AF6808CC for ; Mon, 19 Apr 2021 17:11:24 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id q136so14895645qka.7 for ; Mon, 19 Apr 2021 07:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=KADQrsRgdayZ56R8MUVdN/6K2b/ja3FQxM9wj1t6dxs=; b=OOY58guY+oi6SZKNvRQRxgm9JF70KpXC907W+HTPTnkt0iHg6l+d5/xT6gWJ9JjcoW tguPLX4QM0HYiZJiXENe6J8wHJLqeqMQJBv9nk2x9FplOFLXK/xoVB59TkExNmnHy9EQ t6uiEg9IMhhrxHap0CpOHzurMWES/pw7ueQWvgiGEHqQlwWQWHB4ohUEVbWm6AZQIrrA JQnkyXQXJ6DKlfyjpZhn1ldsCse+1LyEedAW2h6A0VhgPu8CQVcZhOAFS6kAlTQ89rj2 dCUbIZLMy3GhpbXjmTS0eGZIUF9Dl33pmhwCMeDZG519wrmLyIYnJ0Glq35Ke6tq9Wzy STiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KADQrsRgdayZ56R8MUVdN/6K2b/ja3FQxM9wj1t6dxs=; b=I8S6dclpYKgMzHzOtC654T11IT03kqTmKEcGOYfcX9F0iF9xYD922ILbek87ipTGLH j4zHXVA7K76L7+CLGVFDsH/IlvrovFiiI/wmzJZUI1U+A/oU8nJjhT7RyJ4WzSRrPXEB zY2hhc7AXnVwvXv9SAb+btAQKaj2UpOoayReL+cb4Na08LDhZg/KvKRfWoc6NLOc5Dcd zbLjsRvMMlcm7tqq/ekrBtYeVKz6kKc3mx1P9KT3F0fu/SsAjUR339hzJ9TYhHfp3vld LiCgeVijg/Ww+ua1qmcgcluZxc2YX3qT5WmQsDxRE7oxGgKHlHfMaRLAYo6yAFkOoaFh jGFA== X-Gm-Message-State: AOAM530vLtYR9YxA6orEuT0NC74rAfmuQL8UV789vSsToDvdFcZp28tz QHmcIc33IgAjOGwDl2pVht+ZekdEP0Y= X-Received: by 2002:a05:620a:8dd:: with SMTP id z29mr12196167qkz.84.1618841482693; Mon, 19 Apr 2021 07:11:22 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:22 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:14 -0300 Message-Id: <20210419141024.8174-18-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 17/87] avcodec/mpeg4audio: Remove avpriv_mpeg4audio_get_config 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tdX0ACEMSJus From: Andreas Rheinhardt Superseded by avpriv_mpeg4audio_get_config2. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4audio.c | 18 ------------------ libavcodec/mpeg4audio.h | 13 ------------- 2 files changed, 31 deletions(-) diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index 2286303b54..be50de9052 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -169,24 +169,6 @@ int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb, return specific_config_bitindex - start_bit_index; } -#if LIBAVCODEC_VERSION_MAJOR < 59 -int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, - int bit_size, int sync_extension) -{ - GetBitContext gb; - int ret; - - if (bit_size <= 0) - return AVERROR_INVALIDDATA; - - ret = init_get_bits(&gb, buf, bit_size); - if (ret < 0) - return ret; - - return ff_mpeg4audio_get_config_gb(c, &gb, sync_extension, NULL); -} -#endif - int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf, int size, int sync_extension, void *logctx) { diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h index b274e92b62..3187df68d2 100644 --- a/libavcodec/mpeg4audio.h +++ b/libavcodec/mpeg4audio.h @@ -59,19 +59,6 @@ extern const uint8_t ff_mpeg4audio_channels[14]; int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb, int sync_extension, void *logctx); -#if LIBAVCODEC_VERSION_MAJOR < 59 -/** - * Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration. - * @param[in] c MPEG4AudioConfig structure to fill. - * @param[in] buf Extradata from container. - * @param[in] bit_size Extradata size in bits. - * @param[in] sync_extension look for a sync extension after config if true. - * @return negative AVERROR code on error, on success AudioSpecificConfig bit index in extradata. - */ -int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, - int bit_size, int sync_extension); -#endif - /** * Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration. * @param[in] c MPEG4AudioConfig structure to fill. From patchwork Mon Apr 19 14:09:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27026 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp556328iob; Mon, 19 Apr 2021 07:12:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpXDRQGa0LffmarKWg91QiDCzhXW6ysx/0j9jxPJEvFkPb17I0/Qq7Q5FmhkcCggGppAai X-Received: by 2002:a17:906:cec2:: with SMTP id si2mr22951053ejb.234.1618841546300; Mon, 19 Apr 2021 07:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841546; cv=none; d=google.com; s=arc-20160816; b=OA2j30aHepy50K2ghb+7Z8ox4v1rENb9jDGafP9wIuVEUIpCygTT9wbnbfbNnA1qET FP47UlbGVFDuHG1Zr+tPt9GVoShseC4uqBCk6T2dXw7PDC0M0QfXGi9i+2Ag5+22zF6T 69apKJs7ydxHU9obTnn+KosOuNblwMjpp0pqHg02KBqqZqsIrIkIt9QVQAEVdciJJSbs beOrVEN5oayU3Vk2gPlYqALP5XaMjccz1dEWFLgbPyEwBb6JNaHzZB2aZFFkOmseoTKK E8+eaNx9j2nawjSGNbb2ctSd7GJDRBxVDWx+I/ZyEQedH5xY3hDDZWCHHUAYs6vx43Zj tclw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=DvC+7gXqshA4NCeinSXL11btm189PxE10Y01QVCWjy8=; b=LtKXCBpTkmASwvehkI8A/vTzQ6tTuplkVYtTz5wd8OZWLEOlwHL7GEU9PDgV95Mauv fevGjSJnEbtCBM3ztSH8DcDP7BTGGmQ1Rr8Ei0VmEmGZ7XuKu+horAcE3d0+y9a5aJie IAJ6k5LQLuW40UcAhQYXom47KAvv8i1g07XDI5iQ4WGbO8e0j+UwfuOAv879UPTJILg2 bBXuTpiGWUHbdemJmfCfIAZKSBt0DxE2SpoVzrNniOpeOVoLjcEBXz/bMQq68oAOJ0av DZJ6xNNAobUC8ycKEdAfAFjr3Ph6nOrS4Ihq+bhTfVtYj4oNBTDybF1aCFW9gNqYqwZt SKXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=G6G8soyN; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id op17si12663036ejb.131.2021.04.19.07.12.26; Mon, 19 Apr 2021 07:12: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=@gmail.com header.s=20161025 header.b=G6G8soyN; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 019ED680AEA; Mon, 19 Apr 2021 17:11:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 87DE46809AE for ; Mon, 19 Apr 2021 17:11:25 +0300 (EEST) Received: by mail-qk1-f178.google.com with SMTP id t17so7379159qkg.4 for ; Mon, 19 Apr 2021 07:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=duTnZBpyfdFFlYf2L8T38E+Wp/q2opQd9yt9qiSBy/I=; b=G6G8soyNwEnvf0iGRpSOl2uIkYzOz19Am2pRsT82J7eaorGVbYbDqmmhXOnRLJEg+S npqjdLp83LOAPUBgrFihLM6VZyLAZ005fguDXEriKHYkUdiqN6Xi77ZWLWQzT2e0qGyc yEwaxdN/A5Q9RbW7Kkf9e+OznA/6Xlk9XJ3i2/mGQ780BlKPpZV9Phw/9BRGPbvYwb0D dj3LAJzw5M68OE0StBJTBqD270QUQlHyA5gmq5L8wdbfrPA/MDc7krJ/4SdEg4slL5C0 4g70+/k623anmlQnd+1EsyJ5KfuwlkfCMaIAnK8S72uc1aiiNgsgty78FwwAsY1ksfUz kkQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=duTnZBpyfdFFlYf2L8T38E+Wp/q2opQd9yt9qiSBy/I=; b=gnTsP7fKOVXRPMRc+/aVkHBPNeQ0jH7zgwX7S9tT0nL51Cn4ngAAlUfvlyZlqw7UEC u0pcGjBe5FAyxkcedsDiwMbAWz3Q+sd4WwvH0yogqJBgLFDZvFc1RNguQwN0wajdMUDt LjfchTT4xTgSZC6dHtNM+eRYtRo2/DVH7qjNr8Q/kZ4zMsv+kBFxRNVQ6r9wcMXgjBwC xcdXZE/XTnipQ5s+hpk2UTOaW0DHPivhJZP0f3TFk6H/+pRVeTzkVIljvme+63MXDYV4 6/VdYK6kgwL91hCJ2NxxD8KPSt7gNbcjTg0vEuOPb4Wwsgb76GZrvdX1P6LhRih8jpVk ulUw== X-Gm-Message-State: AOAM532tAAjivwo1eMyIzSHHPcJpYv79ra9+iGbxZxm5XKKQ1ZnSXllj 0caq/n+EnST+7MPOmY1ogggc7Z6OED0= X-Received: by 2002:a37:2ec4:: with SMTP id u187mr12416218qkh.472.1618841483845; Mon, 19 Apr 2021 07:11:23 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:23 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:15 -0300 Message-Id: <20210419141024.8174-19-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 18/87] avcodec/codec2utils: Remove legacy avpriv functions 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tVqLfmpCN0T2 From: Andreas Rheinhardt Unused since 37d742b607d47122d23d548ffd7ad9b09cbc5298. Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 7 +--- libavcodec/codec2utils.c | 82 ---------------------------------------- libavcodec/codec2utils.h | 18 --------- 3 files changed, 2 insertions(+), 105 deletions(-) delete mode 100644 libavcodec/codec2utils.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 5b41450b86..c11645616d 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -978,9 +978,6 @@ OBJS-$(CONFIG_VP8_QSV_HWACCEL) += qsvdec.o OBJS-$(CONFIG_ISO_MEDIA) += mpeg4audio.o mpegaudiodata.o OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o -OBJS-$(CONFIG_CODEC2_DEMUXER) += codec2utils.o -OBJS-$(CONFIG_CODEC2_MUXER) += codec2utils.o -OBJS-$(CONFIG_CODEC2RAW_DEMUXER) += codec2utils.o OBJS-$(CONFIG_DNXHD_DEMUXER) += dnxhddata.o OBJS-$(CONFIG_FITS_DEMUXER) += fits.o OBJS-$(CONFIG_LATM_MUXER) += mpeg4audio.o @@ -1023,8 +1020,8 @@ OBJS-$(CONFIG_LIBAOM_AV1_DECODER) += libaomdec.o OBJS-$(CONFIG_LIBAOM_AV1_ENCODER) += libaomenc.o OBJS-$(CONFIG_LIBARIBB24_DECODER) += libaribb24.o ass.o OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o -OBJS-$(CONFIG_LIBCODEC2_DECODER) += libcodec2.o codec2utils.o -OBJS-$(CONFIG_LIBCODEC2_ENCODER) += libcodec2.o codec2utils.o +OBJS-$(CONFIG_LIBCODEC2_DECODER) += libcodec2.o +OBJS-$(CONFIG_LIBCODEC2_ENCODER) += libcodec2.o OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o OBJS-$(CONFIG_LIBDAVS2_DECODER) += libdavs2.o OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o diff --git a/libavcodec/codec2utils.c b/libavcodec/codec2utils.c deleted file mode 100644 index a942662403..0000000000 --- a/libavcodec/codec2utils.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * codec2 utility functions - * Copyright (c) 2017 Tomas Härdin - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include "internal.h" -#include "libavcodec/codec2utils.h" - -#if LIBAVCODEC_VERSION_MAJOR < 59 -int avpriv_codec2_mode_bit_rate(void *logctx, int mode) -{ - int frame_size = avpriv_codec2_mode_frame_size(logctx, mode); - int block_align = avpriv_codec2_mode_block_align(logctx, mode); - - if (frame_size <= 0 || block_align <= 0) { - return 0; - } - - return 8 * 8000 * block_align / frame_size; -} - -int avpriv_codec2_mode_frame_size(void *logctx, int mode) -{ - int frame_size_table[CODEC2_MODE_MAX+1] = { - 160, // 3200 - 160, // 2400 - 320, // 1600 - 320, // 1400 - 320, // 1300 - 320, // 1200 - 320, // 700 - 320, // 700B - 320, // 700C - }; - - if (mode < 0 || mode > CODEC2_MODE_MAX) { - av_log(logctx, AV_LOG_ERROR, "unknown codec2 mode %i, can't find frame_size\n", mode); - return 0; - } else { - return frame_size_table[mode]; - } -} - -int avpriv_codec2_mode_block_align(void *logctx, int mode) -{ - int block_align_table[CODEC2_MODE_MAX+1] = { - 8, // 3200 - 6, // 2400 - 8, // 1600 - 7, // 1400 - 7, // 1300 - 6, // 1200 - 4, // 700 - 4, // 700B - 4, // 700C - }; - - if (mode < 0 || mode > CODEC2_MODE_MAX) { - av_log(logctx, AV_LOG_ERROR, "unknown codec2 mode %i, can't find block_align\n", mode); - return 0; - } else { - return block_align_table[mode]; - } -} -#endif diff --git a/libavcodec/codec2utils.h b/libavcodec/codec2utils.h index 37f0693dc7..6812ae895c 100644 --- a/libavcodec/codec2utils.h +++ b/libavcodec/codec2utils.h @@ -24,8 +24,6 @@ #include -#include "version.h" - //Highest mode we're willing to use. //Don't want to let users accidentally produce files that can't be decoded in the future. //CODEC2_MODE_WB (9) is experimental/unstable as of 2017-11-23. @@ -47,22 +45,6 @@ { "700B", "700B", 0, AV_OPT_TYPE_CONST, {.i64 = 7}, .flags=option_flags, .unit="codec2_mode"},\ { "700C", "700C", 0, AV_OPT_TYPE_CONST, {.i64 = 8}, .flags=option_flags, .unit="codec2_mode"} -#if LIBAVCODEC_VERSION_MAJOR < 59 -//The three following functions are here to avoid needing libavformat/codec2.c to depend on libcodec2 - -//Computes bitrate from mode, with frames rounded up to the nearest octet. -//So 700 bit/s (28 bits/frame) becomes 800 bits/s (32 bits/frame). -//logctx is used for av_log() -//Returns <0 if mode is invalid -int avpriv_codec2_mode_bit_rate(void *logctx, int mode); - -//Mimics codec2_samples_per_frame() -int avpriv_codec2_mode_frame_size(void *logctx, int mode); - -//Mimics (codec2_bits_per_frame()+7)/8 -int avpriv_codec2_mode_block_align(void *logctx, int mode); -#endif - #define CODEC2_EXTRADATA_SIZE 4 //Used in codec2raw demuxer and libcodec2 encoder From patchwork Mon Apr 19 14:09:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27089 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp661716iob; Mon, 19 Apr 2021 09:16:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDcOjXIMIBdeGhuq2WPPme92dEYjAsyAi9wnF7R+M6I9V13fuU5DENNAcojxw05GJBc51K X-Received: by 2002:a17:906:2dd9:: with SMTP id h25mr22461909eji.6.1618848995967; Mon, 19 Apr 2021 09:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618848995; cv=none; d=google.com; s=arc-20160816; b=swhi/EejDbkPVV1mhTU/NG3GULS4tg4YKzwm8fYR0+b2q7NE6V/PVKd6rg+1DXIb+M b4JTrlWhkEjoLFdaQXKkBB2QJl4TTr2MfJDdcssw4zO/9X8YkfpAJQPm6B8oOXuLebni 7BmuzRiMJqs7g0ZysP/kDlzW2I1W5VpIjaWIns7wcVkxaaOxfXK3VVybeQfAOiw5lyDj poOiDAlrbiOdsutWw7rhRBZnCXklsL2nuls/bQuVeqPOcE4HGKdlQFqQrkf/l3AySGka luZI3AbSwGZ8JjlfoB7dppca5ATc1K2r4hGY1Lc3QZvEtpylzffXcKqcV0hbPsuhY8cP lIzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=yxnPULovE/OTx69TqO0Dmy45KQzUEp6y35PqLVdecgE=; b=QcEHSrgpxu0VwWDyLiFuqcm2c05n/PVffkE2WietNygFnOa2hmsu3itUdDZUIsj4Qu 64FdyUWBrmV9Z7bcW7X3Z7lF/G/HbzKAYp6oS+tvuHg3RUqiaDrqMBkITrsZZzt5pqaA j9xtkeJMgJfn9NAyHGXwXH3XDmiVjCi1A8FFPdJNoU+z47jwi5p28xPPd8QTc+GyBiGf cTNISX3bW5iC79zJQwX/x2WUny+FpzfIu8MOpBrxQqWjAGHLH7Un/iqQ1/3/Wx6DO8fo D158RY7KNXears8S69ej6luFtqqTCStm+zuGYyLDKIgq2u9ICtGT6QZG5nyIVO4aXmL7 mPuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=pKSg6C12; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y13si11332229edr.168.2021.04.19.09.16.35; Mon, 19 Apr 2021 09:16:35 -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=@gmail.com header.s=20161025 header.b=pKSg6C12; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6121068026B; Mon, 19 Apr 2021 19:16:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6B7F568026B for ; Mon, 19 Apr 2021 19:16:25 +0300 (EEST) Received: by mail-vs1-f54.google.com with SMTP id t23so1522699vso.11 for ; Mon, 19 Apr 2021 09:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=M39YEesVR8B6UqOxJGlwKciQ64jzpICsFlM3XnLhCrs=; b=pKSg6C12ihjeyAGyUl7DXCsuoHMlcX+CpkpRVSxFQRsmXCAT4Gjbl4HeXhHl8vikMK NfIp8J6rlyktzmN9uNVRvSw1VBOmT0ZNXPd+qqFrNN77vq1fjyRRkocKquLigCwNxK5t aLlmvPHFhnBWIu/0K4rlhiOXq3SI7pVzV0r+0QiOEBJ4O/acRnLsjZL0BOZ2lbbLQ7HA PdkGo309WD2pFV4OyY7nmo6IhmdVVCCTdXQSXcgu0s4i7eWxrDt1bxV8DIhfgKT+Ur53 rV1jKP/43/VKHsXBtqk9MgMIDs99KZX3rMaGAQw7kTsZ/z9fQDPj5Xe7b6CM9cf1yDqH CCkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M39YEesVR8B6UqOxJGlwKciQ64jzpICsFlM3XnLhCrs=; b=Sl2a1cefYpvWdYlu/YnSotUSlxQ7PcjllCFr7mYbyx4v6Ns5e1K/MVe8jsbryyifuf TtC6w87S3a1ouEt+yb0ZAq62dkcM6vpb6mfNoX7d3VBjIJj9ufxkUZnafpI7g9ev+nD6 KgAqVHuwGj43tozFnSBQkjuM3PMAg2nsqsTRfFMdtpPdoD2r81FlZ3AJo0Rg3A/sMXgb zBvjNvkUdyWF9cBLABAg/EUbJesbN6n/0vcy6ogsSINk4z7jQeTjwWdbvB8MGYqp0vFC fxlZjm4hCPT1eTtWFLFPsonTsurGEHH4SNYLbJo32Ai49yrb5f3FPQ++UlI2fEmxpYSI JQrA== X-Gm-Message-State: AOAM532QilbbX4a0CUgJ8BVdKjqKIOKBC/f43D9Rx9vCrj5ZKc5f6kJ8 kVpPZ4cjM1AbGrUTBtDItRK+QzGpDY8= X-Received: by 2002:a0c:f901:: with SMTP id v1mr21277023qvn.26.1618841484958; Mon, 19 Apr 2021 07:11:24 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:24 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:16 -0300 Message-Id: <20210419141024.8174-20-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 19/87] avcodec/mpegvideo_enc: Remove deprecated RTP-callback 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 58hxWqnNlt7R From: Andreas Rheinhardt Deprecated in 462a54e2291e1fa18e1f1254d09739dfbb795617. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 14 -------------- libavcodec/mpegvideo_enc.c | 21 --------------------- libavcodec/version.h | 3 --- 3 files changed, 38 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 69f69a1aa4..064af12f31 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1387,20 +1387,6 @@ typedef struct AVCodecContext { */ int trellis; -#if FF_API_RTP_CALLBACK - /** - * @deprecated unused - */ - /* The RTP callback: This function is called */ - /* every time the encoder has a packet to send. */ - /* It depends on the encoder if the data starts */ - /* with a Start Code (it should). H.263 does. */ - /* mb_nb contains the number of macroblocks */ - /* encoded in the RTP payload. */ - attribute_deprecated - void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); -#endif - /** * pass1 encoding statistics output buffer * - encoding: Set by libavcodec. diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index f0490a39cc..1613d06023 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2946,14 +2946,6 @@ static int encode_thread(AVCodecContext *c, void *arg){ } } -#if FF_API_RTP_CALLBACK -FF_DISABLE_DEPRECATION_WARNINGS - if (s->avctx->rtp_callback){ - int number_mb = (mb_y - s->resync_mb_y)*s->mb_width + mb_x - s->resync_mb_x; - s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, current_packet_size, number_mb); - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif update_mb_info(s, 1); switch(s->codec_id){ @@ -3429,19 +3421,6 @@ FF_ENABLE_DEPRECATION_WARNINGS write_slice_end(s); -#if FF_API_RTP_CALLBACK -FF_DISABLE_DEPRECATION_WARNINGS - /* Send the last GOB if RTP */ - if (s->avctx->rtp_callback) { - int number_mb = (mb_y - s->resync_mb_y)*s->mb_width - s->resync_mb_x; - int pdif = put_bits_ptr(&s->pb) - s->ptr_lastgob; - /* Call the RTP callback to send the last GOB */ - emms_c(); - s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb); - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - return 0; } diff --git a/libavcodec/version.h b/libavcodec/version.h index fbdc99abca..0e20d5c2e2 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -60,9 +60,6 @@ #ifndef FF_API_AVPICTURE #define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_RTP_CALLBACK -#define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_VBV_DELAY #define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27022 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp556470iob; Mon, 19 Apr 2021 07:12:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxomZNHkwXplui0iN1boLRRiFChwEkbGghdXSN2736NFMDxU3U7jlMKTpxGImf4W/SAtbCx X-Received: by 2002:a17:906:af5a:: with SMTP id ly26mr21807989ejb.372.1618841560093; Mon, 19 Apr 2021 07:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841560; cv=none; d=google.com; s=arc-20160816; b=eulvs6CBz3FGL396VLJm2DYoSGafom/cM8Q5XPttdNTI+EP4FtXifd0Bqjl8C2EMnm TEIgmIETgBX0S0x+74zqzlgYDmAmSQlLFSQIrL1aHW0LTFGHBYXZGq+hoEMOuCCHUp8+ Qbs2eIVxHlmRlnGnbuZSmbV/hBpD+3QZET+fDViaCSOHj6xIgLYXh4mWv+NHj3DNvmV4 DwdYSd/XaHAj4oYv4qd2G8TKRdGTscKFD0wAAHU5PCpXMAKWvxzjiV6y5CaKYTQEk3xv ZQ0g0yV+lpQU/zcxtfhef0ZGV9eqyCaZlkeHliL0aipgyWBm3AWQ76BUE2WwYYu8/DFj BQAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=4s2HxEt/Rd7pZcd1Eicgi5XvwUKjawWKJXCMJ3LPmMw=; b=hrzsdIxcRXpzhCBHJY4gfbvhgDzQMuE+WnZ7oDtU+r3sSVcfuFPxBV/un1H3vlCc1x pdQI/mrvLPlHD92jKA6tgx9RJHNvkeWFtQOORVrYhWAkUwTvxH1GL2XYldY2e9x97TuH Hxgj4B8i7khV0JokKD8ZuKQnaupB9Lmo58YmtrCixaQPHMQC5SpW88ELH0XVcArNUJl/ 3pI6ouiN53ND0KW84lnwOaBYxdeZBEN3tY8Z274n8MFLrmoAr2d5KZrxRJ337x7lIVCC N9JZcVCBUI6lVzgtuKV4OdE6HmXrRRiWEHkp47F2Vpm3Dko2XAL6aQUmD9hVETwKeqz9 p7kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=sq+tVH7U; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w2si14021736edi.199.2021.04.19.07.12.39; Mon, 19 Apr 2021 07:12: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=@gmail.com header.s=20161025 header.b=sq+tVH7U; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E6610680A25; Mon, 19 Apr 2021 17:11:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E93416809C9 for ; Mon, 19 Apr 2021 17:11:27 +0300 (EEST) Received: by mail-qk1-f170.google.com with SMTP id e13so26001152qkl.6 for ; Mon, 19 Apr 2021 07:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zez1wkLNX9pnYMscrjNyptBi67kEQ2/+NwFCsWVPgLc=; b=sq+tVH7UhI6oNqgqmzsMFqchbs060+tHsyeLEhLN9f6bubvYn813WJBsSLfkqhuthS WXBqdyF2lDIhMDx/ZWI+D5DFRhQEr5bLbnAL69N2ZueZOV+j48nC1HIiQfNOgJE5YNfE oQ/hj4/BmNqW9GNouo3s2RY/TMshRHC27iVkaqP1x4t/dxMt9yYBCWznVLDrhIL5kzsv 38AFXMpC/ER+Gsd8O0T3dCn4JcH2DIy2WyFd/lE2rrsijYAWEW3VzUqO8ukuyltNYoru Tg34LQLiFfmCVv095kVM5kwKHEAHeVbmahd2/IYrErL6rWq9mTtMUajfe8uCGP0Cq2Mg QopQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zez1wkLNX9pnYMscrjNyptBi67kEQ2/+NwFCsWVPgLc=; b=T3OyOFR1BFuOQrOf0i38kz0e/TRc1mkas3hLA9KfS+FkbVKWe3VXsBbN+AjMiswK5F eIy2z3lXM1p75t1Ozos3OOSZIaI3KapdXm/m2smLcilAGO5G5JabSy1mtA1BNgRZARJh NNtlQTcTrfOja8h4kWs8WljuG/IXM4mXmwTvuALNbSGYxcCRUuehrMl4ztsdWgIYqlnK TgNbXFsHjhaM5qnb3oNKS7qsFePjaRzNiAJW9RAhH0Ghkh357VM7btfyTRclGJ+E3aB7 xX137/ktS7NVMe54OQaYKky3Ab9XydNYQcQUyFEI6WQoVd32B61HlDoY7SwjWSW6Byed H8Ag== X-Gm-Message-State: AOAM531dQUFj/JVnxX9xBBXKOAHLPHBnFyez/v5aQ/23C5TV/Q0Wjwlb TDQ29K6wX1CYlkB0RgCPlkaMh4cgr2k= X-Received: by 2002:a05:620a:1522:: with SMTP id n2mr6458194qkk.298.1618841486102; Mon, 19 Apr 2021 07:11:26 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:25 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:17 -0300 Message-Id: <20210419141024.8174-21-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 20/87] avcodec: Remove deprecated ASS with inline timing 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cpfKYE5/WJvl From: Andreas Rheinhardt Deprecated in 22ebbda637257a432c99330ca4c6024665418f0e. Signed-off-by: Andreas Rheinhardt --- libavcodec/assenc.c | 39 ------------------ libavcodec/avcodec.h | 3 -- libavcodec/decode.c | 84 -------------------------------------- libavcodec/movtextenc.c | 13 ------ libavcodec/options_table.h | 7 ---- libavcodec/srtenc.c | 15 ------- libavcodec/ttmlenc.c | 26 ------------ libavcodec/version.h | 3 -- libavcodec/webvttenc.c | 14 ------- 9 files changed, 204 deletions(-) diff --git a/libavcodec/assenc.c b/libavcodec/assenc.c index a6e1d5d8b9..3decf670d7 100644 --- a/libavcodec/assenc.c +++ b/libavcodec/assenc.c @@ -27,10 +27,6 @@ #include "libavutil/internal.h" #include "libavutil/mem.h" -typedef struct { - int id; ///< current event id, ReadOrder field -} ASSEncodeContext; - static av_cold int ass_encode_init(AVCodecContext *avctx) { avctx->extradata = av_malloc(avctx->subtitle_header_size + 1); @@ -46,49 +42,16 @@ static int ass_encode_frame(AVCodecContext *avctx, unsigned char *buf, int bufsize, const AVSubtitle *sub) { - ASSEncodeContext *s = avctx->priv_data; int i, len, total_len = 0; for (i=0; inum_rects; i++) { - char ass_line[2048]; const char *ass = sub->rects[i]->ass; - long int layer; - char *p; if (sub->rects[i]->type != SUBTITLE_ASS) { av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n"); return AVERROR(EINVAL); } -#if FF_API_ASS_TIMING - if (!strncmp(ass, "Dialogue: ", 10)) { - if (i > 0) { - av_log(avctx, AV_LOG_ERROR, "ASS encoder supports only one " - "ASS rectangle field.\n"); - return AVERROR_INVALIDDATA; - } - - ass += 10; // skip "Dialogue: " - /* parse Layer field. If it's a Marked field, the content - * will be "Marked=N" instead of the layer num, so we will - * have layer=0, which is fine. */ - layer = strtol(ass, &p, 10); - -#define SKIP_ENTRY(ptr) do { \ - char *sep = strchr(ptr, ','); \ - if (sep) \ - ptr = sep + 1; \ -} while (0) - - SKIP_ENTRY(p); // skip layer or marked - SKIP_ENTRY(p); // skip start timestamp - SKIP_ENTRY(p); // skip end timestamp - snprintf(ass_line, sizeof(ass_line), "%d,%ld,%s", ++s->id, layer, p); - ass_line[strcspn(ass_line, "\r\n")] = 0; - ass = ass_line; - } -#endif - len = av_strlcpy(buf+total_len, ass, bufsize-total_len); if (len > bufsize-total_len-1) { @@ -110,7 +73,6 @@ AVCodec ff_ssa_encoder = { .id = AV_CODEC_ID_ASS, .init = ass_encode_init, .encode_sub = ass_encode_frame, - .priv_data_size = sizeof(ASSEncodeContext), }; #endif @@ -122,6 +84,5 @@ AVCodec ff_ass_encoder = { .id = AV_CODEC_ID_ASS, .init = ass_encode_init, .encode_sub = ass_encode_frame, - .priv_data_size = sizeof(ASSEncodeContext), }; #endif diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 064af12f31..a3c8c425cb 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2047,9 +2047,6 @@ typedef struct AVCodecContext { */ int sub_text_format; #define FF_SUB_TEXT_FMT_ASS 0 -#if FF_API_ASS_TIMING -#define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS 1 -#endif /** * Audio only. The amount of padding (in samples) appended by the encoder to diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 0956a6ac6f..0078f00607 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -949,79 +949,6 @@ static int utf8_check(const uint8_t *str) return 1; } -#if FF_API_ASS_TIMING -static void insert_ts(AVBPrint *buf, int ts) -{ - if (ts == -1) { - av_bprintf(buf, "9:59:59.99,"); - } else { - int h, m, s; - - h = ts/360000; ts -= 360000*h; - m = ts/ 6000; ts -= 6000*m; - s = ts/ 100; ts -= 100*s; - av_bprintf(buf, "%d:%02d:%02d.%02d,", h, m, s, ts); - } -} - -static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVRational tb) -{ - int i; - AVBPrint buf; - - av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED); - - for (i = 0; i < sub->num_rects; i++) { - char *final_dialog; - const char *dialog; - AVSubtitleRect *rect = sub->rects[i]; - int ts_start, ts_duration = -1; - long int layer; - - if (rect->type != SUBTITLE_ASS || !strncmp(rect->ass, "Dialogue: ", 10)) - continue; - - av_bprint_clear(&buf); - - /* skip ReadOrder */ - dialog = strchr(rect->ass, ','); - if (!dialog) - continue; - dialog++; - - /* extract Layer or Marked */ - layer = strtol(dialog, (char**)&dialog, 10); - if (*dialog != ',') - continue; - dialog++; - - /* rescale timing to ASS time base (ms) */ - ts_start = av_rescale_q(pkt->pts, tb, av_make_q(1, 100)); - if (pkt->duration != -1) - ts_duration = av_rescale_q(pkt->duration, tb, av_make_q(1, 100)); - sub->end_display_time = FFMAX(sub->end_display_time, 10 * ts_duration); - - /* construct ASS (standalone file form with timestamps) string */ - av_bprintf(&buf, "Dialogue: %ld,", layer); - insert_ts(&buf, ts_start); - insert_ts(&buf, ts_duration == -1 ? -1 : ts_start + ts_duration); - av_bprintf(&buf, "%s\r\n", dialog); - - final_dialog = av_strdup(buf.str); - if (!av_bprint_is_complete(&buf) || !final_dialog) { - av_freep(&final_dialog); - av_bprint_finalize(&buf, NULL); - return AVERROR(ENOMEM); - } - av_freep(&rect->ass); - rect->ass = final_dialog; - } - - av_bprint_finalize(&buf, NULL); - return 0; -} -#endif - int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt) @@ -1057,17 +984,6 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, av_assert1((ret >= 0) >= !!*got_sub_ptr && !!*got_sub_ptr >= !!sub->num_rects); -#if FF_API_ASS_TIMING - if (avctx->sub_text_format == FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS - && *got_sub_ptr && sub->num_rects) { - const AVRational tb = avctx->pkt_timebase.num ? avctx->pkt_timebase - : avctx->time_base; - int err = convert_sub_to_old_ass_form(sub, avpkt, tb); - if (err < 0) - ret = err; - } -#endif - if (sub->num_rects && !sub->end_display_time && avpkt->duration && avctx->pkt_timebase.num) { AVRational ms = { 1, 1000 }; diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c index cf30adbd0a..1b37d135e1 100644 --- a/libavcodec/movtextenc.c +++ b/libavcodec/movtextenc.c @@ -655,25 +655,12 @@ static int mov_text_encode_frame(AVCodecContext *avctx, unsigned char *buf, return AVERROR(EINVAL); } -#if FF_API_ASS_TIMING - if (!strncmp(ass, "Dialogue: ", 10)) { - int num; - dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num); - for (; dialog && num--; dialog++) { - mov_text_dialog(s, dialog); - ff_ass_split_override_codes(&mov_text_callbacks, s, dialog->text); - } - } else { -#endif dialog = ff_ass_split_dialog2(s->ass_ctx, ass); if (!dialog) return AVERROR(ENOMEM); mov_text_dialog(s, dialog); ff_ass_split_override_codes(&mov_text_callbacks, s, dialog->text); ff_ass_free_dialog(&dialog); -#if FF_API_ASS_TIMING - } -#endif for (j = 0; j < box_count; j++) { box_types[j].encode(s); diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 313150eb73..6ad54c2d67 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -366,15 +366,8 @@ static const AVOption avcodec_options[] = { {"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, {"pre_decoder", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_PRE_DECODER}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, {"ignore", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_IGNORE}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, -#if FF_API_ASS_TIMING -{"sub_text_format", "set decoded text subtitle format", OFFSET(sub_text_format), AV_OPT_TYPE_INT, {.i64 = FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS}, 0, 1, S|D, "sub_text_format"}, -#else {"sub_text_format", "set decoded text subtitle format", OFFSET(sub_text_format), AV_OPT_TYPE_INT, {.i64 = FF_SUB_TEXT_FMT_ASS}, 0, 1, S|D, "sub_text_format"}, -#endif {"ass", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_TEXT_FMT_ASS}, INT_MIN, INT_MAX, S|D, "sub_text_format"}, -#if FF_API_ASS_TIMING -{"ass_with_timings", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS}, INT_MIN, INT_MAX, S|D, "sub_text_format"}, -#endif #if FF_API_OLD_ENCDEC {"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|V|D }, #endif diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c index 655b65679e..160f3bbf3a 100644 --- a/libavcodec/srtenc.c +++ b/libavcodec/srtenc.c @@ -244,18 +244,6 @@ static int encode_frame(AVCodecContext *avctx, return AVERROR(EINVAL); } -#if FF_API_ASS_TIMING - if (!strncmp(ass, "Dialogue: ", 10)) { - int num; - dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num); - for (; dialog && num--; dialog++) { - s->alignment_applied = 0; - if (avctx->codec_id == AV_CODEC_ID_SUBRIP) - srt_style_apply(s, dialog->style); - ff_ass_split_override_codes(cb, s, dialog->text); - } - } else { -#endif dialog = ff_ass_split_dialog2(s->ass_ctx, ass); if (!dialog) return AVERROR(ENOMEM); @@ -264,9 +252,6 @@ static int encode_frame(AVCodecContext *avctx, srt_style_apply(s, dialog->style); ff_ass_split_override_codes(cb, s, dialog->text); ff_ass_free_dialog(&dialog); -#if FF_API_ASS_TIMING - } -#endif } if (!av_bprint_is_complete(&s->buffer)) diff --git a/libavcodec/ttmlenc.c b/libavcodec/ttmlenc.c index 3972b4368c..c4964572f9 100644 --- a/libavcodec/ttmlenc.c +++ b/libavcodec/ttmlenc.c @@ -94,29 +94,6 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf, return AVERROR(EINVAL); } -#if FF_API_ASS_TIMING - if (!strncmp(ass, "Dialogue: ", 10)) { - int num; - dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num); - - for (; dialog && num--; dialog++) { - int ret = ff_ass_split_override_codes(&ttml_callbacks, s, - dialog->text); - int log_level = (ret != AVERROR_INVALIDDATA || - avctx->err_recognition & AV_EF_EXPLODE) ? - AV_LOG_ERROR : AV_LOG_WARNING; - - if (ret < 0) { - av_log(avctx, log_level, - "Splitting received ASS dialog failed: %s\n", - av_err2str(ret)); - - if (log_level == AV_LOG_ERROR) - return ret; - } - } - } else { -#endif dialog = ff_ass_split_dialog2(s->ass_ctx, ass); if (!dialog) return AVERROR(ENOMEM); @@ -142,9 +119,6 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf, ff_ass_free_dialog(&dialog); } -#if FF_API_ASS_TIMING - } -#endif } if (!av_bprint_is_complete(&s->buffer)) diff --git a/libavcodec/version.h b/libavcodec/version.h index 0e20d5c2e2..af737afce1 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -63,9 +63,6 @@ #ifndef FF_API_VBV_DELAY #define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_ASS_TIMING -#define FF_API_ASS_TIMING (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_COPY_CONTEXT #define FF_API_COPY_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) #endif diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index febf6ee370..2419dd3d07 100644 --- a/libavcodec/webvttenc.c +++ b/libavcodec/webvttenc.c @@ -171,26 +171,12 @@ static int webvtt_encode_frame(AVCodecContext *avctx, return AVERROR(EINVAL); } -#if FF_API_ASS_TIMING - if (!strncmp(ass, "Dialogue: ", 10)) { - int num; - dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num); - // TODO reindent - for (; dialog && num--; dialog++) { - webvtt_style_apply(s, dialog->style); - ff_ass_split_override_codes(&webvtt_callbacks, s, dialog->text); - } - } else { -#endif dialog = ff_ass_split_dialog2(s->ass_ctx, ass); if (!dialog) return AVERROR(ENOMEM); webvtt_style_apply(s, dialog->style); ff_ass_split_override_codes(&webvtt_callbacks, s, dialog->text); ff_ass_free_dialog(&dialog); -#if FF_API_ASS_TIMING - } -#endif } if (!av_bprint_is_complete(&s->buffer)) From patchwork Mon Apr 19 14:09:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27016 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp556630iob; Mon, 19 Apr 2021 07:12:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5whULmxkY9RhxsFK3c0OtkJBU5b1qc9QborMU+C71SK6tqOUapldjFwqSAcFSvB+Xf4q1 X-Received: by 2002:a05:6402:176c:: with SMTP id da12mr25603072edb.325.1618841570920; Mon, 19 Apr 2021 07:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841570; cv=none; d=google.com; s=arc-20160816; b=KE0RO9tGnMdoG9tib/hzlL1xiwVF//dg2QUWdRVi1BTTscP7oAVr5RLC5irrXfAz8D mmYG26+zmXF3s8Nvp0UOuVnZIexFIhdDVsWsyWVCBoz5vskjlggPQ3sGhHv7JbTYQ9Gu mQgjD8mQd2aiVSxDag5K+Xx00y5KTa2+QmuvCuyL7FNxiqJEY5yYMjSLh2zgl+7xEs9D HemqGuF0VnrrO0pSGpdj4pO8RLcKG9yhuhnNvwpAtK3/wSTF5vi3RYVUCjRUPtY5MMA1 xwgo1bmGmPGL0XxgGiu7uckSfBN7RhjslGwLrUbv79ZKH9Tn5RD9fCHMH3xBdEEvJRtn uCEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=KbZEfdU8lEs6CiJ1npVplvVQFmUPsJYzhQfA+3db5UE=; b=JOopbcLV4Y+h86gGpjRIhvhu/BUvICgWYDdNKsgJ13dNpVDVW8gr2ezDrznIDrQeuN kmOHnykPl0NDq77fP7wAZbW6RWP/wm4eXp0wijyUCvd1SFcc7cN2E/vlnGKopBPWjUd2 MqiZ63+l1317ziNZQKsEXS7F+gdyKrOG/B7i2rsCR0UQXV7RBaGgQZUteoUfYxae0ALU fWiaLidqf97SiESUqNb3jrMvl6mObbdHxVlWGgijSco97mkP0bm3W1P94F8pKJsSo4dD awDwN9cCUMT2TPwJ1YclnQy88GQwtLwpBJkT5ObiLN4rK5UINLBcvUjd6D9ivcWwfJ2z OOOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=crfEFR5+; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u16si3147441edi.298.2021.04.19.07.12.50; Mon, 19 Apr 2021 07:12:50 -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=@gmail.com header.s=20161025 header.b=crfEFR5+; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC0E3680BD4; Mon, 19 Apr 2021 17:11:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A9AAD680A7F for ; Mon, 19 Apr 2021 17:11:28 +0300 (EEST) Received: by mail-qk1-f172.google.com with SMTP id h13so17165448qka.2 for ; Mon, 19 Apr 2021 07:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=GmIy1KBXeOOWbl7v/EuRg30joEyjtagL5GoafAG/OsM=; b=crfEFR5+OOX4fNgwqdrcMP6KjUVOdqS5iqrssjWpgWmKJY2vC5lPXFCuXZ+Mbjg5D6 faUK+Syog3XQTo7sRvNJIN0bzAQU2O3pql7TaG/rMrltLRRfE+04NdCwIXgrryZrM2Gz h2nDazjndEx/Ae1yCaMxBTJYCaiOZ6nGKNjunfkEYk3XPg0gAA66UbFuaUscGGybbSBe 7+6+c/MaIYzrcsF0TFI7af8ZItMWeOnxZE0pVhiRaSrhsrF3X4ieNVhLtl5bAcB+9UgT TxP7EszaNtcTy5wwwqAwoI7X3eqcmZcQ/ejOMxkIsMwvBpovgi5EVjJo+F2jaJe7C8Hz zbxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GmIy1KBXeOOWbl7v/EuRg30joEyjtagL5GoafAG/OsM=; b=Q32ai5P4/foqrQP+B6yBk3dVAziC+hQ+jv6AmyVXH1q7qV7bobUJJwghT0p7ZNrUuV gk7NokoM6rBFagRfISu6AFfyj+ul6Z4WBob6Y92DZTbCT/nWwGwkUXsQ7S3MZ7wpCc9s egjvFQNqX+zpmfphgNRW4h54+KfVSTyo6nLy4j0WUU1XafWNqVx0C/UeYLeAfZWw7dsL 4rUfpJ+KUHyNnouos4LZIeWKQwBaf8tLwtukpmy5qRkpI4Rrs1oDfDskOBmcV59rO0ZF uG5Qs0g2WzCZkFvonWWpse4R9T0N4EcrpNLjwwUwtA1v/BSwkxRC6TE9RYBPvdu2DCYG VwfQ== X-Gm-Message-State: AOAM530IoHZFk3COq1zqd7oRw1SQR225Y2aTQFabTfjt/29YZJglbSDV 9i5NRfTVTBOWuoGg7+q1mgN5vsxTIOc= X-Received: by 2002:a37:a794:: with SMTP id q142mr11980549qke.216.1618841487257; Mon, 19 Apr 2021 07:11:27 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:26 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:18 -0300 Message-Id: <20210419141024.8174-22-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 21/87] avcodec/(movtext|srt|ttml|webvtt)enc: Reindent after previous commit 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: L1gHuVsV43ad From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavcodec/movtextenc.c | 12 +++++------ libavcodec/srtenc.c | 16 +++++++-------- libavcodec/ttmlenc.c | 44 ++++++++++++++++++++--------------------- libavcodec/webvttenc.c | 12 +++++------ 4 files changed, 41 insertions(+), 43 deletions(-) diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c index 1b37d135e1..3c166639ba 100644 --- a/libavcodec/movtextenc.c +++ b/libavcodec/movtextenc.c @@ -655,12 +655,12 @@ static int mov_text_encode_frame(AVCodecContext *avctx, unsigned char *buf, return AVERROR(EINVAL); } - dialog = ff_ass_split_dialog2(s->ass_ctx, ass); - if (!dialog) - return AVERROR(ENOMEM); - mov_text_dialog(s, dialog); - ff_ass_split_override_codes(&mov_text_callbacks, s, dialog->text); - ff_ass_free_dialog(&dialog); + dialog = ff_ass_split_dialog2(s->ass_ctx, ass); + if (!dialog) + return AVERROR(ENOMEM); + mov_text_dialog(s, dialog); + ff_ass_split_override_codes(&mov_text_callbacks, s, dialog->text); + ff_ass_free_dialog(&dialog); for (j = 0; j < box_count; j++) { box_types[j].encode(s); diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c index 160f3bbf3a..08c52c2d56 100644 --- a/libavcodec/srtenc.c +++ b/libavcodec/srtenc.c @@ -244,14 +244,14 @@ static int encode_frame(AVCodecContext *avctx, return AVERROR(EINVAL); } - dialog = ff_ass_split_dialog2(s->ass_ctx, ass); - if (!dialog) - return AVERROR(ENOMEM); - s->alignment_applied = 0; - if (avctx->codec_id == AV_CODEC_ID_SUBRIP) - srt_style_apply(s, dialog->style); - ff_ass_split_override_codes(cb, s, dialog->text); - ff_ass_free_dialog(&dialog); + dialog = ff_ass_split_dialog2(s->ass_ctx, ass); + if (!dialog) + return AVERROR(ENOMEM); + s->alignment_applied = 0; + if (avctx->codec_id == AV_CODEC_ID_SUBRIP) + srt_style_apply(s, dialog->style); + ff_ass_split_override_codes(cb, s, dialog->text); + ff_ass_free_dialog(&dialog); } if (!av_bprint_is_complete(&s->buffer)) diff --git a/libavcodec/ttmlenc.c b/libavcodec/ttmlenc.c index c4964572f9..26ab76e9e7 100644 --- a/libavcodec/ttmlenc.c +++ b/libavcodec/ttmlenc.c @@ -88,37 +88,35 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf, for (i=0; inum_rects; i++) { const char *ass = sub->rects[i]->ass; + int ret; if (sub->rects[i]->type != SUBTITLE_ASS) { av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n"); return AVERROR(EINVAL); } - dialog = ff_ass_split_dialog2(s->ass_ctx, ass); - if (!dialog) - return AVERROR(ENOMEM); - - { - int ret = ff_ass_split_override_codes(&ttml_callbacks, s, - dialog->text); - int log_level = (ret != AVERROR_INVALIDDATA || - avctx->err_recognition & AV_EF_EXPLODE) ? - AV_LOG_ERROR : AV_LOG_WARNING; - - if (ret < 0) { - av_log(avctx, log_level, - "Splitting received ASS dialog text %s failed: %s\n", - dialog->text, - av_err2str(ret)); - - if (log_level == AV_LOG_ERROR) { - ff_ass_free_dialog(&dialog); - return ret; - } - } - + dialog = ff_ass_split_dialog2(s->ass_ctx, ass); + if (!dialog) + return AVERROR(ENOMEM); + + ret = ff_ass_split_override_codes(&ttml_callbacks, s, + dialog->text); + if (ret < 0) { + int log_level = (ret != AVERROR_INVALIDDATA || + avctx->err_recognition & AV_EF_EXPLODE) ? + AV_LOG_ERROR : AV_LOG_WARNING; + av_log(avctx, log_level, + "Splitting received ASS dialog text %s failed: %s\n", + dialog->text, + av_err2str(ret)); + + if (log_level == AV_LOG_ERROR) { ff_ass_free_dialog(&dialog); + return ret; } + } + + ff_ass_free_dialog(&dialog); } if (!av_bprint_is_complete(&s->buffer)) diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index 2419dd3d07..fcbd9698f4 100644 --- a/libavcodec/webvttenc.c +++ b/libavcodec/webvttenc.c @@ -171,12 +171,12 @@ static int webvtt_encode_frame(AVCodecContext *avctx, return AVERROR(EINVAL); } - dialog = ff_ass_split_dialog2(s->ass_ctx, ass); - if (!dialog) - return AVERROR(ENOMEM); - webvtt_style_apply(s, dialog->style); - ff_ass_split_override_codes(&webvtt_callbacks, s, dialog->text); - ff_ass_free_dialog(&dialog); + dialog = ff_ass_split_dialog2(s->ass_ctx, ass); + if (!dialog) + return AVERROR(ENOMEM); + webvtt_style_apply(s, dialog->style); + ff_ass_split_override_codes(&webvtt_callbacks, s, dialog->text); + ff_ass_free_dialog(&dialog); } if (!av_bprint_is_complete(&s->buffer)) From patchwork Mon Apr 19 14:09:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27024 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp556784iob; Mon, 19 Apr 2021 07:13:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL67gDEKziavZBa5U+M6dWVm1J2IAuL42nSn1Gf3DKBz1MkzvHC8EdwHQu5Khgs9fYcGPE X-Received: by 2002:a05:6402:1109:: with SMTP id u9mr26290738edv.174.1618841582189; Mon, 19 Apr 2021 07:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841582; cv=none; d=google.com; s=arc-20160816; b=bABH7pnT5Bmf4cVZBZiorGsEqSEV8e3l5q/0WAL6LfrKouVxOWPIEuMF5fDtVi/qVT 9wkZtK71l/fpmaPJC21vOt7+b6ycQiQXgRHlIs3/YsyWQ+WT3DRVJPsOs6x64optrOmm 3KbhlVluurTtIjqB0HryWIGOFULbN4DQu6DsXZAJ57M094b9Ef9/UO2v0TCTEXJ4m8Zv L7SQgPMZbBGLTZnHSrAA9PlXi0dKA52ahGB7P04UAwAi9kp49pC8p+xWIqLccXDYGKSM v4V0Y8uedkZcDH6MBNusbyHOM66tsu9ph5uM5ft2hoUzmqV02V+N4rrBHXjkw5De9kAh lOGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=p/kboUYbcqHmR22aIHEfGP6ydX/R5B5oPtj/vEZKXEA=; b=Qx+jtD9bMzgx6VNuwtiFz18UT2wuMRp2ztjC991ZA+lOh4Yk4Xnz//+IQvDYv1EftQ TreXsA+U7iayExjk4wmHi8PTdcCuxufVmWLR+HkcqgRutQ4VXuEHJRqFn58H5bwmx0rs 1gPDGuK2UEIp8Yt/sA5wzWwZ6Pmp18pil1vAhqINfIRRZGdMDX/RNLzv8fszn+v8TFM0 CU30lglEfPdFNkWy0wUvvuHHb1hL4naUn5+HjhkizpLv4QJfBtmutrk/NyOFTETVMx2C Xo3hTSFiC/RBXct364z6lI6txfUYcPUnlO5BhZPUEOq65t8Dr+a6FExB3vGVNB4BfuqK mDWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=scwFy54g; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t16si13299181edi.299.2021.04.19.07.13.01; Mon, 19 Apr 2021 07:13:02 -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=@gmail.com header.s=20161025 header.b=scwFy54g; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DD430680C0F; Mon, 19 Apr 2021 17:11:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 065CC680B72 for ; Mon, 19 Apr 2021 17:11:29 +0300 (EEST) Received: by mail-qt1-f169.google.com with SMTP id 18so12715449qtz.6 for ; Mon, 19 Apr 2021 07:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=unKxoBvpAK6IPgLwXYkW/pWj1LpQAgEKY3aucDiWnIU=; b=scwFy54g47yCsutjDrI69QTlhI1uxeXXwwMkxu99DGfMecYufviCDZhaJtttsIMC4U IDMzlIn5cc0D4FYIWJ0gtHsFIzmygR7nby6C2R+TLhx5UHYI1HqW3/f/6UoxTq5JxxJN 7MQYf7frCRFoxU4ee2s/l0M/pG/W3i5nQlUcaWdEeTp1QtvY6x/JaNX6VWIQCT0j5dSQ CKZRpt/aP5yAw53b3s36L1qqsG+hViero4DO1jXugFmm57oKxi14sbEPrKsg9ajeKq01 K9IXEaEleJFxzjNUTpiQWXoMzIQf8j7+HpwkQ+oxruUWVtOvEa/QfzTV+kpWU/r5hWVa 4yHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=unKxoBvpAK6IPgLwXYkW/pWj1LpQAgEKY3aucDiWnIU=; b=tffxpwCax4sZBQXxAr0vllQADqTpWUnvWA7nlgk8sV1ArU01z2LlHZaHhXSiltyfjs eWW5CENmKNpHoDVAcMmEgQm4Yp1ljqHmxFyD5MmGRZWdU2dYOVIiaz2OZEAQl03h9UHP fTy9YO6ALZynkKr3H15I8UAWyYnMF3xpPHP0jVQOGmB5kYpyFq8vsJzajVtCBtdoO1iW DtKtXv9oadeugDCzXkTixuGLfqmzLeLvZ7D5+O2XwI00hhLuKgEvceRJEBFH9U/2Ycvc Vvk+s3omVWAKbhm9CZ227KWetMWgHS5KQo6RJi3pj+BRWeVJdrYEGzpW5aUit2ItoW9s b1pg== X-Gm-Message-State: AOAM530Vqtq0RDAWI1tZSMHrRosqCOBKPcJ8PqOaKpc5KYJgFhogRFoV C6AoRMMBWOoMeBWFKxD6XUFPTK9e/VI= X-Received: by 2002:a05:622a:1487:: with SMTP id t7mr11465128qtx.345.1618841488361; Mon, 19 Apr 2021 07:11:28 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:28 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:19 -0300 Message-Id: <20210419141024.8174-23-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 22/87] avcodec: Remove deprecated avcodec_get_context_defaults3 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 9p1ZnZBhE0hH From: Andreas Rheinhardt Deprecated in 04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 9 --------- libavcodec/options.c | 7 ------- libavcodec/version.h | 3 --- 3 files changed, 19 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index a3c8c425cb..cbc1556e0e 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2545,15 +2545,6 @@ AVCodecContext *avcodec_alloc_context3(const AVCodec *codec); */ void avcodec_free_context(AVCodecContext **avctx); -#if FF_API_GET_CONTEXT_DEFAULTS -/** - * @deprecated This function should not be used, as closing and opening a codec - * context multiple time is not supported. A new codec context should be - * allocated for each new use. - */ -int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec); -#endif - /** * Get the AVClass for AVCodecContext. It can be used in combination with * AV_OPT_SEARCH_FAKE_OBJ for examining options. diff --git a/libavcodec/options.c b/libavcodec/options.c index b8d4a9faf6..833072b192 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -160,13 +160,6 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec) return 0; } -#if FF_API_GET_CONTEXT_DEFAULTS -int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) -{ - return init_context_defaults(s, codec); -} -#endif - AVCodecContext *avcodec_alloc_context3(const AVCodec *codec) { AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext)); diff --git a/libavcodec/version.h b/libavcodec/version.h index af737afce1..0ce49e6892 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -66,9 +66,6 @@ #ifndef FF_API_COPY_CONTEXT #define FF_API_COPY_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_GET_CONTEXT_DEFAULTS -#define FF_API_GET_CONTEXT_DEFAULTS (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_NVENC_OLD_NAME #define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27025 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp556952iob; Mon, 19 Apr 2021 07:13:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVLXRSmNpaXDdBJVl4/k54ttg+QBsMEXmGsaFpXxa8iU6aSMFIqncIBnTytk5WuIaV2btq X-Received: by 2002:a05:6402:290:: with SMTP id l16mr15296209edv.337.1618841593849; Mon, 19 Apr 2021 07:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841593; cv=none; d=google.com; s=arc-20160816; b=ENgd7p1P+rSdpPQRppYO6dvI/wSi/BPQlVMcPcAf54k4+R8Ml23YBIg+a69Su9mpHE eYZgntlhRKY5Lvv5klTbRFExDArn83i0US86Rss4wu+73I4V2YREiR2uMKaWhsfYdj6q fZrlqCan0JvGroYtpqR7v3VE1b9PjWkQJCnErtL3AX9OJinTCVshp7+uvmN7iSqYhZyH L9855ZHY7j+g2eVFw2gr1IE5gOLdQ6xAyI/X9/kpTKpBdh/wa5RUuBjIcXcAW7g1xnZk Un9Ok/3tZDDctaFtAMq5qyojaXdppHJCSFeB4KOlBlWDDoDspGrv9X233UlAukj4gaE4 qPTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=cL75Fu3jyPr5/IBggoyBpEjJ0TN9QXRzHdvbrXdH6zA=; b=SKSB7Skkrx8I4PEzswczPesORsmGCG3nSAElI/Q3g9xcNM8hPAGPl0uOETnGxlMcxa qarUzWb17DpY25cXsMGtEVT5LfOIKjvlRqNZumeX+zZRemf3e4/48+tQiWYvMk26hfub /E2Uis1a5U66fNO9XFCk0GJZqR2Z75Ub2O/xREd2MDxYQFu3YEn+YrO4k1s0qqvey183 9loArP20jUo8S9AcDb4CjXGsHTn8K9m7W4QQGIRsf7eicPR4Imr4/rHe8hzG0i6J2NtP gxd7lgCovQ7Pe6zHN0S2NY8vNov9rbAPgEddo10ymdFjiv44OI9zlnpSkRpthal2o7UV yfIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=KavlkHeN; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b13si8181305ede.310.2021.04.19.07.13.13; Mon, 19 Apr 2021 07:13: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=@gmail.com header.s=20161025 header.b=KavlkHeN; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A3CC0680C51; Mon, 19 Apr 2021 17:11:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 30A23680BD5 for ; Mon, 19 Apr 2021 17:11:30 +0300 (EEST) Received: by mail-qk1-f175.google.com with SMTP id o5so35879670qkb.0 for ; Mon, 19 Apr 2021 07:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qhk+kmbnxLjs3iVPj4UwIPxXhGxRl0xIuVKE2NaFIes=; b=KavlkHeNgD4p8OyZJIC5bdtsIeARu6QTFrkk+Y11suGRi0vtWp1R6hW+BUWv9rwmfQ eTeFKOXByX6+3n+WdkJNMvzJlcaUcDfaCehx6WLwjAfMox46drGFsSBxt2ims0tZnX2f Q1wXT0dxJ8V9s+jlzNuhg02Mf4P3IRDZIw3IwjE/X43gdlXSMhR6l72PraEpjyPHsVeF Olr9vD0CGb+4ZiXdfNRTjBSiRde+Jm5V2TLaYLZ7cdEdfzcvjSLLuBX4tG7Z5rs19qwm SM1KP2wibZrLnmNWwmUdknGfoz675xIXjMkuUbjJ1R0b6D8nwAQ65iMZr6WjKH1GGOuj EOBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qhk+kmbnxLjs3iVPj4UwIPxXhGxRl0xIuVKE2NaFIes=; b=JeFcdgxZXY1PVDdZO8a/SiXyX3S4cyXma/QtSVovilnbaW4z+kA0bID82J6T/Yf2MS V8vsssl+Q2lO80GKlqJLytA5+L0WbhbyYs/9roXJn5UfFeBVWGgJiW9LI9sSQCzk9kBi Bwj8uWJecJ0CPqAMKOk4S2YMeJoIRK0flK6Or5YhD3ZIU0rC07yiF4jo66L/yz44PPKN S8s5u76oknXFQLYD1Sk40BgtuVF8nr9s7tGBF/DjiU6j2vxd+LmlOqya2H6IhaQA8bOX QQvfvLgFPiPSNzcD3+baK2uGNsbukgV12A75niYgPVM8M2SWSJIUJXj/TB7SjUsIGQLX HGAQ== X-Gm-Message-State: AOAM533S5Bh4DvM5lAUH2GeSc3K0kP06MLjKjsb5BfiF65rz4+GZM05I lOUuUlfPjYG/zqWdI1A1GYNJd+dPkgI= X-Received: by 2002:a37:e412:: with SMTP id y18mr6051480qkf.40.1618841489462; Mon, 19 Apr 2021 07:11:29 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:29 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:20 -0300 Message-Id: <20210419141024.8174-24-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 23/87] avcodec/options: Remove deprecated avcodec_copy_context 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mweZ2yTrkMUv From: Andreas Rheinhardt Deprecated in 5f30ac27795f9f98043e8582ccaad8813104adc4. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 22 --------- libavcodec/options.c | 105 ------------------------------------------- libavcodec/version.h | 3 -- 3 files changed, 130 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index cbc1556e0e..ea60e1fe46 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2569,28 +2569,6 @@ const AVClass *avcodec_get_frame_class(void); */ const AVClass *avcodec_get_subtitle_rect_class(void); -#if FF_API_COPY_CONTEXT -/** - * Copy the settings of the source AVCodecContext into the destination - * AVCodecContext. The resulting destination codec context will be - * unopened, i.e. you are required to call avcodec_open2() before you - * can use this AVCodecContext to decode/encode video/audio data. - * - * @param dest target codec context, should be initialized with - * avcodec_alloc_context3(NULL), but otherwise uninitialized - * @param src source codec context - * @return AVERROR() on error (e.g. memory allocation error), 0 on success - * - * @deprecated The semantics of this function are ill-defined and it should not - * be used. If you need to transfer the stream parameters from one codec context - * to another, use an intermediate AVCodecParameters instance and the - * avcodec_parameters_from_context() / avcodec_parameters_to_context() - * functions. - */ -attribute_deprecated -int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src); -#endif - /** * Fill the parameters struct based on the values from the supplied codec * context. Any allocated fields in par are freed and replaced with duplicates diff --git a/libavcodec/options.c b/libavcodec/options.c index 833072b192..369110b8d0 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -193,111 +193,6 @@ void avcodec_free_context(AVCodecContext **pavctx) av_freep(pavctx); } -#if FF_API_COPY_CONTEXT -static void copy_context_reset(AVCodecContext *avctx) -{ - int i; - - av_opt_free(avctx); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - av_frame_free(&avctx->coded_frame); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - av_freep(&avctx->rc_override); - av_freep(&avctx->intra_matrix); - av_freep(&avctx->inter_matrix); - av_freep(&avctx->extradata); - av_freep(&avctx->subtitle_header); - av_buffer_unref(&avctx->hw_frames_ctx); - av_buffer_unref(&avctx->hw_device_ctx); - for (i = 0; i < avctx->nb_coded_side_data; i++) - av_freep(&avctx->coded_side_data[i].data); - av_freep(&avctx->coded_side_data); - avctx->subtitle_header_size = 0; - avctx->nb_coded_side_data = 0; - avctx->extradata_size = 0; -} - -int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) -{ - const AVCodec *orig_codec = dest->codec; - uint8_t *orig_priv_data = dest->priv_data; - - if (avcodec_is_open(dest)) { // check that the dest context is uninitialized - av_log(dest, AV_LOG_ERROR, - "Tried to copy AVCodecContext %p into already-initialized %p\n", - src, dest); - return AVERROR(EINVAL); - } - - copy_context_reset(dest); - - memcpy(dest, src, sizeof(*dest)); - av_opt_copy(dest, src); - - dest->priv_data = orig_priv_data; - dest->codec = orig_codec; - - if (orig_priv_data && src->codec && src->codec->priv_class && - dest->codec && dest->codec->priv_class) - av_opt_copy(orig_priv_data, src->priv_data); - - - /* set values specific to opened codecs back to their default state */ - dest->slice_offset = NULL; - dest->hwaccel = NULL; - dest->internal = NULL; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - dest->coded_frame = NULL; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - - /* reallocate values that should be allocated separately */ - dest->extradata = NULL; - dest->coded_side_data = NULL; - dest->intra_matrix = NULL; - dest->inter_matrix = NULL; - dest->rc_override = NULL; - dest->subtitle_header = NULL; - dest->hw_frames_ctx = NULL; - dest->hw_device_ctx = NULL; - dest->nb_coded_side_data = 0; - -#define alloc_and_copy_or_fail(obj, size, pad) \ - if (src->obj && size > 0) { \ - dest->obj = av_malloc(size + pad); \ - if (!dest->obj) \ - goto fail; \ - memcpy(dest->obj, src->obj, size); \ - if (pad) \ - memset(((uint8_t *) dest->obj) + size, 0, pad); \ - } - alloc_and_copy_or_fail(extradata, src->extradata_size, - AV_INPUT_BUFFER_PADDING_SIZE); - dest->extradata_size = src->extradata_size; - alloc_and_copy_or_fail(intra_matrix, 64 * sizeof(int16_t), 0); - alloc_and_copy_or_fail(inter_matrix, 64 * sizeof(int16_t), 0); - alloc_and_copy_or_fail(rc_override, src->rc_override_count * sizeof(*src->rc_override), 0); - alloc_and_copy_or_fail(subtitle_header, src->subtitle_header_size, 1); - av_assert0(dest->subtitle_header_size == src->subtitle_header_size); -#undef alloc_and_copy_or_fail - - if (src->hw_frames_ctx) { - dest->hw_frames_ctx = av_buffer_ref(src->hw_frames_ctx); - if (!dest->hw_frames_ctx) - goto fail; - } - - return 0; - -fail: - copy_context_reset(dest); - return AVERROR(ENOMEM); -} -#endif - const AVClass *avcodec_get_class(void) { return &av_codec_context_class; diff --git a/libavcodec/version.h b/libavcodec/version.h index 0ce49e6892..4c1c4b257e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -63,9 +63,6 @@ #ifndef FF_API_VBV_DELAY #define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_COPY_CONTEXT -#define FF_API_COPY_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_NVENC_OLD_NAME #define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27014 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp557120iob; Mon, 19 Apr 2021 07:13:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuuEBbXxM0nC5z3WWr+Muu+xUOjO+4CoepTPOGz88bQzpZohxQib2bDcL14W/fpr35rICv X-Received: by 2002:a17:907:98ae:: with SMTP id ju14mr22806771ejc.287.1618841604499; Mon, 19 Apr 2021 07:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841604; cv=none; d=google.com; s=arc-20160816; b=Rj+SvVL6WhJuMjowpVOb6jfP9BiXXYHmPf4ZYGmcleEeCyxhtLTshFF0TsKvOdaetn fsuIE+nLAl1WwvLV9TDvjsT4SF03x5KIWbluWApIiggayFErKGd8K20otN1PaYxBuY54 OpzGt0HqSecxgzTp3Zbw9tnM/VzmBAZl3GWXXEgLLLb+lSVfJV8acpmKnfk/M9Fz84Eo PmZH2fnkVWHdv6Gcy25exFOILFwL2+NrKqhy+aYyZT+yrw0zDZNt5AAtqSPCppZz4r0F qmQWVRJX3qgjRFiEeZ2mlArvp4ax76UKQ6Um+xDPYFNcfzGCZrtzAP6wXtZi18gZvURP Klqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=QfzxAkove/AStZuvQW/cYqKN2XuAL1EuyyuPANfS/Ok=; b=fkvdVZ6QyZxvLOZ2CjWXJylyKRdcKjv/NNRBtYWvOV8hM4CELFmAEPdzZsTsmvVBKf g7SoEr7CDsXki/v7+SoZX3KDHVLDF/baUAOyEirNI+yqY+EAntChqdT3g+KOpJGoTg9n TMLUZr/TbtRsIc8SZm4hxsEm2wHrFW/CP4LHxCNgd1ZVUKhmOZI3cLSgXe6g0CKIisxu +rn8OwsEnUqc6mABWCYdcGc9KiQ8KEs7itP/haPBCI5Hoo/CmgfatNXaIubBTimhdIso dWSH8e2p6xHbCrG+rWVbccEzrWhihfw3J/+vvM17V0Ot5XP4gLPDeT/TifRoRqtNnC/E qzKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=OaNwv0g9; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m11si10697219edq.183.2021.04.19.07.13.24; Mon, 19 Apr 2021 07:13: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=@gmail.com header.s=20161025 header.b=OaNwv0g9; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A5139680C78; Mon, 19 Apr 2021 17:11:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9CF60680C47 for ; Mon, 19 Apr 2021 17:11:32 +0300 (EEST) Received: by mail-qv1-f54.google.com with SMTP id ef17so11259008qvb.0 for ; Mon, 19 Apr 2021 07:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZiDpdVp+OeaSpkm+OjcP+ZRLXTgaDvAn0OtraXPpUIo=; b=OaNwv0g9qbRaJO/7TF4SiXJR21m4yBsCt8IendiohDP+lN2qcHumLfoaqEKNxXGgXG QLyGRxSJZUX+hoChdUaR8oFhXX+yokhkhTT/WGnllin3lofwhXYeWEUsAZl0WB5mdq01 2pFgp2erSnb1nrvwMdgmvzXgeEyIigt2KLqFpI5zOctrBYvzrX8EEey61kowzT0geLPW jvkJX6b6Nei4+CWCFBNX9ohSqR09Ec2trBCarn1z97iTsFFf8N293pvGSnKIr54cocb0 hlWWESvP22WtVf4pHd3MCLorqkxRbChFRa0Qf4hiaXrib3snpx7kmy5D676P1Eiz+bDZ SGRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZiDpdVp+OeaSpkm+OjcP+ZRLXTgaDvAn0OtraXPpUIo=; b=jqadSiB1ihUoCE+TRQMxVGZ3AliykDe79FBrFyx+vE3hrvqnWLFEcbGJ5YYC5k6qxq CPV80BZrWScSEAXFdg2xrjzjj7gBMCRJ2ahDwnfCl5I8aQHLUXdCs4/YD+2Sh9Hv4xt/ lYjFBbG9WHlXJheyXF8qdL+NXriE0N1lqKiUy9FKI9/KdE9gmS4TfIS9hlSFGCR9rHxe VZ3l37ui9FW2RN3tHdMxugd9rfKJMvdrCQfz4dJ2S7t71df6iLOqYo48wuu2mrfgic25 TBaHfou/4EA1Eb0Q4U46Z8l0sf3JXUDQRJmBhOB8Z7pcwvEM6Ir1/+TPM8sC+8t9MP5+ e7jw== X-Gm-Message-State: AOAM532HE0EvnJBLAdQwj3iUvpQORJeygj+5p3dEIdxcJD4Nedbhx0eo 34QlOOkah3qviFK2d0WXuLKkOBxGAwg= X-Received: by 2002:a0c:c488:: with SMTP id u8mr21275869qvi.47.1618841490976; Mon, 19 Apr 2021 07:11:30 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:30 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:21 -0300 Message-Id: <20210419141024.8174-25-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 24/87] avcodec/vdpau: Remove deprecated av_vdpau_get_profile 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1IIT33PONYmA From: Andreas Rheinhardt Deprecated in b10b6ac7a902f28e09e37a29c392e2f0c19e9526. Signed-off-by: Andreas Rheinhardt --- libavcodec/vdpau.c | 49 -------------------------------------------- libavcodec/vdpau.h | 19 ----------------- libavcodec/version.h | 3 --- 3 files changed, 71 deletions(-) diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index fa10905c75..f20dbd78e2 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -397,55 +397,6 @@ int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx, return 0; } -#if FF_API_VDPAU_PROFILE -int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile) -{ -#define PROFILE(prof) \ -do { \ - *profile = VDP_DECODER_PROFILE_##prof; \ - return 0; \ -} while (0) - - switch (avctx->codec_id) { - case AV_CODEC_ID_MPEG1VIDEO: PROFILE(MPEG1); - case AV_CODEC_ID_MPEG2VIDEO: - switch (avctx->profile) { - case FF_PROFILE_MPEG2_MAIN: PROFILE(MPEG2_MAIN); - case FF_PROFILE_MPEG2_SIMPLE: PROFILE(MPEG2_SIMPLE); - default: return AVERROR(EINVAL); - } - case AV_CODEC_ID_H263: PROFILE(MPEG4_PART2_ASP); - case AV_CODEC_ID_MPEG4: - switch (avctx->profile) { - case FF_PROFILE_MPEG4_SIMPLE: PROFILE(MPEG4_PART2_SP); - case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: PROFILE(MPEG4_PART2_ASP); - default: return AVERROR(EINVAL); - } - case AV_CODEC_ID_H264: - switch (avctx->profile & ~FF_PROFILE_H264_INTRA) { - case FF_PROFILE_H264_BASELINE: PROFILE(H264_BASELINE); - case FF_PROFILE_H264_CONSTRAINED_BASELINE: - case FF_PROFILE_H264_MAIN: PROFILE(H264_MAIN); - case FF_PROFILE_H264_HIGH: PROFILE(H264_HIGH); -#ifdef VDP_DECODER_PROFILE_H264_EXTENDED - case FF_PROFILE_H264_EXTENDED: PROFILE(H264_EXTENDED); -#endif - default: return AVERROR(EINVAL); - } - case AV_CODEC_ID_WMV3: - case AV_CODEC_ID_VC1: - switch (avctx->profile) { - case FF_PROFILE_VC1_SIMPLE: PROFILE(VC1_SIMPLE); - case FF_PROFILE_VC1_MAIN: PROFILE(VC1_MAIN); - case FF_PROFILE_VC1_ADVANCED: PROFILE(VC1_ADVANCED); - default: return AVERROR(EINVAL); - } - } - return AVERROR(EINVAL); -#undef PROFILE -} -#endif /* FF_API_VDPAU_PROFILE */ - AVVDPAUContext *av_vdpau_alloc_context(void) { return av_mallocz(sizeof(VDPAUHWContext)); diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h index 4d99943369..3010094d93 100644 --- a/libavcodec/vdpau.h +++ b/libavcodec/vdpau.h @@ -55,7 +55,6 @@ #include "libavutil/attributes.h" #include "avcodec.h" -#include "version.h" struct AVCodecContext; struct AVFrame; @@ -153,24 +152,6 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type, */ AVVDPAUContext *av_vdpau_alloc_context(void); -#if FF_API_VDPAU_PROFILE -/** - * Get a decoder profile that should be used for initializing a VDPAU decoder. - * Should be called from the AVCodecContext.get_format() callback. - * - * @deprecated Use av_vdpau_bind_context() instead. - * - * @param avctx the codec context being used for decoding the stream - * @param profile a pointer into which the result will be written on success. - * The contents of profile are undefined if this function returns - * an error. - * - * @return 0 on success (non-negative), a negative AVERROR on failure. - */ -attribute_deprecated -int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile); -#endif - /* @}*/ #endif /* AVCODEC_VDPAU_H */ diff --git a/libavcodec/version.h b/libavcodec/version.h index 4c1c4b257e..a785e18c9e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -54,9 +54,6 @@ #ifndef FF_API_CODED_FRAME #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_VDPAU_PROFILE -#define FF_API_VDPAU_PROFILE (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_AVPICTURE #define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27087 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp575566iob; Mon, 19 Apr 2021 07:35:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqAhfjfRH+LhsKUzHrkwUO8JgR5k4xdA9jNnXQGvdsbbFrmZMY980ZnqBRDPnPSDjif+Yr X-Received: by 2002:aa7:d787:: with SMTP id s7mr7682609edq.240.1618842910664; Mon, 19 Apr 2021 07:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842910; cv=none; d=google.com; s=arc-20160816; b=Ho11+zgtm3cpdYkGsWS4x1oCR6NiTbhGKFZchjXETDm8fZG0CCckyf+Ea5+TrSOxva T19ilCcgKV/oBHtuIzfNJdDBTGhoiHiWgZhpVf7DGFKWdQsabdlw713Dak32om3j3FSv 55uCxeiWNk/9Cxu7WMab8CJ6g6jlp9BdYikJogyB6kiDkHRa6StpV0kI9KPI/2K8hlWA Ro6G5IPH1QyYOhknjWImdEa85U/jCtgfxtTrwvHEQcb4Aps8m3M1eGF7N1OAvnzLFK46 2jEGr4F8OsLBedIN418B4LvP0/+jDwtekb1+wBdVt9Yh8ozg1KK1T8GOzF54fGz9eKNe UuQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=+jony3Jrp1EedJC2vH5iJk5uPXxwvM6mZ63DHinsOlc=; b=oEySsOxjZK8Fdsoe5d6Ql7fzd4Y2Dx2VOVtrNy71tK5AUakYS+fEf164ntXctKUym+ 9hfZJT+Xxm0wjXxp+0hSZjDMYQHiXBzyL1bGMyBJKO6xkkuHKlVmyJ7KV0kxs+zW7O+B CztRur31X8lmjClnuDyHaNquDyUHdKDwP50MleXfYAndrEyp1MRXvnqG4qlFRhjeN89u MPPQDMb5TeNGkT24viXXkVLbzA3zFdenS3PtSrk3eFMQ5F6BPp4ayjyuDRh+ItsU6SEv wWe1tciKhXGSkMq7kAwvVaBKVfZUhYtq7mrGfQCFMQqOl8rPAP/pnm2blKAloZGLnzCi HPRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="jpg/Y5fA"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x9si6307665eje.242.2021.04.19.07.35.09; Mon, 19 Apr 2021 07:35: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=@gmail.com header.s=20161025 header.b="jpg/Y5fA"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C847068A26A; Mon, 19 Apr 2021 17:35:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4C7A5689D6C for ; Mon, 19 Apr 2021 17:35:00 +0300 (EEST) Received: by mail-pg1-f174.google.com with SMTP id z16so24378853pga.1 for ; Mon, 19 Apr 2021 07:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FSsqgO/7D/x8+LJC+Nn5dZUM01HRhwIE1yDVktF7fBA=; b=jpg/Y5fAg9pKYsV3aqk2/iyFjLVE0aizrwvoEnZoRJ1tEeD4GfPQUcVXnYjWdyokUQ ZPS1YnTP3eNSZho8WF18n23vHNW7UWWTeh1jrVgzS4jZRG2xHsVpyjP24qnCljyPABz9 zMEkQ8i38rUYqyDs2eAdJAg0ptZevTiV8gM95QFQgM2I6qrgyRCuxrCoYwYbZDutXDtC vgYZNOieIH1lal7Tfi5cT48RTEhyykKkZk8prtR29hHGsbEHsUhWoySqxuGA/tBYDk7N uN/Odz7ADi80TZZz5ag7ZtWcEYwj2wCm4xABrVEEipBRFatyT5o+3Kkwqg2PZLBmAdxR MtBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FSsqgO/7D/x8+LJC+Nn5dZUM01HRhwIE1yDVktF7fBA=; b=gfnPvXvWGocXpd+xF29XD0yskPaZ3Dx1kHeMoBKP6UhBPQXegdNUscipZLkMXju6Fg OJQm6lkx5KWxGbZVU8wyMqkXubu4Gmy8r1L7e+Uv6sv/RdefjIJwGj0ElpfL8sAnpP6U J2X0Hh0RTrljcGheutYQ682dnB+arwP3zZFxe0m8olDw+e3HXLTXcab0+wtlFM1PzyFm SvsN0rxtENw+2YI1b22OZv2X/80HvdM+DBhZFy2Dq49CEV0V0+qEeqL1UhzUcpWvgT4H LixxPGCf2Dkafhpad6dbHj+d+K0SVh6YjK2Tl399dz40va6p7nuG4Ke2Ke9vt8tGVIYm Q52g== X-Gm-Message-State: AOAM530Ovgb/Y5PsFwN7jMQ6AmjUisvQKpUhRk608/fwDMFBOgqITIjW nWdUs6c4FBwGdi4TNDMFIpqDrXPlzMo= X-Received: by 2002:ad4:538a:: with SMTP id i10mr21716255qvv.9.1618841492219; Mon, 19 Apr 2021 07:11:32 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:31 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:22 -0300 Message-Id: <20210419141024.8174-26-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 25/87] avcodec: Remove deprecated AVPicture 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: bzctGdQiAaN3 From: Andreas Rheinhardt Deprecated in a17a7661906ba295d67afd80ac0770422e1b02b3. Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 2 - libavcodec/avcodec.h | 99 -------------------- libavcodec/avpicture.c | 82 ---------------- libavcodec/dvbsubdec.c | 12 --- libavcodec/dvdsubdec.c | 18 ---- libavcodec/dvdsubenc.c | 14 --- libavcodec/imgconvert.c | 156 +------------------------------ libavcodec/libzvbi-teletextdec.c | 9 -- libavcodec/pgssubdec.c | 14 --- libavcodec/tests/.gitignore | 1 - libavcodec/tests/imgconvert.c | 46 --------- libavcodec/version.h | 3 - libavcodec/xsubdec.c | 14 --- libavcodec/xsubenc.c | 13 --- 14 files changed, 1 insertion(+), 482 deletions(-) delete mode 100644 libavcodec/avpicture.c delete mode 100644 libavcodec/tests/imgconvert.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index c11645616d..31b220025b 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -32,7 +32,6 @@ OBJS = ac3_parser.o \ avcodec.o \ avdct.o \ avpacket.o \ - avpicture.o \ bitstream.o \ bitstream_filters.o \ bsf.o \ @@ -1213,7 +1212,6 @@ TESTPROGS = avpacket \ celp_math \ codec_desc \ htmlsubtitles \ - imgconvert \ jpeg2000dwt \ mathops \ utils \ diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index ea60e1fe46..315246e68e 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2418,33 +2418,6 @@ typedef struct AVHWAccel { * @} */ -#if FF_API_AVPICTURE -/** - * @defgroup lavc_picture AVPicture - * - * Functions for working with AVPicture - * @{ - */ - -/** - * Picture data structure. - * - * Up to four components can be stored into it, the last component is - * alpha. - * @deprecated use AVFrame or imgutils functions instead - */ -typedef struct AVPicture { - attribute_deprecated - uint8_t *data[AV_NUM_DATA_POINTERS]; ///< pointers to the image data planes - attribute_deprecated - int linesize[AV_NUM_DATA_POINTERS]; ///< number of bytes per line -} AVPicture; - -/** - * @} - */ -#endif - enum AVSubtitleType { SUBTITLE_NONE, @@ -2472,13 +2445,6 @@ typedef struct AVSubtitleRect { int h; ///< height of pict, undefined when pict is not set int nb_colors; ///< number of colors in pict, undefined when pict is not set -#if FF_API_AVPICTURE - /** - * @deprecated unused - */ - attribute_deprecated - AVPicture pict; -#endif /** * data+linesize for the bitmap of this subtitle. * Can be set for text/ass as well once they are rendered. @@ -3445,71 +3411,6 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, * @} */ -#if FF_API_AVPICTURE -/** - * @addtogroup lavc_picture - * @{ - */ - -/** - * @deprecated unused - */ -attribute_deprecated -int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height); - -/** - * @deprecated unused - */ -attribute_deprecated -void avpicture_free(AVPicture *picture); - -/** - * @deprecated use av_image_fill_arrays() instead. - */ -attribute_deprecated -int avpicture_fill(AVPicture *picture, const uint8_t *ptr, - enum AVPixelFormat pix_fmt, int width, int height); - -/** - * @deprecated use av_image_copy_to_buffer() instead. - */ -attribute_deprecated -int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt, - int width, int height, - unsigned char *dest, int dest_size); - -/** - * @deprecated use av_image_get_buffer_size() instead. - */ -attribute_deprecated -int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); - -/** - * @deprecated av_image_copy() instead. - */ -attribute_deprecated -void av_picture_copy(AVPicture *dst, const AVPicture *src, - enum AVPixelFormat pix_fmt, int width, int height); - -/** - * @deprecated unused - */ -attribute_deprecated -int av_picture_crop(AVPicture *dst, const AVPicture *src, - enum AVPixelFormat pix_fmt, int top_band, int left_band); - -/** - * @deprecated unused - */ -attribute_deprecated -int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt, - int padtop, int padbottom, int padleft, int padright, int *color); - -/** - * @} - */ -#endif - /** * @defgroup lavc_misc Utility functions * @ingroup libavc diff --git a/libavcodec/avpicture.c b/libavcodec/avpicture.c deleted file mode 100644 index 56435f4fc9..0000000000 --- a/libavcodec/avpicture.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * AVPicture management routines - * Copyright (c) 2001, 2002, 2003 Fabrice Bellard - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * AVPicture management routines - */ - -#include "avcodec.h" -#include "internal.h" -#include "libavutil/common.h" -#include "libavutil/pixdesc.h" -#include "libavutil/imgutils.h" -#include "libavutil/internal.h" -#include "libavutil/colorspace.h" - -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS -int avpicture_fill(AVPicture *picture, const uint8_t *ptr, - enum AVPixelFormat pix_fmt, int width, int height) -{ - return av_image_fill_arrays(picture->data, picture->linesize, - ptr, pix_fmt, width, height, 1); -} - -int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, int width, int height, - unsigned char *dest, int dest_size) -{ - return av_image_copy_to_buffer(dest, dest_size, - (const uint8_t * const*)src->data, src->linesize, - pix_fmt, width, height, 1); -} - -int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height) -{ - return av_image_get_buffer_size(pix_fmt, width, height, 1); -} - -int avpicture_alloc(AVPicture *picture, - enum AVPixelFormat pix_fmt, int width, int height) -{ - int ret = av_image_alloc(picture->data, picture->linesize, - width, height, pix_fmt, 1); - if (ret < 0) { - memset(picture, 0, sizeof(AVPicture)); - return ret; - } - - return 0; -} - -void avpicture_free(AVPicture *picture) -{ - av_freep(&picture->data[0]); -} - -void av_picture_copy(AVPicture *dst, const AVPicture *src, - enum AVPixelFormat pix_fmt, int width, int height) -{ - av_image_copy(dst->data, dst->linesize, (const uint8_t **)src->data, - src->linesize, pix_fmt, width, height); -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif /* FF_API_AVPICTURE */ diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index ec2304bfb9..7db1fef216 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -832,18 +832,6 @@ static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_ou memcpy(rect->data[1], region->computed_clut, sizeof(region->computed_clut)); } -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS -{ - int j; - for (j = 0; j < 4; j++) { - rect->pict.data[j] = rect->data[j]; - rect->pict.linesize[j] = rect->linesize[j]; - } -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - i++; } } diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index bf49788e1b..91906b9df4 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -409,15 +409,6 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, sub_header->rects[0]->type = SUBTITLE_BITMAP; sub_header->rects[0]->linesize[0] = w; sub_header->rects[0]->flags = is_menu ? AV_SUBTITLE_FLAG_FORCED : 0; - -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS - for (i = 0; i < 4; i++) { - sub_header->rects[0]->pict.data[i] = sub_header->rects[0]->data[i]; - sub_header->rects[0]->pict.linesize[i] = sub_header->rects[0]->linesize[i]; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif } } if (next_cmd_pos < cmd_pos) { @@ -504,15 +495,6 @@ static int find_smallest_bounding_rectangle(DVDSubContext *ctx, AVSubtitle *s) s->rects[0]->x += x1; s->rects[0]->y += y1; -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS - for (i = 0; i < 4; i++) { - s->rects[0]->pict.data[i] = s->rects[0]->data[i]; - s->rects[0]->pict.linesize[i] = s->rects[0]->linesize[i]; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - return 1; } diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index 9fa9d5b6d7..e55e2eab4f 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -279,20 +279,6 @@ static int encode_dvd_subtitles(AVCodecContext *avctx, break; } -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS - for (i = 0; i < rects; i++) - if (!h->rects[i]->data[0]) { - AVSubtitleRect *rect = h->rects[i]; - int j; - for (j = 0; j < 4; j++) { - rect->data[j] = rect->pict.data[j]; - rect->linesize[j] = rect->pict.linesize[j]; - } - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - vrect = *h->rects[0]; if (rects > 1) { diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index a3443d1c72..40300f836d 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -25,13 +25,8 @@ */ #include "avcodec.h" -#include "internal.h" -#include "mathops.h" -#include "libavutil/colorspace.h" -#include "libavutil/common.h" #include "libavutil/pixdesc.h" -#include "libavutil/internal.h" -#include "libavutil/imgutils.h" +#include "libavutil/pixfmt.h" #if FF_API_AVCODEC_PIX_FMT int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, @@ -72,152 +67,3 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *p return best; } -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS -/* return true if yuv planar */ -static inline int is_yuv_planar(const AVPixFmtDescriptor *desc) -{ - int i; - int planes[4] = { 0 }; - - if ( desc->flags & AV_PIX_FMT_FLAG_RGB - || !(desc->flags & AV_PIX_FMT_FLAG_PLANAR)) - return 0; - - /* set the used planes */ - for (i = 0; i < desc->nb_components; i++) - planes[desc->comp[i].plane] = 1; - - /* if there is an unused plane, the format is not planar */ - for (i = 0; i < desc->nb_components; i++) - if (!planes[i]) - return 0; - return 1; -} - -int av_picture_crop(AVPicture *dst, const AVPicture *src, - enum AVPixelFormat pix_fmt, int top_band, int left_band) -{ - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); - int y_shift; - int x_shift; - int max_step[4]; - - if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB) - return -1; - - y_shift = desc->log2_chroma_h; - x_shift = desc->log2_chroma_w; - av_image_fill_max_pixsteps(max_step, NULL, desc); - - if (is_yuv_planar(desc)) { - dst->data[0] = src->data[0] + (top_band * src->linesize[0]) + left_band; - dst->data[1] = src->data[1] + ((top_band >> y_shift) * src->linesize[1]) + (left_band >> x_shift); - dst->data[2] = src->data[2] + ((top_band >> y_shift) * src->linesize[2]) + (left_band >> x_shift); - } else{ - if(top_band % (1<data[0] = src->data[0] + (top_band * src->linesize[0]) + (left_band * max_step[0]); - } - - dst->linesize[0] = src->linesize[0]; - dst->linesize[1] = src->linesize[1]; - dst->linesize[2] = src->linesize[2]; - return 0; -} - -int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, - enum AVPixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, - int *color) -{ - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); - uint8_t *optr; - int y_shift; - int x_shift; - int yheight; - int i, y; - int max_step[4]; - - if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB) - return -1; - - if (!is_yuv_planar(desc)) { - if (src) - return -1; //TODO: Not yet implemented - - av_image_fill_max_pixsteps(max_step, NULL, desc); - - if (padtop || padleft) { - memset(dst->data[0], color[0], - dst->linesize[0] * padtop + (padleft * max_step[0])); - } - - if (padleft || padright) { - optr = dst->data[0] + dst->linesize[0] * padtop + - (dst->linesize[0] - (padright * max_step[0])); - yheight = height - 1 - (padtop + padbottom); - for (y = 0; y < yheight; y++) { - memset(optr, color[0], (padleft + padright) * max_step[0]); - optr += dst->linesize[0]; - } - } - - if (padbottom || padright) { - optr = dst->data[0] + dst->linesize[0] * (height - padbottom) - - (padright * max_step[0]); - memset(optr, color[0], dst->linesize[0] * padbottom + - (padright * max_step[0])); - } - - return 0; - } - - for (i = 0; i < 3; i++) { - x_shift = i ? desc->log2_chroma_w : 0; - y_shift = i ? desc->log2_chroma_h : 0; - - if (padtop || padleft) { - memset(dst->data[i], color[i], - dst->linesize[i] * (padtop >> y_shift) + (padleft >> x_shift)); - } - - if (padleft || padright) { - optr = dst->data[i] + dst->linesize[i] * (padtop >> y_shift) + - (dst->linesize[i] - (padright >> x_shift)); - yheight = (height - 1 - (padtop + padbottom)) >> y_shift; - for (y = 0; y < yheight; y++) { - memset(optr, color[i], (padleft + padright) >> x_shift); - optr += dst->linesize[i]; - } - } - - if (src) { /* first line */ - uint8_t *iptr = src->data[i]; - optr = dst->data[i] + dst->linesize[i] * (padtop >> y_shift) + - (padleft >> x_shift); - memcpy(optr, iptr, (width - padleft - padright) >> x_shift); - iptr += src->linesize[i]; - optr = dst->data[i] + dst->linesize[i] * (padtop >> y_shift) + - (dst->linesize[i] - (padright >> x_shift)); - yheight = (height - 1 - (padtop + padbottom)) >> y_shift; - for (y = 0; y < yheight; y++) { - memset(optr, color[i], (padleft + padright) >> x_shift); - memcpy(optr + ((padleft + padright) >> x_shift), iptr, - (width - padleft - padright) >> x_shift); - iptr += src->linesize[i]; - optr += dst->linesize[i]; - } - } - - if (padbottom || padright) { - optr = dst->data[i] + dst->linesize[i] * - ((height - padbottom) >> y_shift) - (padright >> x_shift); - memset(optr, color[i],dst->linesize[i] * - (padbottom >> y_shift) + (padright >> x_shift)); - } - } - - return 0; -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif /* FF_API_AVPICTURE */ diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c index 0cc389a28e..e056ea5ef0 100644 --- a/libavcodec/libzvbi-teletextdec.c +++ b/libavcodec/libzvbi-teletextdec.c @@ -641,7 +641,6 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *got_sub TeletextContext *ctx = avctx->priv_data; AVSubtitle *sub = data; int ret = 0; - int j; if (!ctx->vbi) { if (!(ctx->vbi = vbi_decoder_new())) @@ -701,14 +700,6 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *got_sub if (sub->rects) { sub->num_rects = 1; sub->rects[0] = ctx->pages->sub_rect; -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS - for (j = 0; j < 4; j++) { - sub->rects[0]->pict.data[j] = sub->rects[0]->data[j]; - sub->rects[0]->pict.linesize[j] = sub->rects[0]->linesize[j]; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif } else { ret = AVERROR(ENOMEM); } diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index 9c59a2297f..eaf069017a 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -596,20 +596,6 @@ static int display_end_segment(AVCodecContext *avctx, void *data, if (!ctx->forced_subs_only || ctx->presentation.objects[i].composition_flag & 0x40) memcpy(sub->rects[i]->data[1], palette->clut, sub->rects[i]->nb_colors * sizeof(uint32_t)); - -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS -{ - AVSubtitleRect *rect; - int j; - rect = sub->rects[i]; - for (j = 0; j < 4; j++) { - rect->pict.data[j] = rect->data[j]; - rect->pict.linesize[j] = rect->linesize[j]; - } -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif } return 1; } diff --git a/libavcodec/tests/.gitignore b/libavcodec/tests/.gitignore index 92aab1b73c..69bf891f44 100644 --- a/libavcodec/tests/.gitignore +++ b/libavcodec/tests/.gitignore @@ -11,7 +11,6 @@ /h265_levels /htmlsubtitles /iirfilter -/imgconvert /jpeg2000dwt /mathops /mjpegenc_huffman diff --git a/libavcodec/tests/imgconvert.c b/libavcodec/tests/imgconvert.c deleted file mode 100644 index aefc324bf5..0000000000 --- a/libavcodec/tests/imgconvert.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Misc image conversion routines - * Copyright (c) 2001, 2002, 2003 Fabrice Bellard - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavcodec/imgconvert.c" - -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS -int main(void){ - int i; - int err=0; - int skip = 0; - - for (i=0; iname) { - skip ++; - continue; - } - if (skip) { - av_log(NULL, AV_LOG_INFO, "%3d unused pixel format values\n", skip); - skip = 0; - } - av_log(NULL, AV_LOG_INFO, "pix fmt %s yuv_plan:%d avg_bpp:%d\n", desc->name, is_yuv_planar(desc), av_get_padded_bits_per_pixel(desc)); - } - return err; -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif /* FF_API_AVPICTURE */ diff --git a/libavcodec/version.h b/libavcodec/version.h index a785e18c9e..c502dd4fa9 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -54,9 +54,6 @@ #ifndef FF_API_CODED_FRAME #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_AVPICTURE -#define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_VBV_DELAY #define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) #endif diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c index 87ac910577..caab330ed3 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -134,20 +134,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, ((uint32_t *)sub->rects[0]->data[1])[i] |= (unsigned)*buf++ << 24; } -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS -{ - AVSubtitleRect *rect; - int j; - rect = sub->rects[0]; - for (j = 0; j < 4; j++) { - rect->pict.data[j] = rect->data[j]; - rect->pict.linesize[j] = rect->linesize[j]; - } -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - // process RLE-compressed data if ((ret = init_get_bits8(&gb, buf, buf_end - buf)) < 0) return ret; diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c index 9139159c98..53fcb76656 100644 --- a/libavcodec/xsubenc.c +++ b/libavcodec/xsubenc.c @@ -132,19 +132,6 @@ static int xsub_encode(AVCodecContext *avctx, unsigned char *buf, if (h->num_rects != 1) av_log(avctx, AV_LOG_WARNING, "Only single rects supported (%d in subtitle.)\n", h->num_rects); -#if FF_API_AVPICTURE -FF_DISABLE_DEPRECATION_WARNINGS - if (!h->rects[0]->data[0]) { - AVSubtitleRect *rect = h->rects[0]; - int j; - for (j = 0; j < 4; j++) { - rect->data[j] = rect->pict.data[j]; - rect->linesize[j] = rect->pict.linesize[j]; - } - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - // TODO: render text-based subtitles into bitmaps if (!h->rects[0]->data[0] || !h->rects[0]->data[1]) { av_log(avctx, AV_LOG_WARNING, "No subtitle bitmap available.\n"); From patchwork Mon Apr 19 14:09:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27023 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp557260iob; Mon, 19 Apr 2021 07:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2N4Q4sYdKPUGz6WQ/uDOR0Db5y+wzvG9J9qHZyawLo56cY8rkYMCzsn32Al09teXtMDJ3 X-Received: by 2002:aa7:c789:: with SMTP id n9mr18978198eds.352.1618841615199; Mon, 19 Apr 2021 07:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841615; cv=none; d=google.com; s=arc-20160816; b=JcjDkZM6iq7fcmD7D/G4g4hRRWJFXnCdkw9EEG2mPhxhmaqrv4TS+0yGa5xQfDL2pN CIa2L3EigSlvLQrEBOg2gGtB4JdA1lQbUy6vgkhXWfolkygwvnOfTlyeEwmoiq4Ou1aa gXzobKM5OVQzixTn4paBuv/yqaVDA/qp5G4pszSNhVBANW3f6PkVZ0NhsY+3F2J8WhLd 6xQW9uZ3Z0O2PuJw1kzkOjvUc84fKa0esULhPyndi6KIcHiagf7jZ/lyVajUqimBxsUW ZEjqJMdOUtNc0X3310WqNYQ46XE8I2/d+JIT73ybor5tHMoVoT3tBfbBqSB3oKcIkkKv gF2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=XHg44m5soiPCt6yqNzBFBtHeZiTv+VmCV9VH3hAfxqQ=; b=ATZvWMKEBsP9rb1wtfX0QoL4qIb0sWoETur0CQN6CS9mjg5770NJR5zupPgLUSxSNG 4uZoxPiChnYxHySsAbaU2qkIb+XKubbfPNqpGTNQ75m5JlFBUhuWxGJxTO/aqiWg9YQ7 3GDFvBwccXGkAUioW4YIjkufBt3ZdPUn94wK2DTWyeJu1JwP+9xln7Ia2htGp1eG33x8 rgk9UqoSx6cXELyoyZ2TDNQCT6yv15Mj2mhSc9PYhdy90xrFjZa21cTqZ4NSkG0boVOD wJ49ugU+kq1Fgtwabgjwue4DnSNDyG+oygMSLZehthBvdlek374f4aptFd1fCw+v70Lo ynFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=NgzXMY17; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r1si11405819edp.303.2021.04.19.07.13.34; Mon, 19 Apr 2021 07:13:35 -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=@gmail.com header.s=20161025 header.b=NgzXMY17; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A75E9680CCA; Mon, 19 Apr 2021 17:11:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F0F1F680C80 for ; Mon, 19 Apr 2021 17:11:34 +0300 (EEST) Received: by mail-qk1-f171.google.com with SMTP id y136so3756709qkb.1 for ; Mon, 19 Apr 2021 07:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9R0owzWXVNDvseqd1W6J4+lPv7LUr2KLQQjx7rev6qM=; b=NgzXMY17EEDWBlR1T9FjS/8ykkteb7c2Zo5Mtn4KTTXrXNBneFDxWDVdgOKBFyT6LV eqrr/3+0eM42VdKvnV8DdVw2uvLIFyJ4XXQRY0rVrJJukHobvNO02qP0SN1UEECfFOPu aWokI9xHSVsvltEwUqlndmlhQd45ZgsSBuMiLpELYZijWL3Ec/dAAFz2LFcPs9k/fvDo Y/YqR2A8Qm9cZaUaLYEHy/iXT0mQQVMdhSHzPaAu6a0yywRtJaEQ8Yrnzjj4Z2utLRsd jE++Z5q2OAKMMlLXft/pxESASh3BRC4sxR3/57yGyL+ByFVeJQEjb03nsLFA3X+di8xM DyYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9R0owzWXVNDvseqd1W6J4+lPv7LUr2KLQQjx7rev6qM=; b=r67KdURYVIKmLEWAF8NcubvTHojrD0O3hjh+HP6Ev2zMVb1pCO3NyNEFYzJmZDtUWM b2Miy1I0AULYf7IVYRbSBmF4gs6UIK+RDlpwhi6Krztz97WeyAT04bcuODj+kBZWiz4J mfAjFUw1ll1TIhWN9pp1z4g9CT1xjHObQK18Wz9BRKgoUPVcL+SKc6yqnnSCA0kNPZjr XeziATUpcedkp03NFi6vIcdd/Xz28lyy/bNWZgJuYU9LuO8cogeJEck1HOLBTgzPqIBE rnKydVl8AZAMfC1qVd3PLOXT0njIj8dXIG7vqURxNAXjgBgAUbBznLhjgIzDUfHUsu6y CbFA== X-Gm-Message-State: AOAM530rp12HUvUixDxbITzt8bsweQaGLVsQVK3fO3OCfyz/DVOBdOdf 4L60Uqy4nOml6nOojHyrPjt1W7NVX3U= X-Received: by 2002:a37:a008:: with SMTP id j8mr12432956qke.201.1618841493320; Mon, 19 Apr 2021 07:11:33 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:33 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:23 -0300 Message-Id: <20210419141024.8174-27-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 26/87] avcodec/imgconvert: Remove deprecated parts of pixel format 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: RBpqV4ilDFx3 From: Andreas Rheinhardt Deprecated in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54 and 2a54ae9df8cbc1717b3929222ac75f384e2ff240. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 19 ------------------- libavcodec/imgconvert.c | 21 --------------------- libavcodec/version.h | 3 --- 3 files changed, 43 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 315246e68e..909fb9172b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3455,25 +3455,6 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *p enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); -#if FF_API_AVCODEC_PIX_FMT -/** - * @deprecated see av_get_pix_fmt_loss() - */ -attribute_deprecated -int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, - int has_alpha); -/** - * @deprecated see av_find_best_pix_fmt_of_2() - */ -attribute_deprecated -enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, - enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); - -attribute_deprecated -enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, - enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); -#endif - enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt); /** diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 40300f836d..96511ac7d6 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -28,27 +28,6 @@ #include "libavutil/pixdesc.h" #include "libavutil/pixfmt.h" -#if FF_API_AVCODEC_PIX_FMT -int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, - enum AVPixelFormat src_pix_fmt, - int has_alpha) -{ - return av_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha); -} - -enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, - enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr) -{ - return av_find_best_pix_fmt_of_2(dst_pix_fmt1, dst_pix_fmt2, src_pix_fmt, has_alpha, loss_ptr); -} - -enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, - enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr) -{ - return av_find_best_pix_fmt_of_2(dst_pix_fmt1, dst_pix_fmt2, src_pix_fmt, has_alpha, loss_ptr); -} - -#endif enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr){ diff --git a/libavcodec/version.h b/libavcodec/version.h index c502dd4fa9..0595af73de 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -78,9 +78,6 @@ #ifndef FF_API_OLD_ENCDEC #define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_AVCODEC_PIX_FMT -#define FF_API_AVCODEC_PIX_FMT (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_MPV_RC_STRATEGY #define FF_API_MPV_RC_STRATEGY (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27019 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp557426iob; Mon, 19 Apr 2021 07:13:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0rk6YF81ylfENl192FIHip1L1vsHYbnXg1EQgrbV18sCx5yFkQ5y9wQyBv4Z6ldCqEzPd X-Received: by 2002:aa7:cfd0:: with SMTP id r16mr12739878edy.330.1618841625919; Mon, 19 Apr 2021 07:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841625; cv=none; d=google.com; s=arc-20160816; b=0/odwsK5T2kJKyQDOhcg6B5OVHlHDxO6KDXAw5QOycU6qw8LfiVciCGuuOx0hnnSb8 YqZfEjeYcfD0tiGXUi46fw0bSyB7Cyc6X1H3+B4wsMZf0/4A08zrotPSPb6qI5VJ6nPr EsVjZe5fT4nAh3jxP3pMpZoZly5fBktOq4m9YpTWqwzwBqQcTpUcYX8i7nvoofBAsW/9 hsVhypimWM5DDah9onqRR2I/STObzglz3hd6Ds61ev4GHv095Hzo19scD5Rxr+yXGUTe AyU9FJh+q13lNU6SDm9LRKuVCBjNU40SMFLz2ha3bPzuwOstuEFWZu7sdoFOaPDjEuED qY4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=X+/SlBVW3e4m8i/BFmRRoxHg6W2qos51jHI/1Eq4Bes=; b=rix7eGNfnAdMOA8Rv6LSHfIAidYc9ZWghXnjokyZrVDYSAKzde6k9huuEQmx1KMUZZ KLjaC3+qdlAy5Jz8gmyVEQceJjxMPGt2YVoRSLhDceMQqTejojJbLnaVqqLbRP1HQw1I +BtOeLOg4dn0jpczdIxbpbhu+2laav8cpTQL3nVUOF26N+uat9FdfXr6WAY/zBT3L+Qy GnMHmJc74/zEJHpQqZ92AykGoURXZaa/VT9UFj5WZ3TkO5rL48gSZ/dl5Xiem6tlpeyE RQlVyuc/vUVMAFc1SVgJXa5LtDmYkRD7AEUtl3Loggavy/1GoljKaNY3EwEIUqqtu/rG BLug== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=RHzqFuAg; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s13si5536414edr.443.2021.04.19.07.13.45; Mon, 19 Apr 2021 07:13:45 -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=@gmail.com header.s=20161025 header.b=RHzqFuAg; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B1E4A680CDF; Mon, 19 Apr 2021 17:11:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B5FDC680C80 for ; Mon, 19 Apr 2021 17:11:35 +0300 (EEST) Received: by mail-qk1-f171.google.com with SMTP id e13so26001705qkl.6 for ; Mon, 19 Apr 2021 07:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UTqupjVeMR+60iBRcZ0TKNt60mLTaNu4qNXmZcBs+WA=; b=RHzqFuAglWKLa/PYi9CKA1etfApbHj2G6V0+cFDTR36p9b9ONANTe4EJhTWqpIP13S ZdtK0GYQXvmrKTQb0k/V9kShk/0Ac35vYu6T4omrPlQzeilSIi2Et2Jvs2tDe0i/0eEd kLqNlU+qM0L7U+Jq61fY+9UdYfy3VnePOmlAq8urYN1UoHKzSGn94nHeWlhUoDwiOnCg ruAzATpsVexTs5V1RHkDWuw/ReDG5+gx92s6wiaMk0FrDkKHL9bjHYiOQRwonCv7i8v7 iOqpjZrmujzeBxB6umN0ye/vdJoUHjAGbhQYicsms2gToUYNOBC8BXiQ8mtDqb+XgArE 0cLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UTqupjVeMR+60iBRcZ0TKNt60mLTaNu4qNXmZcBs+WA=; b=hK4l34LKbXxrB7ZPUG20JGkCNEaIF97+vkEvjpE+c+xuXqBnbp/g+/WZ5orgrgQxro 7sgjg77KitOutcGWA2vDZGD+gv5GFZ+TRtdXkO6qNcQkp3xjfeG09JXyyPTazJjF/XRH fjTkWeLeQ+mW1SSAd6/rSsJDpQ+1QddJasa3hQh/9HDoSJlaEBloxB077GUaVCdZabaf pjOm3/u3M969qsEtRrriwIpKDRMEnijWW/j26cY1g+NbQ0ei8p9oa/Y+9zn3EBApoQBO k+KwWFZuhoS1n7r2Zgl2zPQeqlzn3m74sktT0Xl6Y4UnipkUkutGe0B8B6Hz+5cHfFqp bzVg== X-Gm-Message-State: AOAM531283fun26LOIkeuLBpj0j8bvz5aiQsuxj9x0dkDS44Or3v4Mmf cL6M5QN4qohRipdQs8I/H1eYtP4obZs= X-Received: by 2002:a37:dce:: with SMTP id 197mr12051971qkn.180.1618841494409; Mon, 19 Apr 2021 07:11:34 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:34 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:24 -0300 Message-Id: <20210419141024.8174-28-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 27/87] avcodec: Remove deprecated VBV delay field 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: q+k1rlkZ7/rA From: Andreas Rheinhardt Deprecated in 2507b5dd674834be7261772996f47ae3b95cca69. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 13 ------------- libavcodec/mpegvideo_enc.c | 6 ------ libavcodec/version.h | 3 --- 3 files changed, 22 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 909fb9172b..89e32f1c80 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1854,19 +1854,6 @@ typedef struct AVCodecContext { uint8_t *subtitle_header; int subtitle_header_size; -#if FF_API_VBV_DELAY - /** - * VBV delay coded in the last frame (in periods of a 27 MHz clock). - * Used for compliant TS muxing. - * - encoding: Set by libavcodec. - * - decoding: unused. - * @deprecated this value is now exported as a part of - * AV_PKT_DATA_CPB_PROPERTIES packet side data - */ - attribute_deprecated - uint64_t vbv_delay; -#endif - /** * Audio only. The number of "priming" samples (padding) inserted by the * encoder at the beginning of the audio. I.e. this number of leading diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 1613d06023..8785f25787 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1913,12 +1913,6 @@ vbv_retry: av_freep(&props); return ret; } - -#if FF_API_VBV_DELAY -FF_DISABLE_DEPRECATION_WARNINGS - avctx->vbv_delay = vbv_delay * 300; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } s->total_bits += s->frame_bits; diff --git a/libavcodec/version.h b/libavcodec/version.h index 0595af73de..147bcb08a4 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -54,9 +54,6 @@ #ifndef FF_API_CODED_FRAME #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_VBV_DELAY -#define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_NVENC_OLD_NAME #define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27021 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp557587iob; Mon, 19 Apr 2021 07:13:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjybuw37Jc761nJwjppq+Y99Xny/ezVdNFvQQG7TqW56kn3G14ex0xwdMCS9S6PZiztov9 X-Received: by 2002:aa7:cd52:: with SMTP id v18mr25702909edw.97.1618841635829; Mon, 19 Apr 2021 07:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841635; cv=none; d=google.com; s=arc-20160816; b=tfv9iTMa/VFAxAf3ilfGjvM3yOMlUYsDxPYNotoHxEpSTW9sn4tjDDTKOqPIIABgsP snYfP0qf8hrNXoVLwDwsa8HX7uIT8upiZWrIiytf/KVjYMH4y44KI1GTowJZw+6USHb5 JenyQ+FofqZDcjXQHBnr234JaNqTad0IibuM2zw/p/Ox7fiS5GlZkmhkd0vzoB07a42l jHtTlFWvHt+BfMo0ZpRThNhGiOXOPIm1WEXIwtFR8d8XPdbGNojuol0dCkf4yt8VZKuy 1rq5ZXkRU4aC9ChJ0jD6B0K1il3do1S5JMDz2AzDTz6ZnifuAHMPvQJn/rq12DxrWo7C um0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=Y0BaRYn/ubF32p30dUcFuNGML4avSteEEZCGKwTSaAU=; b=EnjG0087Ghrs/y6C5PBe46tx/z++LknSpTtLxgGdjC2eoysRYK9Pk2O5jW7y7EnbHf lqnKpU7HcYWEbyDomH9U8A/GzrVcWa0YWpVh2vM+AJ1FiVj1ak/RM5p01bN0o276HdTv fX8OS0Vo2xpOUCup5q4w5GcV9FCh8+LUjE2qy0GUvtGKCZvUFzscoPjA7L3FWmENKY/I ZXQ6UCxAcoDLIFMJHTiiPgJJLcr4kxYW+K21PVYB/4cGR81bali5wu93En8tchBWw3Di MUNMutLm0GSTq6xzM3vib3z8tMjOx4IJX69Wnv8mrdhxGC1xvzpJDkCERl8DDJWy7CiN YP4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=LmXjv1K4; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v5si2226200edq.440.2021.04.19.07.13.55; Mon, 19 Apr 2021 07:13: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=@gmail.com header.s=20161025 header.b=LmXjv1K4; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9B564680CF1; Mon, 19 Apr 2021 17:11:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02E6E680CE8 for ; Mon, 19 Apr 2021 17:11:36 +0300 (EEST) Received: by mail-qk1-f178.google.com with SMTP id s5so27071503qkj.5 for ; Mon, 19 Apr 2021 07:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=IrEQkA6VJMpnxCYKH4OlCE9RQvcSJaq3682is8XYqWw=; b=LmXjv1K4z5UTrCdSbq+oVQSDKhVc7/EL4DKXeYRHdGiwRoa6wP8Y3iiP4+eHB6gkDT h46VVrd2yFReUcw/CuuRfGXikDwpT07E7aOnOkx4w/5oP817e3f16D5sGQqWL+zyoV1L GuMY5G+UxIxbLljsMQLuiXI0VvTuANoEcNe6lHu7J1nrCPQVxqSd5SV9PL8/gN2u74GA kMuFKK9nMhRrYMX/489kLnwC8W/i28vLLcaBXVZy0YDjwScffyLo1aKCd+BN1panDLYM MG8MPLwn7WuclUUm2pQxrxcvIFPHVH//cBQL/Oc/YChE66DABFeM5FEx9jOf7FCtFEPE w1aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IrEQkA6VJMpnxCYKH4OlCE9RQvcSJaq3682is8XYqWw=; b=hCrNPRj8azJIcneOLfZJ54q9KP+8Ci7Wyqv0vS4x8CTxseSBfZTePlXuOTtdIQQI/c ZKAscxIKmLPQ10KlgSBBCBdzTDIuGIyp43vv6HQ8r0kHXP1G0PHIIuUyMJSTasyRsVWS xp4TkRsHuD1myBgdUw/mBvolnx/ngJHaabC0I+SzUwjadp1Lrg/Zg253Hi1SN9zOzqnL bbnmct/erjQF7JItwkm066ucLMFEIRSBG55/xZNPch5u9lyxh8rZTgrCXyuCHom4RBM5 gyenu5mX6nO1xS4C+j8R5a/9cLN21W6HrNYJRHtsGZRY0CxA8MPUMUeYBydBbmevJia3 WYMw== X-Gm-Message-State: AOAM533x2fvKzNPCUhs3L5jXWjmclDiIK/UH1KqmRmJxGNpCHLeDO1vw UfgIFwCpUVlrxtLmvM6iGu/PT6zljNM= X-Received: by 2002:a37:492:: with SMTP id 140mr4233532qke.161.1618841495589; Mon, 19 Apr 2021 07:11:35 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:35 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:25 -0300 Message-Id: <20210419141024.8174-29-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 28/87] avcodec: Remove deprecated old aliases for NVENC encoders 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8njpDPvTnC3J From: Andreas Rheinhardt Deprecated in 888a5c794778a2f2aad22e9b4a3952dff92b11fa. Signed-off-by: Andreas Rheinhardt --- libavcodec/allcodecs.c | 6 ---- libavcodec/nvenc_h264.c | 69 ----------------------------------------- libavcodec/nvenc_hevc.c | 37 ---------------------- libavcodec/version.h | 3 -- 4 files changed, 115 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 3194232500..cf6fe2055b 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -27,7 +27,6 @@ #include "config.h" #include "libavutil/thread.h" #include "avcodec.h" -#include "version.h" extern AVCodec ff_a64multi_encoder; extern AVCodec ff_a64multi5_encoder; @@ -796,11 +795,6 @@ extern AVCodec ff_h264_qsv_encoder; extern AVCodec ff_h264_v4l2m2m_encoder; extern AVCodec ff_h264_vaapi_encoder; extern AVCodec ff_h264_videotoolbox_encoder; -#if FF_API_NVENC_OLD_NAME -extern AVCodec ff_nvenc_encoder; -extern AVCodec ff_nvenc_h264_encoder; -extern AVCodec ff_nvenc_hevc_encoder; -#endif extern AVCodec ff_hevc_amf_encoder; extern AVCodec ff_hevc_cuvid_decoder; extern AVCodec ff_hevc_mediacodec_decoder; diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c index 4c2585876e..ea7390cbf1 100644 --- a/libavcodec/nvenc_h264.c +++ b/libavcodec/nvenc_h264.c @@ -198,75 +198,6 @@ static const AVCodecDefault defaults[] = { { NULL }, }; -#if FF_API_NVENC_OLD_NAME - -static av_cold int nvenc_old_init(AVCodecContext *avctx) -{ - av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated, use 'h264_nvenc' instead\n"); - return ff_nvenc_encode_init(avctx); -} - -#if CONFIG_NVENC_ENCODER -static const AVClass nvenc_class = { - .class_name = "nvenc", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - -AVCodec ff_nvenc_encoder = { - .name = "nvenc", - .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"), - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_H264, - .init = nvenc_old_init, - .receive_packet = ff_nvenc_receive_packet, - .close = ff_nvenc_encode_close, - .flush = ff_nvenc_encode_flush, - .priv_data_size = sizeof(NvencContext), - .priv_class = &nvenc_class, - .defaults = defaults, - .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE | - AV_CODEC_CAP_ENCODER_FLUSH, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, - .pix_fmts = ff_nvenc_pix_fmts, - .wrapper_name = "nvenc", - .hw_configs = ff_nvenc_hw_configs, -}; -#endif - -/* Add an alias for nvenc_h264 */ -#if CONFIG_NVENC_H264_ENCODER -static const AVClass nvenc_h264_class = { - .class_name = "nvenc_h264", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - -AVCodec ff_nvenc_h264_encoder = { - .name = "nvenc_h264", - .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"), - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_H264, - .init = nvenc_old_init, - .receive_packet = ff_nvenc_receive_packet, - .close = ff_nvenc_encode_close, - .flush = ff_nvenc_encode_flush, - .priv_data_size = sizeof(NvencContext), - .priv_class = &nvenc_h264_class, - .defaults = defaults, - .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE | - AV_CODEC_CAP_ENCODER_FLUSH, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, - .pix_fmts = ff_nvenc_pix_fmts, - .wrapper_name = "nvenc", - .hw_configs = ff_nvenc_hw_configs, -}; -#endif - -#endif - static const AVClass h264_nvenc_class = { .class_name = "h264_nvenc", .item_name = av_default_item_name, diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index 441e7871d2..1aacec5f9c 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -179,43 +179,6 @@ static const AVCodecDefault defaults[] = { { NULL }, }; -#if FF_API_NVENC_OLD_NAME - -static av_cold int nvenc_old_init(AVCodecContext *avctx) -{ - av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated, use 'hevc_nvenc' instead\n"); - return ff_nvenc_encode_init(avctx); -} - -static const AVClass nvenc_hevc_class = { - .class_name = "nvenc_hevc", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - -AVCodec ff_nvenc_hevc_encoder = { - .name = "nvenc_hevc", - .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC hevc encoder"), - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_HEVC, - .init = nvenc_old_init, - .receive_packet = ff_nvenc_receive_packet, - .close = ff_nvenc_encode_close, - .flush = ff_nvenc_encode_flush, - .priv_data_size = sizeof(NvencContext), - .priv_class = &nvenc_hevc_class, - .defaults = defaults, - .pix_fmts = ff_nvenc_pix_fmts, - .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE | - AV_CODEC_CAP_ENCODER_FLUSH, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, - .wrapper_name = "nvenc", - .hw_configs = ff_nvenc_hw_configs, -}; - -#endif - static const AVClass hevc_nvenc_class = { .class_name = "hevc_nvenc", .item_name = av_default_item_name, diff --git a/libavcodec/version.h b/libavcodec/version.h index 147bcb08a4..6e4a665b07 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -54,9 +54,6 @@ #ifndef FF_API_CODED_FRAME #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_NVENC_OLD_NAME -#define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_STRUCT_VAAPI_CONTEXT #define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27113 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1093864yba; Mon, 19 Apr 2021 07:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxavlXyrFF5s+gEA98ZnSEZBmCEiq9vcNBN+kCMBEX2Y4IedYcDY6qkFm2J6dIyZCt1VFNj X-Received: by 2002:a17:906:b28c:: with SMTP id q12mr22630829ejz.284.1618841648222; Mon, 19 Apr 2021 07:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841648; cv=none; d=google.com; s=arc-20160816; b=xnHOafIQPxiJmEFndmTnEZRNRtPtND71/eIk/xufMcXAA/AK+LrwxyUO2hH6wBrRlU j2ioLcV7s9teL0N/FsMWCO0fFCNTiSunQg6pAKUYQKvpVMJlfzbD3zj+YTZjYTUnJWpd boeCmvDtY1ANL1AgiNKajlwxER9/KqUqBrTdseeJem/2E72YUw9BgmdJm+JtNMwZANHG VA7CWsQP7m3/S2G4hJ+YL5p3jMVSggNr3kD40p3BO+N/Ws5P52ZP+tA48Dl+eCRobl7S T/9hitqP2dN7zd7ty/WrEw4EKsBNZn7yJ8IfZcN7VRDye2iYTU/HyFz6oO0LU0eo1BbP pCNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=157CSiA2xExYE9n2IXvzyimufz3rSxjm5Dju4NjJgcA=; b=Nl1RzjGsk60AFYe7Emd/xdxe7T4JJru46LY7T18azm0kwgqoYLWYP/soIAvX3WNZGm dWzBu07b61h/ZLupkNnM29zjIB4OKIb2iRCwgAcU24C0uxjPhLSdU+pDCyILDGt4Q9Xm iNvToEQ8ltucSKoPqxF1OxBW/pm04u3Y/EUTQd8CwndvEdda72FMzWodjQsWSfrdhkdm 02gDeNt9EfmPiC+9jaECR+Oq0N02C7hM8R5eclRJSSEL8lz5ghIvx7AFZ5YPlX/pxWJm KNVhHheRqNj/CdD4v7k3/NUgFKegm2G+U+B3QyJeUeGcr3OeA8Q9XLMUKn8x8xy7MQf6 fJNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=nalUfiJa; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c17si12479201edj.86.2021.04.19.07.14.07; Mon, 19 Apr 2021 07:14:08 -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=@gmail.com header.s=20161025 header.b=nalUfiJa; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 17CDE68185F; Mon, 19 Apr 2021 17:11:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 94CDA680CF4 for ; Mon, 19 Apr 2021 17:11:38 +0300 (EEST) Received: by mail-qt1-f175.google.com with SMTP id o2so12709992qtr.4 for ; Mon, 19 Apr 2021 07:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gHnZb9FQxfPFMTsuMCGpIiDfOSheDvmBKGaGC+ULbUQ=; b=nalUfiJanUvFQgjfrhxFC+ODd5BKCSCd75uBgNqk3IA+AlrdvqvR6Q5DHtVR2aisTv qwSufRn7M6eDUoGR0YY2qO8ZdzqdCoOB8dlPLqZPURTF8IrO5T1PPUF0OuUVuKpWua0M iirtqIhc9WBaQ4wU9BWSSIBmB8pd6lWZG90JYGWNHHZsqyY+sE8i1qjJS4A1VUM866+u g2lHkXE/3yeXkmRGu04BkK0D30e0C/Fym+2DsdMwogWaQOEHGki8shJ31KeMmd5KrM9i kF+w8h6FmnSV3cYk+7HfphlrtxffFO1Y+glcndywIU03zXPRwEydlbaYoYUOG1CGy5fy Zr0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gHnZb9FQxfPFMTsuMCGpIiDfOSheDvmBKGaGC+ULbUQ=; b=J8iJ4Y1cYD6Euw027xnUn8A0/FZedqFR2E9CqjU5KqjvrAzaFOeE63drhPsoBqCGhn tWar7nJW8Da9bZ/jjkoOJ12tuJUm8tBEgMBzNqcXDqAw/PM9GRBdO4UJhd9uzMLvSGPR BQGjO0mUdhDOF4mIP6gSWXUnzsyKeCb+bO+Uf81SdMn/J+i+ptV3vUjYGXgsx4MAiQW6 6xRU0BFYMNggBGWE7qED0j5lgXgvcLw2Jv0vyL5eROyRHJP8BlsX4dWKstDtPvJigcGt HoVWSp0Tz24j/iWnsG7wbzn1Caaavd+E5x4kHseOnhMmY4ABMnXNRgSgPptITN0XTSKD VHMg== X-Gm-Message-State: AOAM5330Vk7cfALZItrJ8CGeyR7a8qlkHEreD7raXl7ybE79TRfdrfaf dy+NRrtM0/vFInMRmjuOtM0f1sYRz1I= X-Received: by 2002:ac8:58c2:: with SMTP id u2mr11833706qta.209.1618841496808; Mon, 19 Apr 2021 07:11:36 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:36 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:26 -0300 Message-Id: <20210419141024.8174-30-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 29/87] avcodec/vaapi: Remove old and deprecated VAAPI context and header 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 11g+MRx7HpLh Content-Length: 8856 From: Andreas Rheinhardt Deprecated in 851960f6f8cf1f946fe42fa36cf6598fac68072c. Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 1 - libavcodec/avcodec.h | 3 +- libavcodec/vaapi.h | 86 --------------------------------------- libavcodec/vaapi_decode.c | 53 ------------------------ libavcodec/vaapi_decode.h | 13 ------ libavcodec/version.h | 3 -- 6 files changed, 1 insertion(+), 158 deletions(-) delete mode 100644 libavcodec/vaapi.h diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 31b220025b..a640c548e5 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -19,7 +19,6 @@ HEADERS = ac3_parser.h \ mediacodec.h \ packet.h \ qsv.h \ - vaapi.h \ vdpau.h \ version.h \ videotoolbox.h \ diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 89e32f1c80..e817befa1c 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1522,8 +1522,7 @@ typedef struct AVCodecContext { * For some hardware accelerators, a global context needs to be * provided by the user. In that case, this holds display-dependent * data FFmpeg cannot instantiate itself. Please refer to the - * FFmpeg HW accelerator documentation to know how to fill this - * is. e.g. for VA API, this is a struct vaapi_context. + * FFmpeg HW accelerator documentation to know how to fill this. * - encoding: unused * - decoding: Set by user */ diff --git a/libavcodec/vaapi.h b/libavcodec/vaapi.h deleted file mode 100644 index 2cf7da5889..0000000000 --- a/libavcodec/vaapi.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Video Acceleration API (shared data between FFmpeg and the video player) - * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1 - * - * Copyright (C) 2008-2009 Splitted-Desktop Systems - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVCODEC_VAAPI_H -#define AVCODEC_VAAPI_H - -/** - * @file - * @ingroup lavc_codec_hwaccel_vaapi - * Public libavcodec VA API header. - */ - -#include -#include "libavutil/attributes.h" -#include "version.h" - -#if FF_API_STRUCT_VAAPI_CONTEXT - -/** - * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding - * @ingroup lavc_codec_hwaccel - * @{ - */ - -/** - * This structure is used to share data between the FFmpeg library and - * the client video application. - * This shall be zero-allocated and available as - * AVCodecContext.hwaccel_context. All user members can be set once - * during initialization or through each AVCodecContext.get_buffer() - * function call. In any case, they must be valid prior to calling - * decoding functions. - * - * Deprecated: use AVCodecContext.hw_frames_ctx instead. - */ -struct attribute_deprecated vaapi_context { - /** - * Window system dependent data - * - * - encoding: unused - * - decoding: Set by user - */ - void *display; - - /** - * Configuration ID - * - * - encoding: unused - * - decoding: Set by user - */ - uint32_t config_id; - - /** - * Context ID (video decode pipeline) - * - * - encoding: unused - * - decoding: Set by user - */ - uint32_t context_id; -}; - -/* @} */ - -#endif /* FF_API_STRUCT_VAAPI_CONTEXT */ - -#endif /* AVCODEC_VAAPI_H */ diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 57a0eb4e6e..958ddf49da 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -640,46 +640,6 @@ int ff_vaapi_decode_init(AVCodecContext *avctx) ctx->va_config = VA_INVALID_ID; ctx->va_context = VA_INVALID_ID; -#if FF_API_STRUCT_VAAPI_CONTEXT - if (avctx->hwaccel_context) { - av_log(avctx, AV_LOG_WARNING, "Using deprecated struct " - "vaapi_context in decode.\n"); - - ctx->have_old_context = 1; - ctx->old_context = avctx->hwaccel_context; - - // Really we only want the VAAPI device context, but this - // allocates a whole generic device context because we don't - // have any other way to determine how big it should be. - ctx->device_ref = - av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI); - if (!ctx->device_ref) { - err = AVERROR(ENOMEM); - goto fail; - } - ctx->device = (AVHWDeviceContext*)ctx->device_ref->data; - ctx->hwctx = ctx->device->hwctx; - - ctx->hwctx->display = ctx->old_context->display; - - // The old VAAPI decode setup assumed this quirk was always - // present, so set it here to avoid the behaviour changing. - ctx->hwctx->driver_quirks = - AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS; - - } -#endif - -#if FF_API_STRUCT_VAAPI_CONTEXT - if (ctx->have_old_context) { - ctx->va_config = ctx->old_context->config_id; - ctx->va_context = ctx->old_context->context_id; - - av_log(avctx, AV_LOG_DEBUG, "Using user-supplied decoder " - "context: %#x/%#x.\n", ctx->va_config, ctx->va_context); - } else { -#endif - err = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_VAAPI); if (err < 0) goto fail; @@ -709,9 +669,6 @@ int ff_vaapi_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "Decode context initialised: " "%#x/%#x.\n", ctx->va_config, ctx->va_context); -#if FF_API_STRUCT_VAAPI_CONTEXT - } -#endif return 0; @@ -725,12 +682,6 @@ int ff_vaapi_decode_uninit(AVCodecContext *avctx) VAAPIDecodeContext *ctx = avctx->internal->hwaccel_priv_data; VAStatus vas; -#if FF_API_STRUCT_VAAPI_CONTEXT - if (ctx->have_old_context) { - av_buffer_unref(&ctx->device_ref); - } else { -#endif - if (ctx->va_context != VA_INVALID_ID) { vas = vaDestroyContext(ctx->hwctx->display, ctx->va_context); if (vas != VA_STATUS_SUCCESS) { @@ -748,9 +699,5 @@ int ff_vaapi_decode_uninit(AVCodecContext *avctx) } } -#if FF_API_STRUCT_VAAPI_CONTEXT - } -#endif - return 0; } diff --git a/libavcodec/vaapi_decode.h b/libavcodec/vaapi_decode.h index 6b415dd1d3..6beda14e52 100644 --- a/libavcodec/vaapi_decode.h +++ b/libavcodec/vaapi_decode.h @@ -27,11 +27,6 @@ #include "avcodec.h" -#include "version.h" -#if FF_API_STRUCT_VAAPI_CONTEXT -#include "vaapi.h" -#endif - static inline VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic) { return (uintptr_t)pic->data[3]; @@ -56,14 +51,6 @@ typedef struct VAAPIDecodeContext { VAConfigID va_config; VAContextID va_context; -#if FF_API_STRUCT_VAAPI_CONTEXT -FF_DISABLE_DEPRECATION_WARNINGS - int have_old_context; - struct vaapi_context *old_context; - AVBufferRef *device_ref; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - AVHWDeviceContext *device; AVVAAPIDeviceContext *hwctx; diff --git a/libavcodec/version.h b/libavcodec/version.h index 6e4a665b07..da36f1790d 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -54,9 +54,6 @@ #ifndef FF_API_CODED_FRAME #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_STRUCT_VAAPI_CONTEXT -#define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_UNSANITIZED_BITRATES #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27116 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1093938yba; Mon, 19 Apr 2021 07:14:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLoRyty+O4qwVAOgqbglem7Qpahgu/JA7KSJMKsk2TWA8Sfq+2YIObnIFXVKGmooa9Pski X-Received: by 2002:a50:e607:: with SMTP id y7mr26339651edm.18.1618841653384; Mon, 19 Apr 2021 07:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841653; cv=none; d=google.com; s=arc-20160816; b=erKgDLeVtWnJADzzCRItH9jaf6o0AyS45SHDHyHJ2/QPwE8XTj8kDwzZ28BSY8mjgI v1+0rMey3KzLxeeiLxwYzwxLaoHY1oY9SJ5efHteDUoF+VumPsPEjhgqTFiAB1qUo2AA u9OsQbqY4Mo40jgf2GK91GKJC0FTXEj48tmJt9SyeU+rjRTfy5Xveo1potqZFdUlJFx4 7mfAYa25j5cO5HuJuuBlHTceqSddxeSReW4nieFAmpmUFMBmATMWspwuFyxvsSU4lF2E xRfLf9qGwk9gA+t5WSo2mSqqQZBSgr2aKQgulO3ezfOo6p0hNj7DoyRDE3F0e9PQGegk c+8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=UNgCNXCKLk/0Oh5CzQJpiiDyZlvrUx+S2yZNpaT3pKU=; b=q1V0PWcZDy4v7BkP3aaMrPeSxhcsX1fQyIKm8T0Xz4s7f+fFB6sOYu0CO/1/F5RPA3 AMludzf24MK2vrmu4ZZEF3Ubn8FZ9Z3RSNqGeTHRxhCni4ZCQYf3LzzmFRC9TJem/D/6 xbfHB2uLfDBgoiAJhxyh2mFPM8DIKJhOrp/xsE0z7DX0SqFyN/g3Umcg0qT7nKOejy7i X35iUgnuxnhUIw+0mmjq4zBOBq0B33OVQuTSp8H8oLZ2p4y+n7g2L7z0xPBi2lfvQix8 L4GXjYshxvMcQM2LgIs2dBuirHOrHy/Lcdh3OK4dyfJXDFjk2G7rbjqmOnCDabRLViHo cnRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="hV/6P3pe"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v17si12320344ejj.22.2021.04.19.07.14.13; Mon, 19 Apr 2021 07: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=@gmail.com header.s=20161025 header.b="hV/6P3pe"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A3E31687F13; Mon, 19 Apr 2021 17:11:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 392AE680CF7 for ; Mon, 19 Apr 2021 17:11:39 +0300 (EEST) Received: by mail-qt1-f172.google.com with SMTP id o2so12710040qtr.4 for ; Mon, 19 Apr 2021 07:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YDa5pxhvZhIl1nJYb4AGqFHuci3S9NxoH4gjSICL4yQ=; b=hV/6P3peWvDvVecmQXYg8ZP/7fyqq7Zt7Ez2efiqlYbW8cEYPL4YwjSfhOmhAsuKsC CalvzMpqZG6vEhrY72Jjg+5yAN35NCVuG8LCgm4PXGEEZPmyWdy1SDSV4f2ngBpTpZif TpS6N5og7qAQ9Pw5m0s+oWr0KWlNXo0HIZVRdld1/8pCZRT5Y760ONK7Yk+QHMJ1DiFd 9gumEWznnBWuOnKMZbqAqHwy1D2AdriMdGW6DCNdC7ZG/jUmTI2BRbMZccuP074wLF0m tpQ5frFugQEKDXsLUj89BxiVyCjYgdS6ikQwE1BrZ337KlHorHAEAl0dpOM1z6ClwuAg GkfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YDa5pxhvZhIl1nJYb4AGqFHuci3S9NxoH4gjSICL4yQ=; b=R/nST60zFyQqqH+bcXZ4ynDNjTgurac1+rHhrtygQzm17cDWTYB4UOZlqkEWf/BBf4 vC3iSMaKJmeWQ8us7LKeu/n1q2sL/TYRbzU7VNE4R9CXNdGfMj1e+7z/5Nmzw2OMKbqX M7cRgZnG4TI5R4Yudnm9grAldCrWPM9jnQj0/Cvlo7eB/ZEJwA2ldqC6WS/1nciWqlif BLS5mWy6fIDwmDBkYXEfVXvmJW/GCn6kBpBmTfmsIGEcnJI3jrdEYhnAtBjoOQMgaFjz qwH+bB4aAMRuuxwgH43R1FYNNCnQXn4O/YXwdQl6r5U4SS9oAGMUoPnrFFx10UDPkxdI 4zzQ== X-Gm-Message-State: AOAM530PlEhN7MBZGlSD6YieMyEEOGywWmaofZ1kcFnCLdRk+l9fSLLh 4qO2BX7K2a8G1NWhfAKhvqO5doV06q0= X-Received: by 2002:a05:622a:1044:: with SMTP id f4mr12285237qte.224.1618841497904; Mon, 19 Apr 2021 07:11:37 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:37 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:27 -0300 Message-Id: <20210419141024.8174-31-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 30/87] avcodec/mpegvideo: Remove deprecated rc_strategy option 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Zi33gElgtq+O Content-Length: 3116 From: Andreas Rheinhardt Deprecated in d05c3b9ceeb9d00d4500c376448230e45f6ab108. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 12 ------------ libavcodec/version.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 30dcf99188..75e343838a 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -369,9 +369,6 @@ typedef struct MpegEncContext { uint8_t *mb_info_ptr; int mb_info_size; int ehc_mode; -#if FF_API_MPV_RC_STRATEGY - int rc_strategy; ///< deprecated -#endif /* H.263+ specific */ int umvplus; ///< == H.263+ && unrestricted_mv @@ -617,14 +614,6 @@ typedef struct MpegEncContext { #ifndef FF_MPV_OFFSET #define FF_MPV_OFFSET(x) offsetof(MpegEncContext, x) #endif -#if FF_API_MPV_RC_STRATEGY -#define FF_MPV_RC_STRATEGY_OPTS \ -{"rc_strategy", "ratecontrol method", FF_MPV_OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \ - { "ffmpeg", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \ - { "xvid", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, -#else -#define FF_MPV_RC_STRATEGY_OPTS -#endif #define FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) #define FF_MPV_COMMON_OPTS \ FF_MPV_OPT_CMP_FUNC, \ @@ -672,7 +661,6 @@ FF_MPV_OPT_CMP_FUNC, \ {"mepc", "Motion estimation bitrate penalty compensation (1.0 = 256)", FF_MPV_OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ {"mepre", "pre motion estimation", FF_MPV_OFFSET(me_pre), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ {"intra_penalty", "Penalty for intra blocks in block decision", FF_MPV_OFFSET(intra_penalty), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX/2, FF_MPV_OPT_FLAGS }, \ -FF_MPV_RC_STRATEGY_OPTS #define FF_MPV_COMMON_BFRAME_OPTS \ {"b_strategy", "Strategy to choose between I/P/B-frames", FF_MPV_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS }, \ diff --git a/libavcodec/version.h b/libavcodec/version.h index da36f1790d..552e5a7c5d 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -69,9 +69,6 @@ #ifndef FF_API_OLD_ENCDEC #define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_MPV_RC_STRATEGY -#define FF_API_MPV_RC_STRATEGY (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_PARSER_CHANGE #define FF_API_PARSER_CHANGE (LIBAVCODEC_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27111 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1094176yba; Mon, 19 Apr 2021 07:14:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw62GWnsx5ll5nDuA3WjMWF7m7hoqmQUBKldgFqXu1uAR7o+zWljh7OEOycNn/mMRpi/FsR X-Received: by 2002:aa7:cfd0:: with SMTP id r16mr12744201edy.330.1618841669493; Mon, 19 Apr 2021 07:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841669; cv=none; d=google.com; s=arc-20160816; b=p6HiQ8jK03DAufkuOgwSFftCoc6P7YQXGFaD3CH7OZFKrygtTAB1iLhfM19NOBKRwu oj9yuHLMH4CK166Su2pnkxxpoUQ0uvrrv/iYIPgxvybNf+fOTTgaus3YYMkMkVInRsqf PauvH445XanA/oQC+hXrCJ1FZZ9GPvsvomzkadtE5hCxSlswKFXGKYcJSqf2KkdqU8PA n29MRyDLjt5fSeKhvrgRjEP1ExTiNlgvprzdEmkhqkxb0ZUHn4fIDpPoHAgV2IsP4ckr 8FfElOfl4WRBiV3fO8Fv0ZKY8mps6tf6HrzaQxWDzM1iuasGvmtI06Mb5WxkOrQJvxNp njzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=AAWn27mgtSeiXQtctsPXyhpLqvwnuuj9L0QbZg/C7fA=; b=UtIgDqQA+kyRLpfdmZza716D849aL+CpDpuotypl9ZpDXd0YCOxjauX1reMbmDgbrV Y/DOqTw3YPWrqW7sqXuEjIlY97ewS0//mNiAV7D6aShSdSRFEujY7vv3yGCNiyFjE7qD 1Lgyif2xmrahgluaC7HdON4kbDhHrPCNvf+v546u3lYDROGOH0l67fxninIaosTWI1BY FwYJFxAVya6gKBtGMmdfDfE+/lbrPwQGt7QJgmGUsp2Omx6Mbes65Q6X1B9Voyv7eLem nLQVpYfBglDYJSTigpNj9jb9ujvnvKA1gfFFtY4dBkugJt0Z6n0tl3YQ1q+0eeYMKOPa loJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=CsSKSTYP; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s7si14347827ejd.402.2021.04.19.07.14.28; Mon, 19 Apr 2021 07:14:29 -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=@gmail.com header.s=20161025 header.b=CsSKSTYP; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3128E687F99; Mon, 19 Apr 2021 17:11:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55FD8680CEC for ; Mon, 19 Apr 2021 17:11:40 +0300 (EEST) Received: by mail-qk1-f180.google.com with SMTP id i12so4318754qke.3 for ; Mon, 19 Apr 2021 07:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6TuAcaDnOsBkXQyK/UMz3CoL6rMSPiEe6+D6WLhkhvA=; b=CsSKSTYP8glZ5kKm/KuS/9bqaGI9EwEXwlGs/zOQbIu/dwtL5OzYCHzoKYsY1A5SaJ TVLMjWd8Ti2P7efJmagbxyeAZ5UnIe0llsFGJ61wJ2a3SbMOxnWtl2S/OlwgWPSPQhIA dQCIUwwXfZLSBbJMDuQNA5dHcbopmQdZhg+E+uotuRs/3dUQ4dY4J/4hOuNFKkxP71/H zwCcEGp2YFb51Doa1SmdSUKP1RhyOaDw6o+JP6hFjzK4/zWAQtHYX49VLJy/+Q0WP7XE NvpTueR0Cil5LmEjxKv1BfoRwglRFLLu6OCW5FlsSASTrQtSQUemmxwcxtlruBtiL17p pC6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6TuAcaDnOsBkXQyK/UMz3CoL6rMSPiEe6+D6WLhkhvA=; b=Ld2uDCZHgusEUDk8a028XnJayAOoj2HUnzQQKpyPPwTl+/M+TxHEF+WLibt9dx2sFY cYChtgIUb+IJKLDoilfx41Jq5/T4e4NohQCzcFvWDu8wLOPCYbaYWPEafXzQXYH4Jsqm TbOU8yXi76RdbrcaQWqmy2LdjsclMQg/nf8DG7sOtyG0qo5s+njFl3HOmjRv5oy+gUlX xl+sdKIiiqHlfnIdhlUoAbO09y9Dx5nsndg7EAuRn0poN+PEIMVcXFzXXr/tNXpQezBw hB4/5XAZl5e2qF0GQATvozL/yeEqegS2b6rO/GMDtoO/5P+Ovfm5T2L+t/rFjuyjYXTI 5nPA== X-Gm-Message-State: AOAM530i73OrBNzgPP7zcvGKwXOUdrxSt5HzdZiyiiSFDPkrD7zmqLaq GzChSPxdcvIH/H1XihANVwKrLRCzOiY= X-Received: by 2002:a05:620a:1181:: with SMTP id b1mr12056774qkk.81.1618841498992; Mon, 19 Apr 2021 07:11:38 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:38 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:28 -0300 Message-Id: <20210419141024.8174-32-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 31/87] avcodec/parser: Remove deprecated av_parser_change 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4S0Kd4wYX70o Content-Length: 3544 From: Andreas Rheinhardt Deprecated in 9a07c1332cfe092b57b5758f22b686ca58806c60. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 12 ------------ libavcodec/parser.c | 36 ------------------------------------ libavcodec/version.h | 3 --- 3 files changed, 51 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index e817befa1c..43b83ac348 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3276,18 +3276,6 @@ int av_parser_parse2(AVCodecParserContext *s, int64_t pts, int64_t dts, int64_t pos); -#if FF_API_PARSER_CHANGE -/** - * @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed - * @deprecated Use dump_extradata, remove_extra or extract_extradata - * bitstream filters instead. - */ -attribute_deprecated -int av_parser_change(AVCodecParserContext *s, - AVCodecContext *avctx, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, int keyframe); -#endif void av_parser_close(AVCodecParserContext *s); /** diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 08b9945a57..593ea9ddf7 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -184,42 +184,6 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, return index; } -#if FF_API_PARSER_CHANGE -int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, int keyframe) -{ - if (s && s->parser->split) { - if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER || - avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER) { - int i = s->parser->split(avctx, buf, buf_size); - buf += i; - buf_size -= i; - } - } - - /* cast to avoid warning about discarding qualifiers */ - *poutbuf = (uint8_t *) buf; - *poutbuf_size = buf_size; - if (avctx->extradata) { - if (keyframe && (avctx->flags2 & AV_CODEC_FLAG2_LOCAL_HEADER)) { - int size = buf_size + avctx->extradata_size; - - *poutbuf_size = size; - *poutbuf = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE); - if (!*poutbuf) - return AVERROR(ENOMEM); - - memcpy(*poutbuf, avctx->extradata, avctx->extradata_size); - memcpy(*poutbuf + avctx->extradata_size, buf, - buf_size + AV_INPUT_BUFFER_PADDING_SIZE); - return 1; - } - } - - return 0; -} -#endif void av_parser_close(AVCodecParserContext *s) { if (s) { diff --git a/libavcodec/version.h b/libavcodec/version.h index 552e5a7c5d..17cd17c327 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -69,9 +69,6 @@ #ifndef FF_API_OLD_ENCDEC #define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_PARSER_CHANGE -#define FF_API_PARSER_CHANGE (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_THREAD_SAFE_CALLBACKS #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) #endif From patchwork Mon Apr 19 14:09:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27110 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1094311yba; Mon, 19 Apr 2021 07:14:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUmsoSzjY/26LTogyp66rGlAdCeIaLguVdaw9tr1fqrEyWBQdctx28/BPBL79km2aN+Pbd X-Received: by 2002:a17:906:4ed0:: with SMTP id i16mr21752141ejv.96.1618841680020; Mon, 19 Apr 2021 07:14:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841680; cv=none; d=google.com; s=arc-20160816; b=lle4WdEoMY+iMrhav8t0lac7GZ+qAWVfFVLYfaKYVm5Wm4s8y0AwgkC42Un/Dki2h5 6q2ibOwGvo8fAtoijEjD2UvZglYcetIJJdmJS7IxwDb35eN07WPykTlCcs2tNHFhAn0K P1KZzDQlA6CVNnKSOSRgB9EnHzJlo3BcLUACP0OValgl+khj+WU5+v9rbZZZ6rBWqv1/ /uENtni9sfxTURx8DUvkf2RUBREtw4q/Nw3tuUmOkkCJLizkPjxgEyTIGRsGJ4CaEA96 zQkJrjzsnwdn5ddab9al4+8DFk0WXE9m38Yv6OcWkcGhPMEBTz5JFbiE5giaFPM82T2P f6Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=tBthwFCCcDp4QX4roSvOP2hxQibs2fzk4RwSwk3iTt4=; b=fZ5al69F9Ge9GfrYMn2srXqeSY8XtRJYJylWTVOxwmzxjrvckHoZjrsBQtThmGVWLD ZcPKmPsH1J1IGmxJYZ5Knw0UqIxSACIxVDdEmXsHFA10mvKJ3gxV1YWB+URKelCPKI61 dyWRZh5B82Pp/vn2tNPz06Jq1C6YUPzev6EhuIicL/87RZF12QcGFz3TJ1dMa9af9IPP 7T75tOcIaWIAg1TNaiibft87gQgQagJ9HA5dsYsSYJDiJZxKxLykQcHjYTGkWysjysEx KxEpsPle/DHaxpmGnlLZjBKMY0xcDqIEIq1f7unBkVPlcF/5ynL8hNLFrZmEaRep8ugm QYAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=OxDFB66w; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q1si11910097ejy.298.2021.04.19.07.14.39; Mon, 19 Apr 2021 07: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=@gmail.com header.s=20161025 header.b=OxDFB66w; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A0770687FB2; Mon, 19 Apr 2021 17:11:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C02CE68799C for ; Mon, 19 Apr 2021 17:11:41 +0300 (EEST) Received: by mail-qk1-f177.google.com with SMTP id i12so4318823qke.3 for ; Mon, 19 Apr 2021 07:11:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=jklNGqeBnpQPwrWsJYgnz9DoJ1SU3LOBZEVqGRKzCJ0=; b=OxDFB66wAaibePjNSAbeo7JjGWO+BOfoCu0dKboi9yhWjVnPf4TgcecaYi5Ruoot3m p5zhvg2W/O2QJtDE/lnnQefmal01q2c1Wratg4wFwrE9c2otR9aYRj4zi+2aISlTBNHe DrQg9oGS/gxXcjgmOsGMrXh/GN6TbdaEeTXS5lG/SQPuwpNFnqdoE9qblVnXgBBpZ5I8 rG4jWY68pTGvMgRZJxGJG/VXveCjLUeGGfTvjvGZfCQCPLuRqJhjHesLHHHnwqJhmJLy 3hCd2552iFEQ3J2xVrtK/4D3fr4ibX5Nq/592zAf+gR5Jtc2hVoMEH+w/Wdyo0oDl6YK KH1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jklNGqeBnpQPwrWsJYgnz9DoJ1SU3LOBZEVqGRKzCJ0=; b=gWvwAi2xc56KuFPuaVFXBoCTSxm49Wk1ELeAbqG5cjnKI27MmpXSRR+8h5WLAx2p9m 5RqIG6K/xscP8Z8ZayYQYrd8pwTK54KGxoww+zP4k4Hm5Nbjf+ijxkkI4AfJVubBxiCV ebktY9D0fCEol+EjkD3X0JSkNy0jDjavL6TARg8UVy5F8YjtaSxKfXzB5yxwo4TjZL+z IYUkCQkwvRAsSoH6wcckchQ0Lw7OgPshDKtdcVW66fmYufo+4adNdlYxNfbk86zuxZQH kP9/CPZmF/RqgwOJFIIzclnUZ+TShp5HvaTtvWVapxK8UR4FInt/ef91kZhP3P+cOOrx MOWg== X-Gm-Message-State: AOAM531/pfGs2uloURQR2yDmP9sKPB2ByeW/36XDoAH7bRA6Yyrf/15z bzMEUT27XinVjI+7IUUN2EPc6tgKmHM= X-Received: by 2002:a37:b103:: with SMTP id a3mr12612477qkf.261.1618841500078; Mon, 19 Apr 2021 07:11:40 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:39 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:29 -0300 Message-Id: <20210419141024.8174-33-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 32/87] avcodec: Switch AVCPBProperties to 64bits 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qA+wHOgUpgL0 Content-Length: 4394 From: Andreas Rheinhardt Announced in 2e8b0446c6798947dac77fee4a06f9c4e8131ab5. Two FATE-tests needed to be updated because the checksums of side data containing an AVCPBProperties struct changed. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 12 ------------ libavcodec/version.h | 3 --- libavformat/dump.c | 4 ---- tests/ref/fate/mxf-d10-user-comments | 2 +- tests/ref/fate/ts-demux | 2 +- 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 43b83ac348..c99b455814 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -455,29 +455,17 @@ typedef struct AVCPBProperties { * Maximum bitrate of the stream, in bits per second. * Zero if unknown or unspecified. */ -#if FF_API_UNSANITIZED_BITRATES - int max_bitrate; -#else int64_t max_bitrate; -#endif /** * Minimum bitrate of the stream, in bits per second. * Zero if unknown or unspecified. */ -#if FF_API_UNSANITIZED_BITRATES - int min_bitrate; -#else int64_t min_bitrate; -#endif /** * Average bitrate of the stream, in bits per second. * Zero if unknown or unspecified. */ -#if FF_API_UNSANITIZED_BITRATES - int avg_bitrate; -#else int64_t avg_bitrate; -#endif /** * The size of the buffer to which the ratecontrol is applied, in bits. diff --git a/libavcodec/version.h b/libavcodec/version.h index 17cd17c327..0830acf8b2 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -54,9 +54,6 @@ #ifndef FF_API_CODED_FRAME #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_UNSANITIZED_BITRATES -#define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OPENH264_SLICE_MODE #define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 59) #endif diff --git a/libavformat/dump.c b/libavformat/dump.c index 62ef5e9852..2b6ed1ed1f 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -322,11 +322,7 @@ static void dump_cpb(void *ctx, const AVPacketSideData *sd) } av_log(ctx, AV_LOG_INFO, -#if FF_API_UNSANITIZED_BITRATES - "bitrate max/min/avg: %d/%d/%d buffer size: %d ", -#else "bitrate max/min/avg: %"PRId64"/%"PRId64"/%"PRId64" buffer size: %d ", -#endif cpb->max_bitrate, cpb->min_bitrate, cpb->avg_bitrate, cpb->buffer_size); if (cpb->vbv_delay == UINT64_MAX) diff --git a/tests/ref/fate/mxf-d10-user-comments b/tests/ref/fate/mxf-d10-user-comments index 13761fb0ce..609271ac05 100644 --- a/tests/ref/fate/mxf-d10-user-comments +++ b/tests/ref/fate/mxf-d10-user-comments @@ -6,7 +6,7 @@ #codec_id 0: mpeg2video #dimensions 0: 1280x720 #sar 0: 3/4 -0, -1, 0, 1, 150000, 0x0547870d, S=1, 24, 0x5aa90ad0 +0, -1, 0, 1, 150000, 0x0547870d, S=1, 40, 0x7ea50ad0 0, 0, 1, 1, 150000, 0xe80a1612, F=0x0 0, 1, 2, 1, 150000, 0xc5c50e2f, F=0x0 0, 2, 3, 1, 150000, 0x51e28a04, F=0x0 diff --git a/tests/ref/fate/ts-demux b/tests/ref/fate/ts-demux index cdf34d6af0..c20364483b 100644 --- a/tests/ref/fate/ts-demux +++ b/tests/ref/fate/ts-demux @@ -15,7 +15,7 @@ 1, 5760, 5760, 2880, 1536, 0xbab5129c 1, 8640, 8640, 2880, 1536, 0x602f034b, S=1, 1, 0x00bd00bd 1, 11520, 11520, 2880, 906, 0x69cdcbcd -0, 32037, 36541, 1501, 114336, 0x37a215a8, S=2, 1, 0x00e000e0, 24, 0x663d0b52 +0, 32037, 36541, 1501, 114336, 0x37a215a8, S=2, 1, 0x00e000e0, 40, 0x91e10b52 0, 33538, 33538, 1501, 12560, 0xb559a3d4, F=0x0, S=1, 1, 0x00e000e0 0, 35040, 35040, 1501, 12704, 0x2614adf4, F=0x0, S=1, 1, 0x00e000e0 0, 36541, 41046, 1501, 51976, 0x9ff1dbfe, F=0x0, S=1, 1, 0x00e000e0 From patchwork Mon Apr 19 14:09:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27117 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1094412yba; Mon, 19 Apr 2021 07:14:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi3d2BX3ssAVKQOTS7miQnZSwzjcjUKHM/V66R7MCb8UXngmOeib1d5hiGmX7rlLUW8Pkk X-Received: by 2002:a05:6402:2794:: with SMTP id b20mr8233705ede.48.1618841686369; Mon, 19 Apr 2021 07:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841686; cv=none; d=google.com; s=arc-20160816; b=zPliRYDhqqXP7RJJ5DjsHcyWfE/dI2vAGrZgwYfcH1RRXOWVmaQzDjslgq1uVvlJbp TBdVV/18jPqY0t3aWggSrSoiYhzbVTAsujolWg+EpiMcrPbmyzufwAPSmZOM6fW+SzcH D3zz7BnW7FP8VmRpNCemndSVczfDF9XLAJYrXlD3cwMwLWiXr1OkBhxAe75Jl0UcJqES x2yaZkX4yOwrzTV068P/f3ERR1rdc/dK3IKMtmkqOMAvuMukRBU2e6Iv4MZNclu6ZXQR 8VxFjNBiSOvuwMOFcuwKIPlE5e+0dwnowtAQu07SyOaRRZ7URSFgq7n3tQiafwufGhve Q6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=kpfIdynpXEkHmg3HSrjgB35PJLVA1Hs7Diqfzv8hBrU=; b=sAq2xm4SruO+AYgLiIHMZyRAoX70BKTsyOWr3VT/z6YttSdBN+i4LO25zHf+26Xc+M b2Fj+LD1j0ktbd/yBaexlS1oM37Ou14LII7l/KRLFIG9IWsf5Tj3h+sosGqQLDGRkbcM 8kX7eikfUQHF1o1qUHIWFcZkYLqwCqZG5+dt2o3t8GFj7YWPET6U9HgUgmg9VwdXYz2Z 7i3y/t2UtFVvS/OM5NIocehsz0qad6VwKwO6yN2QiHvDYRQFiIJ5fuHuOvJ7BKAjQ0ux xazjFeaTdA2NEG/mVxBYvJ7nj3rKkgXMx3VtURo6C0RdSFybMnmWwAjHQCLz78mq4npi qK3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=bQg9J5Dy; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x10si12423270ejs.152.2021.04.19.07.14.46; Mon, 19 Apr 2021 07:14:46 -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=@gmail.com header.s=20161025 header.b=bQg9J5Dy; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 83AAB680CEC; Mon, 19 Apr 2021 17:11:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 25064687F12 for ; Mon, 19 Apr 2021 17:11:43 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id t17so7380248qkg.4 for ; Mon, 19 Apr 2021 07:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZeHFeqHQJJQ6YaV5N6irXfIaAwvhvCzBh3qhkxDbooQ=; b=bQg9J5DyCRfFmJ6ARLbipEA6YDgDLHTYetQ/lylHt/wXh2Njezhu9XQ9V+kBuGc209 0sir8p74L11JlgunwFVfXpcaU5D3k5cXLSSbO+tJ6t2Vxq9W+HQER6HgSS2qe0dzACSF 2jRbK7PnJDEWpXuuW5Tj8Ox6iyzEgPi9z7/Ynzvt5/LnOMz1RBXrYJErEf45g0ufxuV9 QzdJdcgzzSua1gno9DoUd8A/7vmzitG+jNg3QZbfcKpuZIYHmG9Ohrs1jfGfcv8YZnsK gqRGDPmNeNPpiAwo6B+Xrk6bg682tQ49GquE+Wr2yeHvMdzezKl5YHJ7LrHxYiNguPIH BbaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZeHFeqHQJJQ6YaV5N6irXfIaAwvhvCzBh3qhkxDbooQ=; b=Sp3cYJWhIqj/7zXu9dBdH37Qf5AGwXqKfk6UEFYYuA2DZC4Cmk96YOfZkUL5qmfdid Eu7hq9tMtvzBXQLaWBWSBCbjOystUbl4Lk05XcUH0cHi5CQyUEFfo9LRz0FxsZDwuFyD 0f/TuJSSPzwG+C105h8iFTYxWXm2X8jKMUFVcL2o5LAjXdWY3KlbnOpKfS7sxl8ajrCy wPLnDKsw6rfw7SbuvDcclrEqtDvhlX74jgsTbTfcCDDNa1LkXzdBldPALXCi7LDYrd8z gHsYnNwBwsZVA4mrUPjj1zpebuVj+3mdUuCcSkXVP6sWUpBa1MkU2ZmZOKkbrx8l82cN RWhA== X-Gm-Message-State: AOAM532LKxRN4niA2gQqb53LhjF0xXckZHeCmaRr0o5XRpS1PiQv1ar5 YSwzsJ5UhraDGRFO8pmbzKg3gHfwyqk= X-Received: by 2002:a05:620a:1522:: with SMTP id n2mr6459416qkk.298.1618841501310; Mon, 19 Apr 2021 07:11:41 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:40 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:30 -0300 Message-Id: <20210419141024.8174-34-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 33/87] avformat: Constify the API wrt AV(In|Out)putFormat 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: IIPZzkNADO7s Content-Length: 28416 From: Andreas Rheinhardt Also constify AVProbeData. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 10 ++++++++ fftools/ffmpeg_opt.c | 12 +++++---- fftools/ffplay.c | 7 ++--- fftools/ffprobe.c | 2 +- libavdevice/internal.h | 2 +- libavdevice/utils.c | 2 +- libavfilter/lavfutils.c | 2 +- libavfilter/src_movie.c | 2 +- libavformat/avformat.h | 44 ++++++++++++++------------------ libavformat/avidec.c | 2 +- libavformat/dashdec.c | 2 +- libavformat/fifo.c | 4 +-- libavformat/format.c | 33 ++++++++++++------------ libavformat/hdsenc.c | 2 +- libavformat/hls.c | 2 +- libavformat/hlsenc.c | 4 +-- libavformat/mpeg.c | 2 +- libavformat/mux.c | 2 +- libavformat/rtpdec_asf.c | 2 +- libavformat/rtpenc_chain.c | 2 +- libavformat/rtpenc_mpegts.c | 4 +-- libavformat/sapdec.c | 2 +- libavformat/segment.c | 2 +- libavformat/smoothstreamingenc.c | 2 +- libavformat/utils.c | 2 +- libavformat/version.h | 3 --- libavformat/webm_chunk.c | 2 +- 27 files changed, 81 insertions(+), 76 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index cd3ea3c865..e9fa7ddf64 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,16 @@ API changes, most recent first: 2021-04-17 - xxxxxxxxxx - lavu 56.73.100 - frame.h detection_bbox.h Add AV_FRAME_DATA_DETECTION_BBOXES +2021-04-14 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h + Constified the pointers to AVInputFormats and AVOutputFormats + in AVFormatContext, avformat_alloc_output_context2(), + av_find_input_format(), av_probe_input_format(), + av_probe_input_format2(), av_probe_input_format3(), + av_probe_input_buffer2(), av_probe_input_buffer(), + avformat_open_input(), av_guess_format() and av_guess_codec(). + Furthermore, constified the AVProbeData in av_probe_input_format(), + av_probe_input_format2() and av_probe_input_format3(). + 2021-04-06 - xxxxxxxxxx - lavf 58.78.100 - avformat.h Add avformat_index_get_entries_count(), avformat_index_get_entry(), and avformat_index_get_entry_from_timestamp(). diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 807e783422..9e26de5a94 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1068,7 +1068,7 @@ static int open_input_file(OptionsContext *o, const char *filename) { InputFile *f; AVFormatContext *ic; - AVInputFormat *file_iformat = NULL; + const AVInputFormat *file_iformat = NULL; int err, i, ret; int64_t timestamp; AVDictionary *unused_opts = NULL; @@ -1117,20 +1117,22 @@ static int open_input_file(OptionsContext *o, const char *filename) av_dict_set_int(&o->g->format_opts, "sample_rate", o->audio_sample_rate[o->nb_audio_sample_rate - 1].u.i, 0); } if (o->nb_audio_channels) { + const AVClass *priv_class; /* because we set audio_channels based on both the "ac" and * "channel_layout" options, we need to check that the specified * demuxer actually has the "channels" option before setting it */ - if (file_iformat && file_iformat->priv_class && - av_opt_find(&file_iformat->priv_class, "channels", NULL, 0, + if (file_iformat && (priv_class = file_iformat->priv_class) && + av_opt_find(&priv_class, "channels", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)) { av_dict_set_int(&o->g->format_opts, "channels", o->audio_channels[o->nb_audio_channels - 1].u.i, 0); } } if (o->nb_frame_rates) { + const AVClass *priv_class; /* set the format-level framerate option; * this is important for video grabbers, e.g. x11 */ - if (file_iformat && file_iformat->priv_class && - av_opt_find(&file_iformat->priv_class, "framerate", NULL, 0, + if (file_iformat && (priv_class = file_iformat->priv_class) && + av_opt_find(&priv_class, "framerate", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)) { av_dict_set(&o->g->format_opts, "framerate", o->frame_rates[o->nb_frame_rates - 1].u.str, 0); diff --git a/fftools/ffplay.c b/fftools/ffplay.c index e14c800b8f..0be1d90bf9 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -203,7 +203,7 @@ typedef struct Decoder { typedef struct VideoState { SDL_Thread *read_tid; - AVInputFormat *iformat; + const AVInputFormat *iformat; int abort_request; int force_refresh; int paused; @@ -308,7 +308,7 @@ typedef struct VideoState { } VideoState; /* options specified by the user */ -static AVInputFormat *file_iformat; +static const AVInputFormat *file_iformat; static const char *input_filename; static const char *window_title; static int default_width = 640; @@ -3075,7 +3075,8 @@ static int read_thread(void *arg) return 0; } -static VideoState *stream_open(const char *filename, AVInputFormat *iformat) +static VideoState *stream_open(const char *filename, + const AVInputFormat *iformat) { VideoState *is; diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index a2cb7dc986..13ed16431d 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -257,7 +257,7 @@ static const OptionDef *options; /* FFprobe context */ static const char *input_filename; static const char *print_input_filename; -static AVInputFormat *iformat = NULL; +static const AVInputFormat *iformat = NULL; static struct AVHashContext *hash; diff --git a/libavdevice/internal.h b/libavdevice/internal.h index e222cf204d..67c90e1f87 100644 --- a/libavdevice/internal.h +++ b/libavdevice/internal.h @@ -22,7 +22,7 @@ #include "libavformat/avformat.h" av_warn_unused_result -int ff_alloc_input_device_context(struct AVFormatContext **avctx, struct AVInputFormat *iformat, +int ff_alloc_input_device_context(struct AVFormatContext **avctx, const AVInputFormat *iformat, const char *format); #endif diff --git a/libavdevice/utils.c b/libavdevice/utils.c index ccd7318012..d9a52c53ab 100644 --- a/libavdevice/utils.c +++ b/libavdevice/utils.c @@ -20,7 +20,7 @@ #include "libavutil/opt.h" #include "libavformat/avformat.h" -int ff_alloc_input_device_context(AVFormatContext **avctx, AVInputFormat *iformat, const char *format) +int ff_alloc_input_device_context(AVFormatContext **avctx, const AVInputFormat *iformat, const char *format) { AVFormatContext *s; int ret = 0; diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index 34051ee61d..2bc06257c6 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -26,7 +26,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], int *w, int *h, enum AVPixelFormat *pix_fmt, const char *filename, void *log_ctx) { - AVInputFormat *iformat = NULL; + const AVInputFormat *iformat = NULL; AVFormatContext *format_ctx = NULL; const AVCodec *codec; AVCodecContext *codec_ctx = NULL; diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 5892500410..e449e7e0c2 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -205,7 +205,7 @@ static int guess_channel_layout(MovieStream *st, int st_index, void *log_ctx) static av_cold int movie_common_init(AVFilterContext *ctx) { MovieContext *movie = ctx->priv; - AVInputFormat *iformat = NULL; + const AVInputFormat *iformat = NULL; int64_t timestamp; int nb_streams = 1, ret, i; char default_streams[16], *stream_specs, *spec, *cursor; diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 17b54c0997..166f1aa41c 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -525,15 +525,6 @@ typedef struct AVOutputFormat { * New public fields should be added right above. ***************************************************************** */ - /** - * The ff_const59 define is not part of the public API and will - * be removed without further warning. - */ -#if FF_API_AVIOFORMAT -#define ff_const59 -#else -#define ff_const59 const -#endif /** * size of private data so that it can be allocated in the wrapper */ @@ -1235,14 +1226,14 @@ typedef struct AVFormatContext { * * Demuxing only, set by avformat_open_input(). */ - ff_const59 struct AVInputFormat *iformat; + const struct AVInputFormat *iformat; /** * The output container format. * * Muxing only, must be set by the caller before avformat_write_header(). */ - ff_const59 struct AVOutputFormat *oformat; + const struct AVOutputFormat *oformat; /** * Format private data. This is an AVOptions-enabled struct @@ -2088,7 +2079,7 @@ AVProgram *av_new_program(AVFormatContext *s, int id); * @return >= 0 in case of success, a negative AVERROR code in case of * failure */ -int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFormat *oformat, +int avformat_alloc_output_context2(AVFormatContext **ctx, const AVOutputFormat *oformat, const char *format_name, const char *filename); /** @@ -2099,7 +2090,7 @@ int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFor /** * Find AVInputFormat based on the short name of the input format. */ -ff_const59 AVInputFormat *av_find_input_format(const char *short_name); +const AVInputFormat *av_find_input_format(const char *short_name); /** * Guess the file format. @@ -2108,7 +2099,7 @@ ff_const59 AVInputFormat *av_find_input_format(const char *short_name); * @param is_opened Whether the file is already opened; determines whether * demuxers with or without AVFMT_NOFILE are probed. */ -ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd, int is_opened); +const AVInputFormat *av_probe_input_format(const AVProbeData *pd, int is_opened); /** * Guess the file format. @@ -2122,7 +2113,8 @@ ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd, int * If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended * to retry with a larger probe buffer. */ -ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int is_opened, int *score_max); +const AVInputFormat *av_probe_input_format2(const AVProbeData *pd, + int is_opened, int *score_max); /** * Guess the file format. @@ -2131,7 +2123,8 @@ ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int * demuxers with or without AVFMT_NOFILE are probed. * @param score_ret The score of the best detection. */ -ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int is_opened, int *score_ret); +const AVInputFormat *av_probe_input_format3(const AVProbeData *pd, + int is_opened, int *score_ret); /** * Probe a bytestream to determine the input format. Each time a probe returns @@ -2149,14 +2142,14 @@ ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int * the maximal score is AVPROBE_SCORE_MAX * AVERROR code otherwise */ -int av_probe_input_buffer2(AVIOContext *pb, ff_const59 AVInputFormat **fmt, +int av_probe_input_buffer2(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size); /** * Like av_probe_input_buffer2() but returns 0 on success */ -int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, +int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size); @@ -2179,7 +2172,8 @@ int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, * * @note If you want to use custom IO, preallocate the format context and set its pb field. */ -int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 AVInputFormat *fmt, AVDictionary **options); +int avformat_open_input(AVFormatContext **ps, const char *url, + const AVInputFormat *fmt, AVDictionary **options); #if FF_API_DEMUXER_OPEN /** @@ -2570,16 +2564,16 @@ int av_write_trailer(AVFormatContext *s); * @param mime_type if non-NULL checks if mime_type matches with the * MIME type of the registered formats */ -ff_const59 AVOutputFormat *av_guess_format(const char *short_name, - const char *filename, - const char *mime_type); +const AVOutputFormat *av_guess_format(const char *short_name, + const char *filename, + const char *mime_type); /** * Guess the codec ID based upon muxer and filename. */ -enum AVCodecID av_guess_codec(ff_const59 AVOutputFormat *fmt, const char *short_name, - const char *filename, const char *mime_type, - enum AVMediaType type); +enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name, + const char *filename, const char *mime_type, + enum AVMediaType type); /** * Get timing information for the data currently output. diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 48370fe5ce..ac020109c6 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1092,7 +1092,7 @@ static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt) uint8_t desc[256]; int score = AVPROBE_SCORE_EXTENSION, ret; AVIStream *ast = st->priv_data; - ff_const59 AVInputFormat *sub_demuxer; + const AVInputFormat *sub_demuxer; AVRational time_base; int size; AVProbeData pd; diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 73effd85db..39e7810e42 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1879,7 +1879,7 @@ static void close_demux_for_component(struct representation *pls) static int reopen_demux_for_component(AVFormatContext *s, struct representation *pls) { DASHContext *c = s->priv_data; - ff_const59 AVInputFormat *in_fmt = NULL; + const AVInputFormat *in_fmt = NULL; AVDictionary *in_fmt_opts = NULL; uint8_t *avio_ctx_buffer = NULL; int ret = 0, i; diff --git a/libavformat/fifo.c b/libavformat/fifo.c index 17748e94ce..78afaff197 100644 --- a/libavformat/fifo.c +++ b/libavformat/fifo.c @@ -469,7 +469,7 @@ static void *fifo_consumer_thread(void *data) return NULL; } -static int fifo_mux_init(AVFormatContext *avf, ff_const59 AVOutputFormat *oformat, +static int fifo_mux_init(AVFormatContext *avf, const AVOutputFormat *oformat, const char *filename) { FifoContext *fifo = avf->priv_data; @@ -508,7 +508,7 @@ static int fifo_mux_init(AVFormatContext *avf, ff_const59 AVOutputFormat *oforma static int fifo_init(AVFormatContext *avf) { FifoContext *fifo = avf->priv_data; - ff_const59 AVOutputFormat *oformat; + const AVOutputFormat *oformat; int ret = 0; if (fifo->recovery_wait_streamtime && !fifo->drop_pkts_on_overflow) { diff --git a/libavformat/format.c b/libavformat/format.c index c47490c8eb..cc214741bd 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -48,8 +48,8 @@ int av_match_ext(const char *filename, const char *extensions) return 0; } -ff_const59 AVOutputFormat *av_guess_format(const char *short_name, const char *filename, - const char *mime_type) +const AVOutputFormat *av_guess_format(const char *short_name, const char *filename, + const char *mime_type) { const AVOutputFormat *fmt = NULL; AVOutputFormat *fmt_found = NULL; @@ -84,12 +84,12 @@ ff_const59 AVOutputFormat *av_guess_format(const char *short_name, const char *f return fmt_found; } -enum AVCodecID av_guess_codec(ff_const59 AVOutputFormat *fmt, const char *short_name, +enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type) { if (av_match_name("segment", fmt->name) || av_match_name("ssegment", fmt->name)) { - ff_const59 AVOutputFormat *fmt2 = av_guess_format(NULL, filename, NULL); + const AVOutputFormat *fmt2 = av_guess_format(NULL, filename, NULL); if (fmt2) fmt = fmt2; } @@ -115,7 +115,7 @@ enum AVCodecID av_guess_codec(ff_const59 AVOutputFormat *fmt, const char *short_ return AV_CODEC_ID_NONE; } -ff_const59 AVInputFormat *av_find_input_format(const char *short_name) +const AVInputFormat *av_find_input_format(const char *short_name) { const AVInputFormat *fmt = NULL; void *i = 0; @@ -125,12 +125,12 @@ ff_const59 AVInputFormat *av_find_input_format(const char *short_name) return NULL; } -ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int is_opened, - int *score_ret) +const AVInputFormat *av_probe_input_format3(const AVProbeData *pd, + int is_opened, int *score_ret) { AVProbeData lpd = *pd; const AVInputFormat *fmt1 = NULL; - ff_const59 AVInputFormat *fmt = NULL; + const AVInputFormat *fmt = NULL; int score, score_max = 0; void *i = 0; const static uint8_t zerobuffer[AVPROBE_PADDING_SIZE]; @@ -191,7 +191,7 @@ ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int } if (score > score_max) { score_max = score; - fmt = (AVInputFormat*)fmt1; + fmt = fmt1; } else if (score == score_max) fmt = NULL; } @@ -202,10 +202,11 @@ ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int return fmt; } -ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int is_opened, int *score_max) +const AVInputFormat *av_probe_input_format2(const AVProbeData *pd, + int is_opened, int *score_max) { int score_ret; - ff_const59 AVInputFormat *fmt = av_probe_input_format3(pd, is_opened, &score_ret); + const AVInputFormat *fmt = av_probe_input_format3(pd, is_opened, &score_ret); if (score_ret > *score_max) { *score_max = score_ret; return fmt; @@ -213,15 +214,15 @@ ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int return NULL; } -ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd, int is_opened) +const AVInputFormat *av_probe_input_format(const AVProbeData *pd, int is_opened) { int score = 0; return av_probe_input_format2(pd, is_opened, &score); } -int av_probe_input_buffer2(AVIOContext *pb, ff_const59 AVInputFormat **fmt, - const char *filename, void *logctx, - unsigned int offset, unsigned int max_probe_size) +int av_probe_input_buffer2(AVIOContext *pb, const AVInputFormat **fmt, + const char *filename, void *logctx, + unsigned int offset, unsigned int max_probe_size) { AVProbeData pd = { filename ? filename : "" }; uint8_t *buf = NULL; @@ -309,7 +310,7 @@ fail: return ret < 0 ? ret : score; } -int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, +int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) { diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 353a45f6df..98156afafa 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -313,8 +313,8 @@ static void close_file(AVFormatContext *s, OutputStream *os) static int hds_write_header(AVFormatContext *s) { HDSContext *c = s->priv_data; + const AVOutputFormat *oformat; int ret = 0, i; - ff_const59 AVOutputFormat *oformat; if (mkdir(s->url, 0777) == -1 && errno != EEXIST) { av_log(s, AV_LOG_ERROR , "Failed to create directory %s\n", s->url); diff --git a/libavformat/hls.c b/libavformat/hls.c index b589ad2870..83acbb0aa6 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1957,8 +1957,8 @@ static int hls_read_header(AVFormatContext *s) /* Open the demuxer for each playlist */ for (i = 0; i < c->n_playlists; i++) { struct playlist *pls = c->playlists[i]; + const AVInputFormat *in_fmt = NULL; char *url; - ff_const59 AVInputFormat *in_fmt = NULL; if (!(pls->ctx = avformat_alloc_context())) { ret = AVERROR(ENOMEM); diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 7d97ce1789..9a848b6470 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -119,8 +119,8 @@ typedef struct VariantStream { unsigned var_stream_idx; unsigned number; int64_t sequence; - ff_const59 AVOutputFormat *oformat; - ff_const59 AVOutputFormat *vtt_oformat; + const AVOutputFormat *oformat; + const AVOutputFormat *vtt_oformat; AVIOContext *out; AVIOContext *out_single_file; int packets_written; diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 79610ec600..0ddeaa9fb8 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -732,6 +732,7 @@ static int vobsub_read_header(AVFormatContext *s) { int i, ret = 0, header_parsed = 0, langidx = 0; VobSubDemuxContext *vobsub = s->priv_data; + const AVInputFormat *iformat; size_t fname_len; AVBPrint header; int64_t delay = 0; @@ -739,7 +740,6 @@ static int vobsub_read_header(AVFormatContext *s) int stream_id = -1; char id[64] = {0}; char alt[MAX_LINE_SIZE] = {0}; - ff_const59 AVInputFormat *iformat; if (!vobsub->sub_name) { char *ext; diff --git a/libavformat/mux.c b/libavformat/mux.c index d8746f3c13..a05b55b53c 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -133,7 +133,7 @@ enum AVChromaLocation ff_choose_chroma_location(AVFormatContext *s, AVStream *st } -int avformat_alloc_output_context2(AVFormatContext **avctx, ff_const59 AVOutputFormat *oformat, +int avformat_alloc_output_context2(AVFormatContext **avctx, const AVOutputFormat *oformat, const char *format, const char *filename) { AVFormatContext *s = avformat_alloc_context(); diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c index e58f0260f3..2749ad1380 100644 --- a/libavformat/rtpdec_asf.c +++ b/libavformat/rtpdec_asf.c @@ -106,7 +106,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p) AVDictionary *opts = NULL; int len = strlen(p) * 6 / 8; char *buf = av_mallocz(len); - ff_const59 AVInputFormat *iformat; + const AVInputFormat *iformat; if (!buf) return AVERROR(ENOMEM); diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c index e6b603db70..cd751f48b6 100644 --- a/libavformat/rtpenc_chain.c +++ b/libavformat/rtpenc_chain.c @@ -31,7 +31,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, { AVFormatContext *rtpctx = NULL; int ret; - ff_const59 AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL); + const AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL); uint8_t *rtpflags; AVDictionary *opts = NULL; diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c index da17b1d776..36c0979ca1 100644 --- a/libavformat/rtpenc_mpegts.c +++ b/libavformat/rtpenc_mpegts.c @@ -56,8 +56,8 @@ static int rtp_mpegts_write_header(AVFormatContext *s) { MuxChain *chain = s->priv_data; AVFormatContext *mpegts_ctx = NULL, *rtp_ctx = NULL; - ff_const59 AVOutputFormat *mpegts_format = av_guess_format("mpegts", NULL, NULL); - ff_const59 AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL); + const AVOutputFormat *mpegts_format = av_guess_format("mpegts", NULL, NULL); + const AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL); int i, ret = AVERROR(ENOMEM); AVStream *st; AVDictionary *mpegts_muxer_options = NULL; diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c index eec73aa2f4..3014bdaa97 100644 --- a/libavformat/sapdec.c +++ b/libavformat/sapdec.c @@ -65,9 +65,9 @@ static int sap_read_header(AVFormatContext *s) struct SAPState *sap = s->priv_data; char host[1024], path[1024], url[1024]; uint8_t recvbuf[RTP_MAX_PACKET_LENGTH]; + const AVInputFormat *infmt; int port; int ret, i; - ff_const59 AVInputFormat* infmt; if (!ff_network_init()) return AVERROR(EIO); diff --git a/libavformat/segment.c b/libavformat/segment.c index cd72e8b701..13954b8f99 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -72,7 +72,7 @@ typedef struct SegmentContext { int segment_idx_wrap; ///< number after which the index wraps int segment_idx_wrap_nb; ///< number of time the index has wraped int segment_count; ///< number of segment files already written - ff_const59 AVOutputFormat *oformat; + const AVOutputFormat *oformat; AVFormatContext *avf; char *format; ///< format to use for output segment files AVDictionary *format_options; diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index ba5cc27ca0..941f03f0b1 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -283,7 +283,7 @@ static int ism_write_header(AVFormatContext *s) { SmoothStreamingContext *c = s->priv_data; int ret = 0, i; - ff_const59 AVOutputFormat *oformat; + const AVOutputFormat *oformat; if (mkdir(s->url, 0777) == -1 && errno != EEXIST) { av_log(s, AV_LOG_ERROR, "mkdir failed\n"); diff --git a/libavformat/utils.c b/libavformat/utils.c index 322ccd3af2..ec48d1c08e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -545,7 +545,7 @@ FF_ENABLE_DEPRECATION_WARNINGS int avformat_open_input(AVFormatContext **ps, const char *filename, - ff_const59 AVInputFormat *fmt, AVDictionary **options) + const AVInputFormat *fmt, AVDictionary **options) { AVFormatContext *s = *ps; int i, ret = 0; diff --git a/libavformat/version.h b/libavformat/version.h index d82adba668..81326aa199 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -97,9 +97,6 @@ #ifndef FF_API_LAVF_MP4A_LATM #define FF_API_LAVF_MP4A_LATM (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_AVIOFORMAT -#define FF_API_AVIOFORMAT (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_DEMUXER_OPEN #define FF_API_DEMUXER_OPEN (LIBAVFORMAT_VERSION_MAJOR < 59) #endif diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index fb5b20a8cc..fefab982cb 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -50,7 +50,7 @@ typedef struct WebMChunkContext { static int webm_chunk_init(AVFormatContext *s) { WebMChunkContext *wc = s->priv_data; - ff_const59 AVOutputFormat *oformat; + const AVOutputFormat *oformat; AVFormatContext *oc; AVStream *st, *ost = s->streams[0]; AVDictionary *dict = NULL; From patchwork Mon Apr 19 14:09:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27047 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp558571iob; Mon, 19 Apr 2021 07:15:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8OyPg6dBcV1PJqcinDe5H0/ccfl+3teEpyCVqBjeNfCGLc3g34jFm/BDtSMOMdzXFBIBM X-Received: by 2002:a17:906:49c1:: with SMTP id w1mr22749787ejv.178.1618841701269; Mon, 19 Apr 2021 07:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841701; cv=none; d=google.com; s=arc-20160816; b=rXZ240AiDiWXj1lofo7Xqs1zDQ3IUOd7wG9EcKy2Fyj1xVmTSUQv2oICpXNp0966S2 N8QwOlLumKf6uh54uQeGEP2vl+n69F/0tKaLbq6uYBJYPiH9a/WYVpp/7jju2xWnOI3q MBCkkzd23VhemfwlOhhCU916eNxB7cslpK5VlGPMQLpbG+ff2jZyDO8cXpzjxU9sriVT XHzdmT7Yj0kjIEdz/8KqE7q7nIbNNyDv4bUnEb2l1feRjYgaD/zT1UBhlMVUjS2ttDy2 C7DsfjLF6sQwoseHyxp0IMup8ACQK0/BmyJ+RmIjdu2+GmhdRMgfysr80UbAikp3zp5R QpDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=bi+PbtLUR6vPdOgEI2oBd1ja/VipKGo2UZeACj6nwMw=; b=BDav/na7oGhluq9dMFi2eLuB5eRzLpO8Bjju4ScI+vHjtgHRZRlV6sWyRoccqM8lH6 Kc8hSsrtqtYPe9x/oLsawxOYMXDXHmsh94wkWqoC91aQZfvv/EgdWCg/S5hXakhgmLPf rmWIQuS+3/eR2IdEE9kBHiBOOSX8U7pqJ7TXv2sCAlNi1FKvCBqY1PPWq2GkaFNrh7SK h/z/+Az+rbJHSJIFlpktaPqep1FifbBiaEmb/fdlFRGcWh+Z2Hug1xQaV9Yg4x5d9QEr l1u3P1ORFh/lEenXjyVM5g5H82UJJTa/15zkcQLPo/trrdhAnxsgwrXmdej54eOxglsG AIEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Kxz8BsNe; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bc2si4684401edb.287.2021.04.19.07.15.00; Mon, 19 Apr 2021 07:15: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=@gmail.com header.s=20161025 header.b=Kxz8BsNe; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A16A368811D; Mon, 19 Apr 2021 17:11:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D18AA687F99 for ; Mon, 19 Apr 2021 17:11:43 +0300 (EEST) Received: by mail-qk1-f177.google.com with SMTP id x11so35788067qkp.11 for ; Mon, 19 Apr 2021 07:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ld+e+bHjaejy6Y9ij7RZK9Z02zll44/FS7n8chE8viI=; b=Kxz8BsNeYCr8XvvsekYYhgPhTaTFvRwdOpXp+Cz+E11p+HcOCgO4aQd4F7WcySafxn W1/yMh7V6/f2Pbl+mBxRvWMWc1xuPQhQHmgfp021UTLaSPcTVfOVu/2uuQUE8O+UDPw1 XRPnQgRvgczPLC4in7ZK7sBfXLMB2CmrVqlt2xgda5QRjS0radrbu0IIXEksOovmyVHM dRViTa2Fxe/YJnl1kxaQ/dO7tv+2ddQ9+mxev3BPz51ysFxwPYdI8VPE3KTqvvcEOvn6 lxOLNpNz83rTCzlFjo02yQCh38OJ+AZQe8ehNyza61TuBuTU7JDIFB4X4MaSiCAT76iS 84dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ld+e+bHjaejy6Y9ij7RZK9Z02zll44/FS7n8chE8viI=; b=RSjaNQt7jHLNddszSTsQCs9QSWeLGk9V8QMDnuxnKXnPnrAIL2HLdULHVsrDv/3q6X I20BuG8pT6YUgSaB30lZbJpKTo+Cj9c/eptOMJgpbz/35ekzYiKfNi/Sk/q2p2C5rvJs Pm2zWqoCBBUxkPkwsd0aLTKcISAJtmFFqpdI/9vmtZrEriv0ImZ7HpRTIhFLm71moGEq /45xDquwMvsHioXrsLuXShmKMwyPWFKkGrZPaPRwicSlBHMOMR29gya5g2QuoB0F0owZ rEXzAkIo9X9gcNAbWDC9EuH72Pkbdgq5k30fAz2GbRC2R8ed6KQXz+4pNDeZ0S3qa6mj dq5Q== X-Gm-Message-State: AOAM531UQVI7rGZoVEhxQHKSPnaO6jG/bfnxGDF4e+/LYxQPGgelIbjK SNg1Ttkbjdh3jL0OdPbJV1fS+chrAWU= X-Received: by 2002:ae9:ec03:: with SMTP id h3mr12667913qkg.87.1618841502513; Mon, 19 Apr 2021 07:11:42 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:42 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:31 -0300 Message-Id: <20210419141024.8174-35-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 34/87] avformat: Remove FFserver leftovers 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: T3Lww5DXhxOj From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 18 ------------------ libavformat/utils.c | 22 ---------------------- libavformat/version.h | 3 --- 3 files changed, 43 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 166f1aa41c..578ccbd87d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1000,18 +1000,6 @@ typedef struct AVStream { */ AVRational r_frame_rate; -#if FF_API_LAVF_FFSERVER - /** - * String containing pairs of key and values describing recommended encoder configuration. - * Pairs are separated by ','. - * Keys are separated from values by '='. - * - * @deprecated unused - */ - attribute_deprecated - char *recommended_encoder_configuration; -#endif - /** * Codec parameters associated with this stream. Allocated and freed by * libavformat in avformat_new_stream() and avformat_free_context() @@ -1107,12 +1095,6 @@ attribute_deprecated AVRational av_stream_get_r_frame_rate(const AVStream *s); attribute_deprecated void av_stream_set_r_frame_rate(AVStream *s, AVRational r); -#if FF_API_LAVF_FFSERVER -attribute_deprecated -char* av_stream_get_recommended_encoder_configuration(const AVStream *s); -attribute_deprecated -void av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration); -#endif #endif struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); diff --git a/libavformat/utils.c b/libavformat/utils.c index ec48d1c08e..7d944268d3 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -115,11 +115,6 @@ static int64_t wrap_timestamp(const AVStream *st, int64_t timestamp) #if FF_API_FORMAT_GET_SET MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate) -#if FF_API_LAVF_FFSERVER -FF_DISABLE_DEPRECATION_WARNINGS -MAKE_ACCESSORS(AVStream, stream, char *, recommended_encoder_configuration) -FF_ENABLE_DEPRECATION_WARNINGS -#endif MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec) MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec) MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec) @@ -4392,18 +4387,6 @@ int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src) } } -#if FF_API_LAVF_FFSERVER -FF_DISABLE_DEPRECATION_WARNINGS - av_freep(&dst->recommended_encoder_configuration); - if (src->recommended_encoder_configuration) { - const char *conf_str = src->recommended_encoder_configuration; - dst->recommended_encoder_configuration = av_strdup(conf_str); - if (!dst->recommended_encoder_configuration) - return AVERROR(ENOMEM); - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - return 0; } @@ -4448,11 +4431,6 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif av_freep(&st->priv_data); -#if FF_API_LAVF_FFSERVER -FF_DISABLE_DEPRECATION_WARNINGS - av_freep(&st->recommended_encoder_configuration); -FF_ENABLE_DEPRECATION_WARNINGS -#endif av_freep(pst); } diff --git a/libavformat/version.h b/libavformat/version.h index 81326aa199..de18399298 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -82,9 +82,6 @@ #ifndef FF_API_OLD_AVIO_EOF_0 #define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_LAVF_FFSERVER -#define FF_API_LAVF_FFSERVER (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_FORMAT_FILENAME #define FF_API_FORMAT_FILENAME (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27028 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp558749iob; Mon, 19 Apr 2021 07:15:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCBhnbDK/5Z+mJFDvcs2ePt2MCvcxzEFlF0XL6FH5QI6UqauZIkg5nxIhg1D1hZ20C41HG X-Received: by 2002:a17:906:4881:: with SMTP id v1mr3127077ejq.383.1618841711274; Mon, 19 Apr 2021 07:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841711; cv=none; d=google.com; s=arc-20160816; b=0sUeaWZz36DfwTHZwlUDtPYRfnRqtDEi7UucQOw7BTjI+3MuIPlOElFrvDxZ9R0SWo Ckssf8KgYGN2k2G9QpqWBbjfFGG2Do5ME5Gx1Ns8SegWbbLYB95eSLvLXVCpnoODnCoN WB+G02E8IW/U9jnNoOAzrvCBWNd8XsoeBzSfYhrapPI2o5ub1ULdfoQYR6Ylv0wN7Naz 1TDDaOjMTpXCLgqJfjG1FYn2NTew0iX/qL54OHvIgs64mLAAW8B6fLqxe92EHB0fXvDr CXCj3qjH9QkOM3xO4S5tn+P/aD9JJ4lqCECBoQmvLfzYyGZicTIDVCdA4GpCt7pqKNxa MLyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=uBS3R7haCjScD2UBuro3MEup7S4Ge4ZZgb03uGCxiHE=; b=D34nn/U7a5FN+QpPxkSaCrXkI2dhh95ZZXiMu2FPCkjwEqM2AG1xi7446sJLXapstJ qxFEvkyoGoXsmQNJPfnLcue5aQQ2z2/yT+/SDHonxvuQrFkXAkgNbVm4Fk6tL+pnlWO/ o7uPESerybiepe/t/vZXuGRKB0mBmaJoxph0w4Vjl/4GJeCJG7vHBr9IFjC4LC8FinjV dglN6nL43YRWHwvIkFQ2Ec+cXDVZPkQuA0v+hijObx/gg4GVFzy/0NBsDnfQJnxLGxlI nH4tYjlrF3FTCrqxfW1gEdHR8G2mKzl14tXw5l41m2tpQbRYZgXqRUvBGp9R11fPsQMk vpPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=mPG6pkC6; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b19si11558239edr.172.2021.04.19.07.15.11; Mon, 19 Apr 2021 07:15:11 -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=@gmail.com header.s=20161025 header.b=mPG6pkC6; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B5CE7688057; Mon, 19 Apr 2021 17:11:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1939D680CEC for ; Mon, 19 Apr 2021 17:11:44 +0300 (EEST) Received: by mail-qt1-f169.google.com with SMTP id j7so26122873qtx.5 for ; Mon, 19 Apr 2021 07:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lUgZeWdK2wI5UDLFRBz2zsZEsMNqi2hrgtQ2+6HkfCc=; b=mPG6pkC6dAcRIbrxQmSoaJzWAzYMFsY3seKSTJ9EUaZjpegD3JImIwgcxRG3H0Bme3 Et2I1flDDqHUqEqbF249fUF7s6MWuaAAMCMMsUjOUwYSL3wtkEUp0BSgiHJKuy6FMcOF 94k0I76XDZZMF38qObcXyQClwZIPLADji47Y7Nm+s2CwputHkQWAALcgJCfcmrhO74r8 oO3GbMnbFEJJhMnj0kX9jaBBueEcVSem9/Bdf3VSW69Q9k7OWx5cn68hQJ7+MJDBvqtm h1xQX9Al+7GjqgcpiED7oEjz6V2PvQumCjKAcSD5MlDMmeMV5JsdnpsNyOX/BdO1+rvd wRaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lUgZeWdK2wI5UDLFRBz2zsZEsMNqi2hrgtQ2+6HkfCc=; b=jzk59fCLawrYcC4hNHI5ew7FsoDvFXOwznUyty6aUjTuRGlElZIugz8fvCJNMWH22m GXpekSnse2VjMVwvC0QCCqDS67RGsqxWSevYINzylcIgdvCNEpq0JJcxviholyQ4RVM+ 0Y7YRw7RRmqY2z9U/BL4KCK0/BWn8YpeD6oBQR7VLJwoSUb+opA3SkgqgqfqVS7D/5PQ o023eW3J+YvVps+mfcG4sO8lx3pEYMYur+t7W8sGHuBNThizdWD3QJrTHVtC1hjsJK/S B/4kUZxpp/Du8AscC810nfEjbRrWLSPWWRNdUJoMLmIsC+r24iyketae5IKjoCPG5asO tfaw== X-Gm-Message-State: AOAM533q325MrU/ifU+KA/KeVg3GtabeUosqi5akWc+d445armVVbCUJ yUrBx+Tp6e9vYJZf0Yz0tK183yYg7uE= X-Received: by 2002:ac8:5e4a:: with SMTP id i10mr11848113qtx.341.1618841503614; Mon, 19 Apr 2021 07:11:43 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:43 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:32 -0300 Message-Id: <20210419141024.8174-36-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 35/87] avformat: Remove deprecated old open callbacks 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: GyPl5eoWl6ub From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 26 -------------------------- libavformat/options.c | 7 ------- libavformat/utils.c | 5 ----- libavformat/version.h | 3 --- 4 files changed, 41 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 578ccbd87d..14063ac5e5 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1743,28 +1743,6 @@ typedef struct AVFormatContext { */ enum AVCodecID data_codec_id; -#if FF_API_OLD_OPEN_CALLBACKS - /** - * Called to open further IO contexts when needed for demuxing. - * - * This can be set by the user application to perform security checks on - * the URLs before opening them. - * The function should behave like avio_open2(), AVFormatContext is provided - * as contextual information and to reach AVFormatContext.opaque. - * - * If NULL then some simple checks are used together with avio_open2(). - * - * Must not be accessed directly from outside avformat. - * @See av_format_set_open_cb() - * - * Demuxing: Set by user. - * - * @deprecated Use io_open and io_close. - */ - attribute_deprecated - int (*open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options); -#endif - /** * ',' separated list of allowed protocols. * - encoding: unused @@ -1864,10 +1842,6 @@ attribute_deprecated av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s); attribute_deprecated void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback); -#if FF_API_OLD_OPEN_CALLBACKS -attribute_deprecated AVOpenCallback av_format_get_open_cb(const AVFormatContext *s); -attribute_deprecated void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback); -#endif #endif /** diff --git a/libavformat/options.c b/libavformat/options.c index 07403b533e..632d450c90 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -181,13 +181,6 @@ static int io_open_default(AVFormatContext *s, AVIOContext **pb, av_log(s, loglevel, "Opening \'%s\' for %s\n", url, flags & AVIO_FLAG_WRITE ? "writing" : "reading"); -#if FF_API_OLD_OPEN_CALLBACKS -FF_DISABLE_DEPRECATION_WARNINGS - if (s->open_cb) - return s->open_cb(s, pb, url, flags, &s->interrupt_callback, options); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - return ffio_open_whitelist(pb, url, flags, &s->interrupt_callback, options, s->protocol_whitelist, s->protocol_blacklist); } diff --git a/libavformat/utils.c b/libavformat/utils.c index 7d944268d3..bb0351d7f5 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -122,11 +122,6 @@ MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, data_codec) MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding) MAKE_ACCESSORS(AVFormatContext, format, void *, opaque) MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb) -#if FF_API_OLD_OPEN_CALLBACKS -FF_DISABLE_DEPRECATION_WARNINGS -MAKE_ACCESSORS(AVFormatContext, format, AVOpenCallback, open_cb) -FF_ENABLE_DEPRECATION_WARNINGS -#endif #endif int64_t av_stream_get_end_pts(const AVStream *st) diff --git a/libavformat/version.h b/libavformat/version.h index de18399298..e264abd77b 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -55,9 +55,6 @@ * at once through the bump. This improves the git bisect-ability of the change. * */ -#ifndef FF_API_OLD_OPEN_CALLBACKS -#define FF_API_OLD_OPEN_CALLBACKS (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27046 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp558906iob; Mon, 19 Apr 2021 07:15:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPHT3/9LWuGt6zyPIZc12GYgdP99t1VW/FN/oGCZQwnfKSo/QlZ5/IDlM0iyTd4ODn9N6I X-Received: by 2002:a17:906:c82c:: with SMTP id dd12mr22131632ejb.132.1618841723101; Mon, 19 Apr 2021 07:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841723; cv=none; d=google.com; s=arc-20160816; b=ZSBBIQniiv+34A3LoYUoB2SyQUIYz5QIF41FsOgwc0b3ouUuGcjC5oCmWZUg1LVVRw 5AsVyiAS5/JTzurTImycx5Ezw88vWE/02kltpFS+AbcFGJF1nfMgmFyp62HB9PUeAqPe ssnax1NCX21z7pYTMw38a0cP8TaGlkGgJE9pC3QBqnMpNmfQLYtua+NZR2wIXPmWoRhp tOco9y0+J15UcgRVb6K0dVa5zS8SFvTjPleuJo41Oi3Fc+lQ4auhItmEdMTMqxh00vPo CuN53C/LGs5kuOJwUSkEQ1vG1q0tKMQyJZcMu7C507VDdBpuonPDbAAh71l7/1+EyLHz 9t/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=6i7lWOXyG+CjKIsvDANMg3UbJxfYFlWYT+4IlhMMm3A=; b=MfdzToDHDMAdIlb3vzepAbuYShcw99B4LE5nrAxnpkfYxY86XLaJePzyjZTJxL6ilD wmoaEeqMAgtphnD8huHwyqTdJsI1/r/bmkOVckj5fjUVjuoRDH6rXazlh8IgAePox0H8 0oBNkRWRWGRsTdFqAIzct07lJ5CrBVEWGK6bvkE+t7wLcx1QGTGU3l+QRlWnhQ6DJ9h1 sCaYePnaQqmxk5qqdCxK2hS9cyotoYnt7Rw/Q/MapbUotge2Bvac35YhFlEfpucpm9NL LaMi/n2EwT+rm4QT48ub4/chxps2SwQ3KqArIOv44xwcq0F0d09I5OyBd2ASJXIp8QVP qpVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=JlpoFqSJ; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id wr14si12143711ejb.11.2021.04.19.07.15.22; Mon, 19 Apr 2021 07:15:23 -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=@gmail.com header.s=20161025 header.b=JlpoFqSJ; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CC88D688178; Mon, 19 Apr 2021 17:11:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9249B688068 for ; Mon, 19 Apr 2021 17:11:46 +0300 (EEST) Received: by mail-qt1-f173.google.com with SMTP id d6so7851143qtx.13 for ; Mon, 19 Apr 2021 07:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=O/U4sFlZKBCNdIqrB0s4/dBUcS38a//AJptspK05+qA=; b=JlpoFqSJTIFJjeThge6G0tYiXYdMBNcXAiLu5P0erKBR2lKLg0e8BUsB5fNGfggkn/ z3z0He9wwhycL0zrvvdscqh9f9BTTm0bw7motJOmfLqwL82sqwre82HmgtOVRCCr68Lo V+86D/ijltCUwl0M+jabHF7Ld3PeP1EJ4jwWe8ioO5BEHjoUsjkPSaBMefUr6amcRYt8 Z9UJa5g9URDuhE1ih7XF1EDaANfQdDHnSyXUt2iPD5Y527ZtHlhyz7CerHLR66i4c6SJ 4PeMnIJkXlfipct78nuv0XtXYsQSiDmXODSO3fMUHvSI1rpBbxpo0DG2YhrxOIHlwYCf x0Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O/U4sFlZKBCNdIqrB0s4/dBUcS38a//AJptspK05+qA=; b=fg6YoFgps9a1TsdAf1I9t/3CFa3ODvf+9wpFj8JZlZNDuXChFZr2bK8oFJHC32N9Gv aQGMq8X419M4uCJCc4z7aNlHtM1JClKxwabTCSlmUpXcudaUEnubJlJMl/iF/KYsuOjx ZWvC/OadkqprhcKtX/BqCVZRQEpzCpK/FKLpcuAbmVm6DExSKGFuQEORFTKDuhG1Kwx6 fpmcgNzeNJwZ79FsWXAr4sSrVH2wJRf6P8TDyuMIxcObX/h/CvGLoOAuhF+h64iLqWic PizKn4TIC3yvFVec+Yw523WOTtGNnBmhUrgE9cMU4b5njKSoPxsHrRNEXFXOr/HganvI 7GNw== X-Gm-Message-State: AOAM530NdQitSNy1AjwpCmfa59IeSdOx1hvDUuCfoBucWTOqtr86SRo2 Q/UrysCtV30cI1dQNkKnlvrgzGD/ZCE= X-Received: by 2002:ac8:58c2:: with SMTP id u2mr11834275qta.209.1618841504704; Mon, 19 Apr 2021 07:11:44 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:44 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:33 -0300 Message-Id: <20210419141024.8174-37-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 36/87] avformat: Remove getters and setters 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ahPllZiR1+HX From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 48 ------------------------------------------ libavformat/utils.c | 18 ---------------- libavformat/version.h | 3 --- 3 files changed, 69 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 14063ac5e5..d629eaae5d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1086,17 +1086,6 @@ typedef struct AVStream { AVStreamInternal *internal; } AVStream; -#if FF_API_FORMAT_GET_SET -/** - * Accessors for some AVStream fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -attribute_deprecated -AVRational av_stream_get_r_frame_rate(const AVStream *s); -attribute_deprecated -void av_stream_set_r_frame_rate(AVStream *s, AVRational r); -#endif - struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); /** @@ -1807,43 +1796,6 @@ typedef struct AVFormatContext { int max_probe_packets; } AVFormatContext; -#if FF_API_FORMAT_GET_SET -/** - * Accessors for some AVFormatContext fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -attribute_deprecated -int av_format_get_probe_score(const AVFormatContext *s); -attribute_deprecated -AVCodec * av_format_get_video_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_video_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -AVCodec * av_format_get_audio_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_audio_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -AVCodec * av_format_get_data_codec(const AVFormatContext *s); -attribute_deprecated -void av_format_set_data_codec(AVFormatContext *s, AVCodec *c); -attribute_deprecated -int av_format_get_metadata_header_padding(const AVFormatContext *s); -attribute_deprecated -void av_format_set_metadata_header_padding(AVFormatContext *s, int c); -attribute_deprecated -void * av_format_get_opaque(const AVFormatContext *s); -attribute_deprecated -void av_format_set_opaque(AVFormatContext *s, void *opaque); -attribute_deprecated -av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s); -attribute_deprecated -void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback); -#endif - /** * This function will cause global side data to be injected in the next packet * of each stream as well as after any subsequent seek. diff --git a/libavformat/utils.c b/libavformat/utils.c index bb0351d7f5..3643a83632 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -113,17 +113,6 @@ static int64_t wrap_timestamp(const AVStream *st, int64_t timestamp) return timestamp; } -#if FF_API_FORMAT_GET_SET -MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec) -MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, data_codec) -MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding) -MAKE_ACCESSORS(AVFormatContext, format, void *, opaque) -MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb) -#endif - int64_t av_stream_get_end_pts(const AVStream *st) { if (st->internal->priv_pts) { @@ -221,13 +210,6 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st, return codec; } -#if FF_API_FORMAT_GET_SET -int av_format_get_probe_score(const AVFormatContext *s) -{ - return s->probe_score; -} -#endif - /* an arbitrarily chosen "sane" max packet size -- 50M */ #define SANE_CHUNK_SIZE (50000000) diff --git a/libavformat/version.h b/libavformat/version.h index e264abd77b..67dbff5c56 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -73,9 +73,6 @@ #ifndef FF_API_OLD_ROTATE_API #define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_FORMAT_GET_SET -#define FF_API_FORMAT_GET_SET (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OLD_AVIO_EOF_0 #define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27049 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp559058iob; Mon, 19 Apr 2021 07:15:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmagwnRRe7bTGXEfJ+nScglGvi5zcNjzi56KHXGaCOrbxv8zfGCAMKyoF+RSr7WkeVA5dV X-Received: by 2002:aa7:c391:: with SMTP id k17mr7930006edq.153.1618841733447; Mon, 19 Apr 2021 07:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841733; cv=none; d=google.com; s=arc-20160816; b=J0ski0SlGq/dcDMuh4+NQ5z95V95bibmKgrhYSR8OEX59RRww3CodXCWeB6XCirPGq BWfBtQ1O5V11u3HqE5XI/oks7531l23bDzQYI6u5UlB6zH7e3xARd1sd2FdqWHFjLC+M s31s5B7bqtiTCbZLOu2pnL6TXrKSJyM7n7JW9hXp7aGtrS/NryvP9jAK8egaSfXLxvTL 2KDS//lIY5lsP3yvlCGarnllrx5iHp8K6oEVT2TxF3Y6p3J4OgrrMiGm5vPmVJ+nPmzW z4YTUkuMah2O2xPXqJNMeRaUkz1gjMzaubpP7B1vP6oJzZ8jCd5hHtwxTVTdKatB829/ 5jqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=sRadedS1Io75lvTv+uCZ3PkRq/AgQ0uot6k8DUWH2DI=; b=Jx8DTpq1oqykVkl4cqgnp1GKR8SYNDZ7sF2mUOwv6P96HPNEAqe+p9u/hEnJ5zuuy6 9gAQasiFU/v1AsC5255bqx1VMK44WPyk8KXCC2/jVMO/mvNeuGtGBQje+Z0x6frMcth6 5zO4iruJEl/olBX508Pos/vHn3jfPu+YoGZB0e0bJGcrqZH+XDH/dpb6gAXCfZfpp+Cw Ls6h2YUSjAQYHQ8lxxYxXmD0KHtlJk5vzDmIc8gY0h1UZtT6IPFn38YzaWRIr/6oCKZQ kXgSbHYFh3C8k2s7vnv+XvMMBQ8WiEiMz8pOIFqAM1LMmqkY/xTUrl8RkqT/ioS/6V+R mFgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=irQnee7G; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g1si12018381ejw.615.2021.04.19.07.15.33; Mon, 19 Apr 2021 07: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=@gmail.com header.s=20161025 header.b=irQnee7G; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73EDD6881BB; Mon, 19 Apr 2021 17:11:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CEBCB687F17 for ; Mon, 19 Apr 2021 17:11:47 +0300 (EEST) Received: by mail-qv1-f50.google.com with SMTP id i9so16741450qvo.3 for ; Mon, 19 Apr 2021 07:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=iOGKooxSjnJEvy2E173i6JjXSyt17z0HUmWgs/OBkOA=; b=irQnee7Gc0sQqZJNp6h3pbKU4D+yZIY9WaDrUEntanpCzrfuUV5bwQEjc1mdBnmoFG ycDTsJeYgCC4QNL7vjw3wICmGPJQzk7IGJYuji9tIKC6d/Ay7xhcQx0z8QQBJmni1QaS V3PimB1fis3dW3xM/o2fSICThVoBYrONp26DsRCrCf2i7mbaOGSrra2A5UyGhdeQ1WOG 8TGzjy10R8UWoB5qMrW3DcSPCsesIjugS7qLO5kczx7nbfN2FZozlbUn1PlfjEj4spqO TO1lb0TDLpOQ1mBrtHs8uJXUQV+EwFrZNEqNcSpdLtEcgdy2xa8LL9/iI0Lr0hGnhptk vj/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iOGKooxSjnJEvy2E173i6JjXSyt17z0HUmWgs/OBkOA=; b=OR4G6CU8BHcDMwZHnFwoV+ETUCblKunJrlME/KzKcdgL4eciGiOZPrpFDPSDrIsmVL b+6VAf62Wug1Hhzy/fUlUK6YSwu0k7T8S/SoDJnNbQ1pkGD0YUsZtBAHw9Z4fYROygEl ufVDtg6lxtiFx6O/l8RZwNrskwVNFGlJYfX71R32MpCdlvqx/qHlUly3mi+wmCv8woh/ o2JZ1FS+MH325SNtwUNCpGUsna1LxYt059/iZlcHQ1o6/+ZrN4Uh0dbigJTYQR2Brwn5 /o3s4yB7wo9W+IVd3pYvdS+MoE9eUZL6fRCe8P7N0GO1A1Xy7/jBAU/DsYP1t+Wc1ULn ItnQ== X-Gm-Message-State: AOAM531zlgHHUqHnR2mYVmtt/nZH+XuZaruxu02GEvnUFP8OwvD0YceV wrKg6iSukFclhXK3bY5IjQkzpshinkc= X-Received: by 2002:ad4:4ee8:: with SMTP id dv8mr2746697qvb.46.1618841505873; Mon, 19 Apr 2021 07:11:45 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:45 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:34 -0300 Message-Id: <20210419141024.8174-38-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 37/87] avformat: Remove deprecated filename field from AVFormatContext 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: CRf03Mu9p9my From: Andreas Rheinhardt Deprecated in fa8308d3d4f27d6fb38ac2069887a7b259f1c6ab. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 13 ------------- libavformat/mux.c | 11 ----------- libavformat/utils.c | 10 ---------- libavformat/version.h | 3 --- 4 files changed, 37 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index d629eaae5d..d0cc12f931 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1255,19 +1255,6 @@ typedef struct AVFormatContext { */ AVStream **streams; -#if FF_API_FORMAT_FILENAME - /** - * input or output filename - * - * - demuxing: set by avformat_open_input() - * - muxing: may be set by the caller before avformat_write_header() - * - * @deprecated Use url instead. - */ - attribute_deprecated - char filename[1024]; -#endif - /** * input or output URL. Unlike the old filename field, this field has no * length restriction. diff --git a/libavformat/mux.c b/libavformat/mux.c index a05b55b53c..1c08c74b90 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -175,11 +175,6 @@ int avformat_alloc_output_context2(AVFormatContext **avctx, const AVOutputFormat s->priv_data = NULL; if (filename) { -#if FF_API_FORMAT_FILENAME -FF_DISABLE_DEPRECATION_WARNINGS - av_strlcpy(s->filename, filename, sizeof(s->filename)); -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (!(s->url = av_strdup(filename))) goto nomem; @@ -247,13 +242,7 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options) (ret = av_opt_set_dict2(s->priv_data, &tmp, AV_OPT_SEARCH_CHILDREN)) < 0) goto fail; -#if FF_API_FORMAT_FILENAME -FF_DISABLE_DEPRECATION_WARNINGS - if (!s->url && !(s->url = av_strdup(s->filename))) { -FF_ENABLE_DEPRECATION_WARNINGS -#else if (!s->url && !(s->url = av_strdup(""))) { -#endif ret = AVERROR(ENOMEM); goto fail; } diff --git a/libavformat/utils.c b/libavformat/utils.c index 3643a83632..d8b44ce896 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -547,11 +547,6 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, goto fail; } -#if FF_API_FORMAT_FILENAME -FF_DISABLE_DEPRECATION_WARNINGS - av_strlcpy(s->filename, filename ? filename : "", sizeof(s->filename)); -FF_ENABLE_DEPRECATION_WARNINGS -#endif if ((ret = init_input(s, filename, &tmp)) < 0) goto fail; s->probe_score = ret; @@ -5800,9 +5795,4 @@ void ff_format_set_url(AVFormatContext *s, char *url) av_assert0(url); av_freep(&s->url); s->url = url; -#if FF_API_FORMAT_FILENAME -FF_DISABLE_DEPRECATION_WARNINGS - av_strlcpy(s->filename, url, sizeof(s->filename)); -FF_ENABLE_DEPRECATION_WARNINGS -#endif } diff --git a/libavformat/version.h b/libavformat/version.h index 67dbff5c56..e0cf9e6f3e 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -76,9 +76,6 @@ #ifndef FF_API_OLD_AVIO_EOF_0 #define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_FORMAT_FILENAME -#define FF_API_FORMAT_FILENAME (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OLD_RTSP_OPTIONS #define FF_API_OLD_RTSP_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27037 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp559221iob; Mon, 19 Apr 2021 07:15:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLL5yZ6VpTuYCpn+ME3c1r+V3BmoFNiFb3CRkl7QdFU+1J+FVhGu6exp9Q8Ck2+VnC/LHL X-Received: by 2002:a17:906:b2cd:: with SMTP id cf13mr22883423ejb.419.1618841744584; Mon, 19 Apr 2021 07:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841744; cv=none; d=google.com; s=arc-20160816; b=Dv02mbZNK9bBSnBBy0VmEQU+Z1UojdijiFFMWEfmRmTs9QUK5gKnzranUuvs5K/9ks N92A5pwkenccvY3RwIPl/1PqWFGfg3FZr46mo+YMHLFqZ3rWAojNMJPnVu21IZ6wrOgk R8fAMILawzt6YUJ2M6x9G8U8F5s4Ux1XA48iFXtaiDz5wuwio7iJoLHU3TA+BUsp6UKM Qfr6nsLM0jEG0SbUUVtB0qu+fGFvMym3OG8ZQ6qcSA81fSAVQH5r7RELaulPIwaRfUkt 1euaOMT5bENtJtCOCtxrmlYLAnzfZzox8VSnYczG01oobyLnd3HK6b5aoIs2+eYCSI75 K0yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=i7jX+E7bxOXAcO9FODhMWWljMMyrQpxVve8Syw+2kB8=; b=pm2YiMBGmjvOHP7ovpBVU/QTWLOtOSPBFNGPsf96nbRO3sOZE2l3M5b91SitKLf1Xc /LBINR0mWWwMFmMrE0uePRKhRASMQuDyF5HvwJeURklEJTsNGUeDTYwUbwxkIN7JFLEM QleuKkDAMoCujyTkauhrclaSmhdLynQajyDyQu8bOpQf94QCJi14xKCJ7sZSZ+9+Yx7m gXM4Wg9PEoTwce27tgaPcl/veBvj5ARilh6kw/Tsp/RwPfcNysalVjfbU7DlQMGVP0T2 hEeBxsvfCGoUaT6fi6kXpRXRqZdKbUHndMytRDpaJyNlR1hh6Un4Rdm7mDVUKFQwszbt /3pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=QLSw9EcQ; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g23si12716196ejr.602.2021.04.19.07.15.43; Mon, 19 Apr 2021 07:15:44 -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=@gmail.com header.s=20161025 header.b=QLSw9EcQ; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 72D1B6881A8; Mon, 19 Apr 2021 17:11:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E279368812C for ; Mon, 19 Apr 2021 17:11:48 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id d19so134692qkk.12 for ; Mon, 19 Apr 2021 07:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uTBi2k9QzlI0oO58KR0kHXM1NsayT7MkO1ks1kQZAiI=; b=QLSw9EcQDLkfTNl2v/KK4IrEMoT/A4ngIgNAxrGCeVWFXIyE9aBFFoBeq17+XabPJX MNUCA65aPUwFr2WGEWJq5rLVcznU92VPvmT3DCKMpkG569oNAxOdUcJiokxDb52yI3ps D1ahs2Gu1NsMe2de2zhSL2iyRFDh8wTRnk9M+idUAqfNBY/fdL7zl2lt1e7prDIqdG6D IMFeUqdiP0mLJKiH2vrxYJxvnaVIt2IRHQQa6COZ1k0fVRYcEpwDPmtdZ1cWW+3fbtwL 6YRcN9+k4zzBpCwGpW85hms47KzylipyaVhOZaG1B6tk/h5WVTSBNne0q4agGvN61aOO G78A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uTBi2k9QzlI0oO58KR0kHXM1NsayT7MkO1ks1kQZAiI=; b=pX5rRrGrESm3gkEPBhBmNq+76RnELxO25abwgIFq8IHDX6TRwBYkA/Tz1xXfakld0i 9huBQ8U+pur7YPCMmR8DjdCZXrjMEO1BM0XJIkflAbRZyPuEaZWCPJYWwK5E2Wp+Z5mv IZarpN9YE/dUnHK11QBi436NxLAFZRXJc0W3NVdqkIAOUchmai7ULUYqhsIaXF0zSpXE SCrYDuWnE6MMs8uFA9MaI+KnhehRwT5XqwsqRpnwpYy2k5AjL7BtqnKsuzY49m89hx8K ytScLlQp/9eihrUUkx3CZ8gNE6AXG7aKo0uPeRVWM1L6lNBzeNXfWq1i18VDIkfh2lVd DgKQ== X-Gm-Message-State: AOAM531dTefI/Gly0KBjsSUqFHtcsL1f2PeqRiGjNFKDYxpjup8zHd5K MSaoRK++4TXuhBvEHAuJfwBaGTB5bUE= X-Received: by 2002:a37:2ec4:: with SMTP id u187mr12418147qkh.472.1618841507534; Mon, 19 Apr 2021 07:11:47 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:47 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:35 -0300 Message-Id: <20210419141024.8174-39-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 38/87] avformat/avformat: Remove outdated private fields 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: CO7uphVsiKgH From: Andreas Rheinhardt Affected function pointers (always NULL) in AVInputFormat, AVOutputFormat as well as private fields of AVStream. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 47 ------------------------------------------ 1 file changed, 47 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index d0cc12f931..093084221a 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -578,18 +578,6 @@ typedef struct AVOutputFormat { * @see avdevice_list_devices() for more details. */ int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); -#if LIBAVFORMAT_VERSION_MAJOR < 59 - /** - * Initialize device capabilities submodule. - * @see avdevice_capabilities_create() for more details. - */ - int (*create_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); - /** - * Free device capabilities submodule. - * @see avdevice_capabilities_free() for more details. - */ - int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); -#endif enum AVCodecID data_codec; /**< default data codec */ /** * Initialize format. May allocate data here, and set any AVFormatContext or @@ -755,19 +743,6 @@ typedef struct AVInputFormat { */ int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); -#if LIBAVFORMAT_VERSION_MAJOR < 59 - /** - * Initialize device capabilities submodule. - * @see avdevice_capabilities_create() for more details. - */ - int (*create_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); - - /** - * Free device capabilities submodule. - * @see avdevice_capabilities_free() for more details. - */ - int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); -#endif } AVInputFormat; /** * @} @@ -1021,11 +996,6 @@ typedef struct AVStream { ***************************************************************** */ -#if LIBAVFORMAT_VERSION_MAJOR < 59 - // kept for ABI compatibility only, do not access in any way - void *unused; -#endif - int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ // Timestamp generation support: @@ -1055,16 +1025,6 @@ typedef struct AVStream { enum AVStreamParseType need_parsing; struct AVCodecParserContext *parser; -#if LIBAVFORMAT_VERSION_MAJOR < 59 - // kept for ABI compatibility only, do not access in any way - void *unused7; - AVProbeData unused6; - int64_t unused5[16+1]; - void *unused2; - int unused3; - unsigned int unused4; -#endif - /** * Stream Identifier * This is the MPEG-TS stream identifier +1 @@ -1072,13 +1032,6 @@ typedef struct AVStream { */ int stream_identifier; -#if LIBAVFORMAT_VERSION_MAJOR < 59 - // kept for ABI compatibility only, do not access in any way - int unused8; - int unused9; - int unused10; -#endif - /** * An opaque field for libavformat internal usage. * Must not be accessed in any way by callers. From patchwork Mon Apr 19 14:09:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27029 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp559346iob; Mon, 19 Apr 2021 07:15:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz83gh0OZZdUK6UjGInt8s7FHfQ25OgPhMN0VOs+JrJtwv3Q2TYqpz6GSSXUuwKrubwf3Zq X-Received: by 2002:aa7:c5c2:: with SMTP id h2mr11969007eds.38.1618841754311; Mon, 19 Apr 2021 07:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841754; cv=none; d=google.com; s=arc-20160816; b=FuB0IKJZyGo1VBxTXGbRP3KOkd4XLin1pUVukkrB4Mk1WmrXdN3D+nUq28n4b2crnp kYwmeEWcCgisjiV1811p/hbgaNjKJlzu0zrsG+3Z2sraGVEVk1GRyF0rJRUL2bJcCz7/ zQyPDlWg/SskNEVp0UWYWPVJ38+nh7RDd4LZw8HoUL1rhczt6+BK5/8MARmJCb0pzRzS d/hqdoM/v0fMdev8esp/mJzFHdADuSye1Jbf5u0yxO6J0I+FgbY5T6vt+3vT8y//6Rjr Y5vaDBdzO3GH3t9QY6BqYWzJH1ZygcBgWF3AMDea4FGcPoWWS0gRlxa1HL1r0Kw1s32p w6KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=ebRwRm0oOhJmAxe6xM17HY5tqs1Ig5lHNOSDkWYy05Q=; b=0/P6yxx3TGsMIwz8PKV89wP7v0ursQGLJkTx3nNr3zoxzg/ckmjKdW+bAlUSGBVn8e A4Iqbp8SEy5hYF6VcLBXR9OeHKQin8MfSnDOP8Xw8f27hPcDnuGAN6fCCRLs4Vkt9S9N /lzLu8ER4zCeZFqCK5ZkSahkWO3r0bj0IjaXLgAdMq0BA0WcgO84vapntfJsX2VVevFd hURA6KG2PtVY4LiF2wU3zzO8iIUkdcDxEzArp4tsxeOSIIId8hq5P0Y79KDRo+DTH9Z9 KDnN+/KbCiMX0e3YDBiyXelGqc/Uko/Mev9AlUIQe2/1Gr/UVtFYSNbKJPn8yoMZTiO5 GOFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="ehd/xE0J"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gy25si12304306ejb.576.2021.04.19.07.15.54; Mon, 19 Apr 2021 07:15:54 -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=@gmail.com header.s=20161025 header.b="ehd/xE0J"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 76D9E688374; Mon, 19 Apr 2021 17:11:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F321C6880FE for ; Mon, 19 Apr 2021 17:11:49 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id i12so4319379qke.3 for ; Mon, 19 Apr 2021 07:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=omJQw6puLRcvIMBTDI3Ux1a74js99iaOX2kzH/tZLck=; b=ehd/xE0JgQqd99nxvAJTs2wo+a38PNRq6ShpYMo/HC4DityrwJ4xf+uCWvHQHgeLTX Gkmjf/76RwNSY7Lfp2Sl315insJb8v81L47i8+D8jkd5TUYn4yoUOUOfs3aUrVddi7Id HvXorAyIFSv2CFcjvvMzC3PH2+F7gRuWs/lHvPvfrKxuvRGXAb/MYuJaNEw1DZWBAY7d 1WVyU9oDJoWNHB7OJykOv0LpqsFVkjrnKBf+Tjyh33pqMVcXIa67OKceXbYekrW/9LW3 5Wdr6nC5v24YBjnwtHU69uVzigKRK5Q5t5QbYTE1RX82itXb4wirUKEsmq9cOZrTIpaA c6IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=omJQw6puLRcvIMBTDI3Ux1a74js99iaOX2kzH/tZLck=; b=oDm1lGf/3mg4JEaI22XFC+eXCkL36OzIbbUixAAW7pJYiDJEKUsQRF/skUQFpHOtI0 TnE3ojdLisyXypwbljVDTRKUmsMGBi4bWRmm6CMTeREFNwKwj/cYrif3XO1PuJsEc4oI 7iIBo0shpC+Wv+NC0DD2WHRcsvM6EsFX5vNsEfef8sxJ8bimVIQR7qWCAg3173gjUSw8 gRwqIv61LdVgO6EgwzjDJ+me8uXrId3RKnTCGLCovuQtCMvKzKcKS3Z4IyBLjz4vwF/z RN/TG9SByW2A/rrGJPE/VTGx0Zz8Tcyzx/ca8y7D3iPNOYUl9L56m//XJGy5JbYYslce MsCg== X-Gm-Message-State: AOAM533n9er7bqfeUjCMJ1rk+dzHtZqwioyd5hNfzIoQ9N6aF7vl/vUK 0J+eXNJo4NWPp6sGJOrW8zVpZeISoaM= X-Received: by 2002:a37:a6d2:: with SMTP id p201mr8254185qke.146.1618841508637; Mon, 19 Apr 2021 07:11:48 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:48 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:36 -0300 Message-Id: <20210419141024.8174-40-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 39/87] avformat/http: Remove deprecated "user-agent" option 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qG6ZgoVfzJcQ From: Andreas Rheinhardt Deprecated in 27714b462d1bff9e9b40fbdabb39f58e79032b81. Signed-off-by: Andreas Rheinhardt --- doc/protocols.texi | 3 --- libavformat/http.c | 3 --- libavformat/version.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index a6e46b99ad..2cc2b561de 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -406,9 +406,6 @@ Set the Referer header. Include 'Referer: URL' header in HTTP request. Override the User-Agent header. If not specified the protocol will use a string describing the libavformat build. ("Lavf/") -@item user-agent -This is a deprecated option, you can use user_agent instead it. - @item reconnect_at_eof If set then eof is treated like an error and causes reconnection, this is useful for live / endless streams. diff --git a/libavformat/http.c b/libavformat/http.c index fb2d9306bd..1fc95c768c 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -141,9 +141,6 @@ static const AVOption options[] = { { "content_type", "set a specific content type for the POST messages", OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, { "user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, { "referer", "override referer header", OFFSET(referer), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, -#if FF_API_HTTP_USER_AGENT - { "user-agent", "use the \"user_agent\" option instead", OFFSET(user_agent), AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D|AV_OPT_FLAG_DEPRECATED }, -#endif { "multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E }, { "post_data", "set custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D | E }, { "mime_type", "export the MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY }, diff --git a/libavformat/version.h b/libavformat/version.h index e0cf9e6f3e..39aa408fd6 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_HTTP_USER_AGENT -#define FF_API_HTTP_USER_AGENT (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_HLS_WRAP #define FF_API_HLS_WRAP (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27043 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp559671iob; Mon, 19 Apr 2021 07:16:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjr34lsZhYJudQFmjsw+dxNWMMRMiTn/fLrHPI5/xAqQxvkJT0yLPSrjuI/R8xBTZ1IZ+z X-Received: by 2002:a17:906:29cf:: with SMTP id y15mr21886329eje.500.1618841768721; Mon, 19 Apr 2021 07:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841766; cv=none; d=google.com; s=arc-20160816; b=LTFXUPzjxN+66uGXSuj88K6mA1/JlV3ZRhZxy/9UMHWLVhAVzWdh4cjqeagnVgOlYp kE48Q6MocfECqZeLy1QDfL7mpvXHLFY1KkLqrWgfA2hz96mvWGGzUk/nifR4tDr5+9NH 2lqbQH35y3n8vle17OC57x+rpy7VxPOI8UMWuj86aNp+XnKFvisPccdfKrf9jd6p3owD OrLcOuPxcn7YGJ5YmAQaetn52gVdS0e208MX7muy5OyjO4ZqogJuesxn6mdkWpibITo2 ICkf9EIYjRivt5aids92wq6+A61Xn1tKOLUKRIy1aPD630vRm+1irh1XDyzJAdUZb8PF eolw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=VPIkbRzzzLzmjLl3awBOzi98EdKegAI4aUczUh2tZyo=; b=RybnLea8o1CaKUMS9ZeAXSKvVgSVGp/SaOXAdjDFha1l29e9y06QX/wn0Dqau+7GN+ oW+TDQyd2p+W3mJ3eCz4Z1rjISYkQFcLoew/iWIUHlEVItmlASEhCkueTjYoumlQ0EpX fY0t0cseMUdLC+8ANVrDusDN6+LLMByFjeS+NYPy9UC+HzS23Fyr770mp1yd7e6tc6db I5+7EjQy2RCg7Osl5qnqDfoJqyhf26vdiEgvKes/VFzfj5AkoVudMHJN4A/8mG+jUafO jQ4RlGMlLPs0SClsVGss+1HHcEng1cda4+0t3XtxO5KhAJR9aClbBvS5Lq//2fdvuj9L Y4aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Aj9zGEeX; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t20si3004774edq.484.2021.04.19.07.16.06; Mon, 19 Apr 2021 07:16: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=@gmail.com header.s=20161025 header.b=Aj9zGEeX; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9277D68924E; Mon, 19 Apr 2021 17:11:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B77F66881B5 for ; Mon, 19 Apr 2021 17:11:51 +0300 (EEST) Received: by mail-qt1-f172.google.com with SMTP id h7so26144284qtx.3 for ; Mon, 19 Apr 2021 07:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=DDnIxYoMH63Ybw+87mr26idkXq8H9zx8Lwmdvde8c1A=; b=Aj9zGEeXmpc/sl321PLPOVQPwknZXb4GclZPaSEJmwpXczweTJh0raO+Q15dnDxr7w tSwkrP0cRbupnRs+lF2/IKcr4VPho+9wtel6VXjll/tpZ8aWB9Se4iPJ0DUCdl9Dprmm r/e701VNK0EdODVqPvFrmdVMqEzxVeWbwOuguZlpW86FkDD4X1kzwIZouLNIvY+/7oR7 IlxFjnUErJ7NvSk7GVlDBrMOMWiwEMw7yBMpuQNbjU8DDvLGPPTlLhXGGk646gS6n6jk 0kgTvsYvolcNgMgyXXPFt2stvpF1Gz6ivmiL8BoHYhYv3vBVFYo/rhJnDg37z5fjWI4O CTZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DDnIxYoMH63Ybw+87mr26idkXq8H9zx8Lwmdvde8c1A=; b=QNxLtHsksbQbPWPcqqG6wRO55RkXUR5ftljZJcmsghxmoy+uJTqccDIFC3LbzyPXfv noKkG0GiZ6uQbfJRWrHBDH8jC2THqvvphyYTWcHKqmospSfo0WBTIIr50U6MhOVAYybh BMEj8Imyz1u0ELneOk1JbF/kHciBvNcT9IGBg74bFt3fYmP3oIMDdp9Tk279zmk7GbDs jzR/xY4PmWPOXvFpOHuxAu0Okuo73DbUorpu0gM8vL9VHjg0GU1hsYzj66WHd1FIIfwT K1bRc1l09kcUpDu4BuH20LQfCfjDQvQxed0ow4iP1ekUHiC82eBEfzOoBe44mcciX4ra BMTg== X-Gm-Message-State: AOAM531+/K8nGTHi0Ut1WIUzK48y9b274PMCEBNnmg6NUtGtJwClud87 RRVMrGLDxZ+aqwbZtvaEw1VuCi7wV58= X-Received: by 2002:aed:2042:: with SMTP id 60mr12062257qta.340.1618841510256; Mon, 19 Apr 2021 07:11:50 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:49 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:37 -0300 Message-Id: <20210419141024.8174-41-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 40/87] avformat/hlsenc: Remove deprecated wrap option 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 5n1bfqrTQ59Y From: Andreas Rheinhardt Deprecated in d96ebc5ef88024869de06bcf92b2ad99b01d47e3. Signed-off-by: Andreas Rheinhardt --- doc/muxers.texi | 9 --------- libavformat/hlsenc.c | 26 -------------------------- libavformat/version.h | 3 --- 3 files changed, 38 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 93f79274b6..fb5fde05af 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -748,15 +748,6 @@ Set output format options using a :-separated list of key=value parameters. Values containing @code{:} special characters must be escaped. -@item hls_wrap @var{wrap} -This is a deprecated option, you can use @code{hls_list_size} -and @code{hls_flags delete_segments} instead it - -This option is useful to avoid to fill the disk with many segment -files, and limits the maximum number of segment files written to disk -to @var{wrap}. - - @item hls_start_number_source Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source. Unless @code{hls_flags single_file} is set, it also specifies source of starting sequence numbers of diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 9a848b6470..3b9f61d2cb 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -200,9 +200,6 @@ typedef struct HLSContext { int64_t init_time; // Set by a private option. int max_nb_segments; // Set by a private option. int hls_delete_threshold; // Set by a private option. -#if FF_API_HLS_WRAP - int wrap; // Set by a private option. -#endif uint32_t flags; // enum HLSFlags uint32_t pl_type; // enum PlaylistType char *segment_filename; @@ -1063,11 +1060,7 @@ static int sls_flag_use_localtime_filename(AVFormatContext *oc, HLSContext *c, V if (c->flags & HLS_SECOND_LEVEL_SEGMENT_INDEX) { char *filename = NULL; if (replace_int_data_in_filename(&filename, -#if FF_API_HLS_WRAP - oc->url, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) { -#else oc->url, 'd', vs->sequence) < 1) { -#endif av_log(c, AV_LOG_ERROR, "Invalid second level segment filename template '%s', " "you can try to remove second_level_segment_index flag\n", oc->url); @@ -1177,11 +1170,7 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, vs->initial_prog_date_time += en->duration; vs->segments = en->next; if (en && hls->flags & HLS_DELETE_SEGMENTS && -#if FF_API_HLS_WRAP - !(hls->flags & HLS_SINGLE_FILE || hls->wrap)) { -#else !(hls->flags & HLS_SINGLE_FILE)) { -#endif en->next = vs->old_segments; vs->old_segments = en; if ((ret = hls_delete_old_segments(s, hls, vs)) < 0) @@ -1702,11 +1691,7 @@ static int hls_start(AVFormatContext *s, VariantStream *vs) } else if (c->max_seg_size > 0) { char *filename = NULL; if (replace_int_data_in_filename(&filename, -#if FF_API_HLS_WRAP - vs->basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) { -#else vs->basename, 'd', vs->sequence) < 1) { -#endif av_freep(&filename); av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s', you can try to use -strftime 1 with it\n", vs->basename); return AVERROR(EINVAL); @@ -1745,11 +1730,7 @@ static int hls_start(AVFormatContext *s, VariantStream *vs) } else { char *filename = NULL; if (replace_int_data_in_filename(&filename, -#if FF_API_HLS_WRAP - vs->basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) { -#else vs->basename, 'd', vs->sequence) < 1) { -#endif av_freep(&filename); av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s' you can try to use -strftime 1 with it\n", vs->basename); return AVERROR(EINVAL); @@ -1759,11 +1740,7 @@ static int hls_start(AVFormatContext *s, VariantStream *vs) if (vs->vtt_basename) { char *filename = NULL; if (replace_int_data_in_filename(&filename, -#if FF_API_HLS_WRAP - vs->vtt_basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) { -#else vs->vtt_basename, 'd', vs->sequence) < 1) { -#endif av_freep(&filename); av_log(vtt_oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", vs->vtt_basename); return AVERROR(EINVAL); @@ -3120,9 +3097,6 @@ static const AVOption options[] = { {"hls_delete_threshold", "set number of unreferenced segments to keep before deleting", OFFSET(hls_delete_threshold), AV_OPT_TYPE_INT, {.i64 = 1}, 1, INT_MAX, E}, {"hls_ts_options","set hls mpegts list of options for the container format used for hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, E}, {"hls_vtt_options","set hls vtt list of options for the container format used for hls", OFFSET(vtt_format_options_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, -#if FF_API_HLS_WRAP - {"hls_wrap", "set number after which the index wraps (will be deprecated)", OFFSET(wrap), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E}, -#endif {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E}, {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, {"hls_segment_filename", "filename template for segment files", OFFSET(segment_filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, diff --git a/libavformat/version.h b/libavformat/version.h index 39aa408fd6..7f04b92d37 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_HLS_WRAP -#define FF_API_HLS_WRAP (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_HLS_USE_LOCALTIME #define FF_API_HLS_USE_LOCALTIME (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27033 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp559693iob; Mon, 19 Apr 2021 07:16:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP/pwxeF3WwlvnbtJ96+EpdZtPpr2+wF2DMHuOOouYD/ZUi5k1O85i/XSIf82IkBebf2Eb X-Received: by 2002:aa7:d5da:: with SMTP id d26mr26660929eds.379.1618841778400; Mon, 19 Apr 2021 07:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841778; cv=none; d=google.com; s=arc-20160816; b=gLM6bEs7cWl8EgkAGMBU/vKZSgYWBEo04alaKJPRMfgSeK3tCwNrHUqzS857wOPPxf /RUudG+IUUt9Jr6u/quGLc7ieXsRbXog6xYB/Opo24Nyvn/bgOWqCfvXrvcEFKtlvKfO pZJVLgD8cJRObff9RbeOdbk5Aspgg6xnarHO4d/2tkNMM71UqEVGnE61auBjxuADOGZa tyw0z0vnY93HVgl6ixW2Br1eFdEQs4jtEXTgPauaQM06Ja82+CwX7yEITregNGMIzun4 CrKn1q3vqzB2yvy5V6J3fvOpXLs4hn0hfngdCmZRuMADYuD6iqyLqLFog5UfE58vFl2m GXxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=ES/kf70e+w0jYDG3Xo3idMjZ6satgFoHZDx+fB/C9HQ=; b=jW2VVqvXEHxZkgd2s75JUzkFQ+njGWtVAVbBGQv4i/WX4G0127r+8O1IWJqxj392jD IkVdPGhyCIEfswbZkC/RWQPGsJaeQV+ym+6h2EnQNFYe+o2i1i3fZnjTnERzdP2/OBTa CgB7D6n+yb3o461paGGNKMhBTh5BWXiUcgUb6INDZsJJrOs1w7yV2t8bcmDw5rD2YyDG SH2X4wmYYfO9ikSbFI5ev9brsF8eJeEKwrne3yCiaCE5boRZE3E6DFpFdlaohw0IadMb G8hwtcNuEn8ZNrZrNuhtfTQCqBg5dqi3hc0ZTNwZidTwwQEm/51rb8BJmyP61oxtEjvO YzIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=J5U3hDM8; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k23si5639089edx.591.2021.04.19.07.16.17; Mon, 19 Apr 2021 07:16: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=@gmail.com header.s=20161025 header.b=J5U3hDM8; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73B6B689753; Mon, 19 Apr 2021 17:11:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F15106881C2 for ; Mon, 19 Apr 2021 17:11:52 +0300 (EEST) Received: by mail-qv1-f42.google.com with SMTP id i11so11394780qvu.10 for ; Mon, 19 Apr 2021 07:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=q0NAFRK4CkzaePvnHqahb3uoJS1MH50b98gVbepoJX8=; b=J5U3hDM8TRCHlrivxPv+AhJ9ESI2cKOHN/GhXlZqXGkGKIacw8iWSTYlP5DeSk+8P0 uLa1F2LOwipH5y7Njna61g5f9ui+/qRNZ7sK89Bq02nSycOaTs/E/rS/poUvY0LIelb0 9hHPS+CAdJVk2fUjneJxEW22oKupmVnhYuhKS7oEC3wlacaG+gOSDdiB6Nh3dXtC8KMz 3zm54Ps7l44d2GIRTEzXpwLzfAYSY29dEzI8IteQTch66RXhv0EWg0NAwtc8u5ekL9dg XkL+iTSPn85H7LxczUoLDG2WuT4RNeu4SlTDg0tWi3bSZRha3tK1XlXb2Wjm4Btuw/C0 o71Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q0NAFRK4CkzaePvnHqahb3uoJS1MH50b98gVbepoJX8=; b=iQDtIozREEVTpiXiO1gbnxYRyHHiuvhi43UaGw34Q9P130AywwFeNfzp9QWMI174ME 4xGtkNr5WAB8Zya1FTlMGoRKA/JfE3Peb4RyAEWW9gd2K2QPJwWgRBXDULk9ZaDmFJCS Jg++6mQ6tk5oGDofxMOFNj5JJqwAkNm2Bbo/IMIXKEzyWjNZ3V7R8rm6L0q6QlCL3B+7 pBCijNzaaGrbkDhInSNyp9tA+6zF5/7j5jlwnfyXKbYGX4cC4/obcARSngIT86vFTt8z xY3bNCERYekybzwGbjQfHiVGTOf5dGc1jlGJO1MZYaSIOgERfKNOYRGIMSNI5d5HKEK5 auCQ== X-Gm-Message-State: AOAM530bDvddi8u7/yJvn1vsKIN27H8tyig9Evh2uLGS6FgwHp1F5Nq9 B8Nc1smn8/SaFD3MEWHK4cXZ3EAkCH8= X-Received: by 2002:a05:6214:1381:: with SMTP id g1mr22077231qvz.21.1618841511391; Mon, 19 Apr 2021 07:11:51 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:51 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:38 -0300 Message-Id: <20210419141024.8174-42-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 41/87] avformat/hlsenc: Remove deprecated localtime options 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: jKUG2JwGMEHQ From: Andreas Rheinhardt Deprecated in fbd8746efabe441469eb410d2ffa6af64987ca80. Signed-off-by: Andreas Rheinhardt --- doc/muxers.texi | 6 ------ libavformat/hlsenc.c | 6 ------ libavformat/version.h | 3 --- 3 files changed, 15 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index fb5fde05af..29f1d3aee4 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -833,9 +833,6 @@ This example will produce the playlists segment file sets: @file{vs0/file_000.ts}, @file{vs0/file_001.ts}, @file{vs0/file_002.ts}, etc. and @file{vs1/file_000.ts}, @file{vs1/file_001.ts}, @file{vs1/file_002.ts}, etc. -@item use_localtime -Same as strftime option, will be deprecated. - @item strftime Use strftime() on @var{filename} to expand the segment filename with localtime. The segment number is also available in this mode, but to use it, you need to specify second_level_segment_index @@ -853,9 +850,6 @@ ffmpeg -i in.nut -strftime 1 -hls_flags second_level_segment_index -hls_segment_ This example will produce the playlist, @file{out.m3u8}, and segment files: @file{file-20160215-0001.ts}, @file{file-20160215-0002.ts}, etc. -@item use_localtime_mkdir -Same as strftime_mkdir option, will be deprecated . - @item strftime_mkdir Used together with -strftime_mkdir, it will create all subdirectories which is expanded in @var{filename}. diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 3b9f61d2cb..6e7d6d554b 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3128,13 +3128,7 @@ static const AVOption options[] = { {"periodic_rekey", "reload keyinfo file periodically for re-keying", 0, AV_OPT_TYPE_CONST, {.i64 = HLS_PERIODIC_REKEY }, 0, UINT_MAX, E, "flags"}, {"independent_segments", "add EXT-X-INDEPENDENT-SEGMENTS, whenever applicable", 0, AV_OPT_TYPE_CONST, { .i64 = HLS_INDEPENDENT_SEGMENTS }, 0, UINT_MAX, E, "flags"}, {"iframes_only", "add EXT-X-I-FRAMES-ONLY, whenever applicable", 0, AV_OPT_TYPE_CONST, { .i64 = HLS_I_FRAMES_ONLY }, 0, UINT_MAX, E, "flags"}, -#if FF_API_HLS_USE_LOCALTIME - {"use_localtime", "set filename expansion with strftime at segment creation(will be deprecated)", OFFSET(use_localtime), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E }, -#endif {"strftime", "set filename expansion with strftime at segment creation", OFFSET(use_localtime), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E }, -#if FF_API_HLS_USE_LOCALTIME - {"use_localtime_mkdir", "create last directory component in strftime-generated filename(will be deprecated)", OFFSET(use_localtime_mkdir), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E }, -#endif {"strftime_mkdir", "create last directory component in strftime-generated filename", OFFSET(use_localtime_mkdir), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E }, {"hls_playlist_type", "set the HLS playlist type", OFFSET(pl_type), AV_OPT_TYPE_INT, {.i64 = PLAYLIST_TYPE_NONE }, 0, PLAYLIST_TYPE_NB-1, E, "pl_type" }, {"event", "EVENT playlist", 0, AV_OPT_TYPE_CONST, {.i64 = PLAYLIST_TYPE_EVENT }, INT_MIN, INT_MAX, E, "pl_type" }, diff --git a/libavformat/version.h b/libavformat/version.h index 7f04b92d37..ab103f410c 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_HLS_USE_LOCALTIME -#define FF_API_HLS_USE_LOCALTIME (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_LAVF_KEEPSIDE_FLAG #define FF_API_LAVF_KEEPSIDE_FLAG (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27032 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp559870iob; Mon, 19 Apr 2021 07:16:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyiAQhIlEx8/2aKKxvzwwf8G/ndhnWCFirTPt99lJo3Z4EHrWR6481ClGMBC9nlYd/Ofce X-Received: by 2002:a17:906:265b:: with SMTP id i27mr22340634ejc.450.1618841790882; Mon, 19 Apr 2021 07:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841790; cv=none; d=google.com; s=arc-20160816; b=BdtQosT3vTYKvnZljFpe8V2qzRq6np9o19ivy4h/CDTbx2B2RZqVU4gKrWmH53BOMi MmuELnmx/Tlb/n4NUDFJP2HpqCqGRqUeE/tdVU7XOc2H/mVj3/4u6hyNj208Uccf4IQF eIDWkD3F9uFU30B8tsfngGa3TiJT+09zJITVHCt+df3eCQ7dE4X4Q8mSLV75/cASFJcM 2zbNXE2Ch7epClzuEheOl0EHzJZpj7AJ0RyZzJ0gy6YTB9SA8WLbRdpT848AaB8yJwNx vr6AC3LxAWWfhJ7O4qKk2BiiOnL2CLUF7Ku2xy51nKVrjaL1GUMcC6SweJlrxbupIYQD 46WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=3hwFJPvFg6O+Me27qI8pN3qyXavv/8QoKiKVpJLR0Vs=; b=rdAoAHmSTlA42RVbgPQpZ10Wd/zutvYclXv95LhrMyfxeROAqWjuMw0LfgZrIMxAxE PQn9Gwoy/Qnl6b+LVsWwV4anu4rc3G214K5O6DCH7V0pCHwQJPSWmUM98JQCK2Vz+VQa XV2BdUTGv2PqQnyiPBbhGGQ9qHvp8FANFjRnaCC6veJgjFuCqhci06aYCxIAFgM9M8Co fSuC5QSVe83XCix+UXG6cPbN+KQLGdEOjGxlaMsCMo2J5Tgb2oON/mh69jhSuuSNmpKd EZ+ijV5S2DXvq99L+cN01JOiTjzqeY0J2TjyhECZVMgJ5+MkWUZ4kBTVS9quPwUxNLRE RhNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=rzVzCLPM; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v18si12346657ejy.223.2021.04.19.07.16.30; Mon, 19 Apr 2021 07:16: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=@gmail.com header.s=20161025 header.b=rzVzCLPM; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 69B32689730; Mon, 19 Apr 2021 17:11:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 184326882E9 for ; Mon, 19 Apr 2021 17:11:55 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id o5so35881125qkb.0 for ; Mon, 19 Apr 2021 07:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7TuQUAsBKmh8wc7+E20lxtuEhZR+Vgetcm5HNj4DZgw=; b=rzVzCLPMK/EouKS4yeLGWzlSNfTYiofEEUaoV1OurSSqTKyK8Z9TR9kuMHKmww5Hri IeaCFydgG/dlWnunlZaIuJJjqTLQsXVO1ISylle9tsCIFildmNXCNkvsSy2uWdAOhzXY 8Df2ou829ySaIJKE8XzMnA1v9o5dkn6HvoYHQgN7owJkFN8zPB5GBF80WvxykGmQ45ea L4CQz9Tt2EI4p2HpvFoQ6lbwIvlofBdotEjWu6tYm1o377EO+KbF0DPzFp8OCqNTt4Fg dTnUYCsaj+cY9ukuV946+C5T1oyjZVA/MrdxUX4YTuxb2gFf1Rz7owFbOZEpOsBESB2l gIJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7TuQUAsBKmh8wc7+E20lxtuEhZR+Vgetcm5HNj4DZgw=; b=sfV1CJr+ooWOILefWDuQQesWzmJ3X5jbEV2JURBxcgXjGSCqBpcT3Jqhji8BIZ+7T7 ApzJSFTESNdWCiRyWzRqoJDzzQEUuLFaXGs55zSEgaVSXn2WJrYAd2W3Wtzb/00gTHk+ K+uJ/ul0nRBWaK37tMDFT0JQSyERLxLhXiwKkrM9fIPqcRsp3twfsWaRZVWL1OfixEDW tO+VKQ170yUnWSxXHUCOm5sV+kCKCw+mGeiY46PsgIsaGfQofrJldBPkRePrXqL3S8O5 obaIhERLRT6cJ5PRU/oY4QNk/5okcjGQrAeLV3B3LMnibdETnZ5xe6HRLOm3/3U1P4gA f7ew== X-Gm-Message-State: AOAM531399G6ruYzxz8+BLkSisMJuJv+IOp040NZYnZZL5oVveELssjm SlBiQxGaFiqcvPVWQg18L4imBNrivtw= X-Received: by 2002:a05:620a:1093:: with SMTP id g19mr12412488qkk.112.1618841512550; Mon, 19 Apr 2021 07:11:52 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:52 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:39 -0300 Message-Id: <20210419141024.8174-43-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 42/87] avformat: Remove remnants of side data merging 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 2f4AGyDXx19u From: Andreas Rheinhardt Deprecated in d682ae70b4b3a53fb73ec30281f9f4cfbc531edd, ineffective since ca4df37f06f8a47651c67693b4851ed8d7e3ef74. Signed-off-by: Andreas Rheinhardt --- doc/formats.texi | 1 - libavformat/avformat.h | 3 --- libavformat/options_table.h | 3 --- libavformat/version.h | 3 --- 4 files changed, 10 deletions(-) diff --git a/doc/formats.texi b/doc/formats.texi index fc80ce1d2b..9387f98b6a 100644 --- a/doc/formats.texi +++ b/doc/formats.texi @@ -49,7 +49,6 @@ Generate missing PTS if DTS is present. Ignore DTS if PTS is set. Inert when nofillin is set. @item ignidx Ignore index. -@item keepside (@emph{deprecated},@emph{inert}) @item nobuffer Reduce the latency introduced by buffering during initial input streams analysis. @item nofillin diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 093084221a..6c12621bbb 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1281,9 +1281,6 @@ typedef struct AVFormatContext { #if FF_API_LAVF_PRIV_OPT #define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, will do nothing once av_demuxer_open() is removed) #endif -#if FF_API_LAVF_KEEPSIDE_FLAG -#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Deprecated, does nothing. -#endif #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats #define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. #define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer diff --git a/libavformat/options_table.h b/libavformat/options_table.h index b4141564c8..d041ffb641 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -48,9 +48,6 @@ static const AVOption avformat_options[] = { {"igndts", "ignore dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_IGNDTS }, INT_MIN, INT_MAX, D, "fflags"}, {"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"}, {"sortdts", "try to interleave outputted packets by dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"}, -#if FF_API_LAVF_KEEPSIDE_FLAG -{"keepside", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"}, -#endif {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, "fflags"}, #if FF_API_LAVF_MP4A_LATM {"latm", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"}, diff --git a/libavformat/version.h b/libavformat/version.h index ab103f410c..7108482624 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_LAVF_KEEPSIDE_FLAG -#define FF_API_LAVF_KEEPSIDE_FLAG (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OLD_ROTATE_API #define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27044 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560036iob; Mon, 19 Apr 2021 07:16:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy64hj4rgN7n9LCCfj68y6OOjRRLnBs9gHM/V8SL5pRAOsEjnHhrBNHlO1kLc/8M8E0bhxF X-Received: by 2002:a17:906:7d82:: with SMTP id v2mr22684483ejo.524.1618841803142; Mon, 19 Apr 2021 07:16:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841803; cv=none; d=google.com; s=arc-20160816; b=sJI+u/LuY6Z9CtY/uajPJ0FlHFj+lljCPZOuFdtSCQhgzUvAbmBeCYKm7F78y0fPI6 g2iRFS+nA3U6SJhb4DUWIxDa0oFAIyhiMijBPYoFtoOd3abjYdzPanxYM0Wuwko1hnkV Lrw1FU8pdv63Knpaj3W9TYeoGgvR4UV+N78BdAGK8T8ifb26k7oEirBd4RpqqaNgEcah 7hTz775+2TSOELl5uRK0YJ2/v20FdPOzxjzkaQwhR/JqzwfE6yAvP1Juk9BaUO5NIO8B d8EK7VQXeGljk7NtXMAV6ROWv5eopnVXpwZ9O95emlbLUQJqEH9ft5pjL0yvmhHb/Rgi jaIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=USMix0pAUuyxoAxG5ZlauzivE4xcjuVHGdYP7CcYIpY=; b=ZtMofmpfcNQReZ6n/DGxKf3Z5mtLCuO0i5n3LA3hrvQ8NhRSedMG5RnGu62XG5zu6e AUKVIcJztoy5qZjJr+IN874vldTS7+we4ZjVbBSjf/W0Xzo9GSZ7Z0quaT0vg8BmWllW USQVI7ttxF6omW+wncKLW32zdfPC8nCv+XMSV9Vi/j7ZjlUqSs5dg2g55yEWcDwKSX5c qbzyk8vv/PNnADlbikgEHhuyRcyUtsk3rdwebyXfjhcZzkgGXS3xU3A+mZhmy68v3Scg QO+2cUwLaadJigfmlW60Yra/Xu2wp6/68Jn7w03NqRRwDnyy0g/fVZyubkRdk61sVjlG MSmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=qJiC3+XB; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id zm17si13284426ejb.350.2021.04.19.07.16.42; Mon, 19 Apr 2021 07:16: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=@gmail.com header.s=20161025 header.b=qJiC3+XB; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6C9F0689829; Mon, 19 Apr 2021 17:12:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 366C26882E9 for ; Mon, 19 Apr 2021 17:11:55 +0300 (EEST) Received: by mail-qk1-f177.google.com with SMTP id t17so7380961qkg.4 for ; Mon, 19 Apr 2021 07:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=US8Ib/j20S5jUy/2CnFqlFI3X6lB8HOM2GfiQD77LYk=; b=qJiC3+XB7wGhc/f00KnRMA33F5p+o562PkL1EQGRS/Uup4jT/r3UgTgrNTSQCIuGlj 2lSK5ZN77X1HBPOm3SkVhmNwUjYKVLMncsDRCcPrfOuHwhn77u3/g8gtYv/qR8JIoNcE 8Uw5uR0WTcCLH+DFVj2veBgDgSBHHognNHI7PGeYo2F/TKuNIdQJCCKuD5VOBuR33eu1 3BRqfKqPyqkMe2aOjmEXVHWAB/ZnbOEiZhh2flJsQUMY+yMnn2xzsHq+qC/MmbZfOVOz Z494BqYboNXcj9818fl7GuncoqB4YE7cpg6VI9FD9CN6+mnsL6J0IGwx9ZlA7AspsZzd ugag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=US8Ib/j20S5jUy/2CnFqlFI3X6lB8HOM2GfiQD77LYk=; b=N77F55i+M3yeh8PTMhaL6y74yP47xTat9/I8KZdYdHGay50o4MiLVWArkB3KGVpXIJ JTK88qsWgIXtWn3BhDuYgqQWW+sqxLRIMWo6qG/cQq49MjTb16KD/8d8+JD2NFQkW286 Eb2yoodibilIl9rE2dN1/dghCeZBb0A6FZq1VbaYdppvvcutR8KZIrL9QvtHls1M3cpQ /vD5I8+dg2yggoC6UUW9GGZjXd7wyYWBGJa5xtwng98ShvziVdm2uCzXJyx0DOYZzl1h R7sHitch8kQUNxCJJ8MzC3HTeEp01pT0M+UwXjN18s0TeZQmyC2p3jSVjKOCpMzzV17d sYYQ== X-Gm-Message-State: AOAM5305bW+1REh6VMVfIoXtL6p2AsXa6MCHiz214d0LKfmBGLIVdslt vgRUO0wNVLCdkink7Hikr8nyBpgkiko= X-Received: by 2002:a37:2ec4:: with SMTP id u187mr12418639qkh.472.1618841513665; Mon, 19 Apr 2021 07:11:53 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:53 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:40 -0300 Message-Id: <20210419141024.8174-44-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 43/87] avformat/mov, movenc: Enc exporting rotation via metadata 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DkDvhZQwuSmR From: Andreas Rheinhardt Deprecated in ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b. (The reference file of the mov-zombie test needed to be updated, because a rotate metadata tag is no longer exported; the side-data is of course still present.) Signed-off-by: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavformat/mov.c | 14 -------------- libavformat/movenc.c | 15 --------------- libavformat/version.h | 3 --- tests/ref/fate/mov-zombie | 2 +- 4 files changed, 1 insertion(+), 33 deletions(-) ons=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:vendor_id=appl|tag:encoder=H.264 side_data|side_data_type=Display Matrix|displaymatrix=\n00000000: 131072 0 0\n00000001: 0 65536 0\n00000002: 0 0 1073741824\n|rotation=0 diff --git a/libavformat/mov.c b/libavformat/mov.c index 9ca1ac89a8..8b3371abe6 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4582,8 +4582,6 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) // save the matrix when it is not the default identity if (!IS_MATRIX_IDENT(res_display_matrix)) { - double rotate; - av_freep(&sc->display_matrix); sc->display_matrix = av_malloc(sizeof(int32_t) * 9); if (!sc->display_matrix) @@ -4592,18 +4590,6 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) sc->display_matrix[i * 3 + j] = res_display_matrix[i][j]; - -#if FF_API_OLD_ROTATE_API - rotate = av_display_rotation_get(sc->display_matrix); - if (!isnan(rotate)) { - char rotate_buf[64]; - rotate = -rotate; - if (rotate < 0) // for backward compatibility - rotate += 360; - snprintf(rotate_buf, sizeof(rotate_buf), "%g", rotate); - av_dict_set(&st->metadata, "rotate", rotate_buf, 0); - } -#endif } // transform the display width/height according to the matrix diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 8e6ed817d8..b15ecbe713 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3043,7 +3043,6 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov, AV_ROUND_UP); int version = duration < INT32_MAX ? 0 : 1; int flags = MOV_TKHD_FLAG_IN_MOVIE; - int rotation = 0; int group = 0; uint32_t *display_matrix = NULL; @@ -3100,23 +3099,9 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov, avio_wb16(pb, 0); /* reserved */ /* Matrix structure */ -#if FF_API_OLD_ROTATE_API - if (st && st->metadata) { - AVDictionaryEntry *rot = av_dict_get(st->metadata, "rotate", NULL, 0); - rotation = (rot && rot->value) ? atoi(rot->value) : 0; - } -#endif if (display_matrix) { for (i = 0; i < 9; i++) avio_wb32(pb, display_matrix[i]); -#if FF_API_OLD_ROTATE_API - } else if (rotation == 90) { - write_matrix(pb, 0, 1, -1, 0, track->par->height, 0); - } else if (rotation == 180) { - write_matrix(pb, -1, 0, 0, -1, track->par->width, track->par->height); - } else if (rotation == 270) { - write_matrix(pb, 0, -1, 1, 0, 0, track->par->width); -#endif } else { write_matrix(pb, 1, 0, 0, 1, 0, 0); } diff --git a/libavformat/version.h b/libavformat/version.h index 7108482624..4c186f2915 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_OLD_ROTATE_API -#define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OLD_AVIO_EOF_0 #define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) #endif diff --git a/tests/ref/fate/mov-zombie b/tests/ref/fate/mov-zombie index 7b417e59dd..3001c6daa2 100644 --- a/tests/ref/fate/mov-zombie +++ b/tests/ref/fate/mov-zombie @@ -194,5 +194,5 @@ frame|media_type=video|stream_index=0|key_frame=0|pkt_pts=188623|pkt_pts_time=2. packet|codec_type=video|stream_index=0|pts=197632|pts_time=2.195911|dts=191625|dts_time=2.129167|duration=3003|duration_time=0.033367|size=580|pos=101820|flags=__ frame|media_type=video|stream_index=0|key_frame=0|pkt_pts=191626|pkt_pts_time=2.129178|pkt_dts=N/A|pkt_dts_time=N/A|best_effort_timestamp=191626|best_effort_timestamp_time=2.129178|pkt_duration=3003|pkt_duration_time=0.033367|pkt_pos=99180|pkt_size=1666|width=160|height=240|pix_fmt=yuv420p|sample_aspect_ratio=2:1|pict_type=P|coded_picture_number=63|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=tv|color_space=smpte170m|color_primaries=smpte170m|color_transfer=bt709|chroma_location=topleftside_data|side_data_type=H.26[45] User Data Unregistered SEI message -stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|refs=2|is_avc=true|nal_length_size=4|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:capti ons=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:rotate=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:vendor_id=appl|tag:encoder=H.264 +stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|refs=2|is_avc=true|nal_length_size=4|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:capti From patchwork Mon Apr 19 14:09:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27036 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560131iob; Mon, 19 Apr 2021 07:16:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7eiVELo2TB4l7Tf81yPih5WWEYAGz5b3NRtTbgNo8S2rGxPtcYISbQoRDGeBzs0j5fQ3j X-Received: by 2002:a05:6402:2219:: with SMTP id cq25mr9052237edb.60.1618841812967; Mon, 19 Apr 2021 07:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841812; cv=none; d=google.com; s=arc-20160816; b=Uo4jqPmF2C6pihPSTo8reZqg0mYqe8n+CnIL6/zhfQdwWXBu9aigRWDvPbqUIO4zt4 +aUtaB0F1SBmwIoMYt0eD6lusrPe89z67ziB2Lee6etb0g8lzlHKZXRFIgk9cTuR8qG1 v8Kb2sH0etyDjVIkGSHWhh+FVoFQaUlsdePkKayNX9+SXrDlgFP7E3hgLOIpjxFnYGQK FX23xql2Ny0nkgQL7sZtU9Samrtp1Wl7n3b2Nm01unrptidNU68GMAeeSsRhvtB5YCfl bWPHETt5903E5HdlLj4fyfxIUwA8ok2nZV7FpkQ7nNxtyUo5fQbTOhsQA67Knx+kyjF2 aU7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=ypasK/G35AnBKSK44q7+JtWQSp0tfpkv2dC6kKprK2o=; b=SzX9aA2c58CFOeiAoNZGqEksC0WY6pFhRrlC15AMwHSDZMHiqEzLdMkYOCBXWvrPxm 2mxfsPgdlObXd81ulIBQzCxguTRtsa/3ZY6gkROzbPG07ngJgevaGP2tqWFcw9oerMI4 qOaBakoHdwM4ehV/JhV4Zowu7dfqzkdzwal0fvAKUqidtKo1b9RSD56UesZGdCpTkhXD mRtjkvDXG+4hib7zrbcuAjOhthHWA4J4S7hWtv4oo21gpGYEm8ZHQ7/OCB/L4SmiJxRL L1pXDM8rwNPJR6SFNIxJGDctytvP4iKKGawPIZcpKzg1N64bNr6gSab9a/rgccJ6Gg9u 0B5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=VXsUD8sO; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g20si12091881edt.518.2021.04.19.07.16.52; Mon, 19 Apr 2021 07:16:52 -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=@gmail.com header.s=20161025 header.b=VXsUD8sO; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4C1CD6898E3; Mon, 19 Apr 2021 17:12:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 16D12688335 for ; Mon, 19 Apr 2021 17:11:56 +0300 (EEST) Received: by mail-qk1-f176.google.com with SMTP id e13so26002962qkl.6 for ; Mon, 19 Apr 2021 07:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1M8jYLTHQVOZSs3RQHZs/Oy5QYGvIXCUF3TUszvjhxw=; b=VXsUD8sOasaOmcGM8/cW+6C6ibl95H433rIjhWdM6v61rGbSBtvnmukvz9QJkZoy5S Xo1snnHfioogyixFJO8YZxcZN3Ihr1ce2lpyAW0RSrt4O8YjoY99rNErzVz+ZSewK2YY x8ZKIml7BqvaSj1eekIC8qhIPvAYfC2bhOfb44ojnN1pDyRVadjQpLBkKIct0ytwaaVn TzgaSL7N4JQ/n0UWaTEOGEIyKGeSArVO4nKK4OjaGjtloGYqdDQ7kKEFR4/lm5MvpC6G um6l1lEXRt8ZqsRD4JPFyueQ0E2OTbPlwNuMq5adTOBm5cBlanHWo15mSejQJqtiu9Fb TnJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1M8jYLTHQVOZSs3RQHZs/Oy5QYGvIXCUF3TUszvjhxw=; b=GSUfXWpT+BE93DP6vpMQHdjv47x2S2V6Tn821IzaK3zSYpMQ2ellndYc2/MPFYvUri +DmXIUKG//TVgQA4bAGcKm4DoI+jAMH+rCsPNtgdbj0iTZAnayPv2u7u0WNTphWFsLah 0HOpUuUEPHpmvmyY2Pzycv3bmOtsHY1CDlfW1kY7Q4vcWuGIchGKSWXkMqfsNCqn/Uov U5BiAeLBAuh9iim03v8va8ljFwoH4E5YfLe+aDR8ejCJzLxpsQ9jGjprLDepAserAUiE MpbcixkYHpdHs1drVFsz+oxEJEnsWBn+4H6ciBPieheLJ5aPZWtJF1IeTuwp/Sbz7KkP TblQ== X-Gm-Message-State: AOAM532UkT5aJ5VqPhxspP2GUYP3V2ao6hMrNttx0zWbjVWGVPpq+yqZ TfiQWB+eedFp0invEvaijM9Bf/3WSLs= X-Received: by 2002:a05:620a:1522:: with SMTP id n2mr6460470qkk.298.1618841514781; Mon, 19 Apr 2021 07:11:54 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:54 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:41 -0300 Message-Id: <20210419141024.8174-45-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 44/87] avformat/aviobuf: End grace period of allowing 0 from read_packet 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yoSnIXYnQZW3 From: Andreas Rheinhardt See a606f27f4c610708fa96e35eed7b7537d3d8f712. Signed-off-by: Andreas Rheinhardt --- libavformat/aviobuf.c | 7 ------- libavformat/version.h | 3 --- 2 files changed, 10 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 518cb11129..1ecc7fb095 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -519,14 +519,7 @@ static int read_packet_wrapper(AVIOContext *s, uint8_t *buf, int size) if (!s->read_packet) return AVERROR(EINVAL); ret = s->read_packet(s->opaque, buf, size); -#if FF_API_OLD_AVIO_EOF_0 - if (!ret && !s->max_packet_size) { - av_log(NULL, AV_LOG_WARNING, "Invalid return value 0 for stream protocol\n"); - ret = AVERROR_EOF; - } -#else av_assert2(ret || s->max_packet_size); -#endif return ret; } diff --git a/libavformat/version.h b/libavformat/version.h index 4c186f2915..3e82007383 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_OLD_AVIO_EOF_0 -#define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OLD_RTSP_OPTIONS #define FF_API_OLD_RTSP_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27040 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560319iob; Mon, 19 Apr 2021 07:17:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV15E98+XbPFkLPFzNpMsJypXVE1GQI6zVYxCcLKU8DeQXhZ8PEbCsfPkNPn4WMA5l8rwN X-Received: by 2002:a17:906:a45a:: with SMTP id cb26mr21708424ejb.537.1618841823015; Mon, 19 Apr 2021 07:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841823; cv=none; d=google.com; s=arc-20160816; b=HMD8LJjVbBxNdTZEUyQ2Pj0XSkho/BudSXVSpZj93Bq7a7zPivOrC0y+L6DNsNvlel 5I9nUYyD10TJxtMujZFuxEV8CK/SI6+Gu5wFj1BoHrCMvBmPH9KGzP1BE5oXitUIM+pJ b1mFVSNzNJ8iAq+sWokrt5PXF4cm0tgAvfX1/tdNsumLOsmwWM3Yfzut2rzbhdoUwTw9 ii/tdlHzqBR9iK1H1R7tddt4exzTV0HrFEHjSpuJgWx+1hqFdd15fFAQM9bY4YoV0RPC 1sYIR2ybWdN1YwlS3rZvW3UfzG4ahcJJbSKPrX3TpBHE57WC7kLZJ3f2HSC1vCw1N25h sfAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=OmY+2JihYzX7ObC0zeWbacnbaJZ4GCIFfKw0Ln6icFM=; b=jrhOVC5p2AMAlF3MavDz5DOthG7OarNYBt/ZH7CmOFm0supHasFgdB22t5Y/Tama1u nZbz0XjegGmOmjEl3nZNjVVinmdxCeHujuR8ae42cNxkmFMoL31TfCyvPE4/r35DGbjb Wew38APLL07kZ2h6ZtC1mIFQkG3xQ9COAXFGFbHRYUuCRpxPlFWQXFECQsvPODKvxDbL uDDH2F40B1xBqek1mhMwOhn5Y81lBUjbIgBI8ScFwkTzaRyf/XZsdlBD06xBTLPZrNrP TsLVhkGSBOXVHmY8tMGcWxdMGQL8ciD16cdvFQ+8acTnwFyzNf38Zp0pkIZbVgTuevii 8epA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=fdtr7Cq+; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q11si12257877eju.518.2021.04.19.07.17.02; Mon, 19 Apr 2021 07:17:03 -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=@gmail.com header.s=20161025 header.b=fdtr7Cq+; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 306396898E0; Mon, 19 Apr 2021 17:12:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C939689248 for ; Mon, 19 Apr 2021 17:11:57 +0300 (EEST) Received: by mail-qk1-f182.google.com with SMTP id x11so35789003qkp.11 for ; Mon, 19 Apr 2021 07:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=OUtD1EexxjEdyIOpmRqFQoTGZ+mbapWwxT11XUC33Vs=; b=fdtr7Cq+Cft3tokqW7Y8UcGE/eoo6fBjuEMpDx6bHvCGj0q3WXN+6XiOn7DAmpeT8h y4rvpiHznHekkdI2l8IZQTnOQ7gqos+025R5GGF3SjDj/WkY3Y465icxiLS0Apx0nP/T Bh8+AykC7fdiLm+Dw6aAg91I7M4eOxXsOzIcqR+zA5uu0hGnsgkRkMC+4Vjt6uX//EIv KH9vUk/+6UYJ70SCbwHw8KLwTyA9SENGF0NvQTq8l9tZx9is9RIhZucXYAwMISnEBU0O TQOQzOcdJn2tb+VxMKDK5YI+qeJxSVtc1DIm3r1spDOCMDbCNJnmfr5SEKPGcok2zDIr 025A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OUtD1EexxjEdyIOpmRqFQoTGZ+mbapWwxT11XUC33Vs=; b=IoQxNjNhfzZl+ZPzKdIqpAfuS5bIj0D0Jb6D38zavOnJZ7IsUdsBGzkqW+vd4s5SKe TOJh+h5YSkXR3xl01PWSf3o1iYkVc7n4sGH3da+vQcmOLOTn+smsfh8wsUTZN3LvR/LO aqVnVm2A35x2FOwmyPloxS3no8vB2wCVaS5pTv1uX07TGg7dsWtn0vLmtUEI0A/iX8Qk FMLohm1Bo0uaKsurKR4kDoMneZSZD4CzXY4iT1RM6fwNVOlKSWcefbc5DJS3kht0+RkZ adhbORrde/h+YWu1jvUPSM8VGzRG/q2DCgZGBKxgD1ZW0CuSr64bvL8xLpz+lSv9dfVE gpsg== X-Gm-Message-State: AOAM532mBJL6lGsSxwxhZG8EscDSe8AR0O8yoj126APOWBvYO4UPetBF w8rjbKxGn6YfjYpcTJ2DMw2dTFPExYU= X-Received: by 2002:a05:620a:2058:: with SMTP id d24mr3499174qka.469.1618841515876; Mon, 19 Apr 2021 07:11:55 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:55 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:42 -0300 Message-Id: <20210419141024.8174-46-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 45/87] avformat/rtsp: Remove deprecated old options, rename stimeout->timeout 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6XVw+P1ePfVH From: Andreas Rheinhardt Deprecated in ff46124b0df17a1d35249e09ae8eae9a61f16e04. Signed-off-by: Andreas Rheinhardt --- doc/protocols.texi | 12 +----------- libavformat/rtsp.c | 8 -------- libavformat/version.h | 3 --- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 2cc2b561de..8371f83059 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -1161,12 +1161,6 @@ Set minimum local UDP port. Default value is 5000. @item max_port Set maximum local UDP port. Default value is 65000. -@item timeout -This option is deprecated. Use @option{listen_timeout} instead. Set maximum timeout (in seconds) to wait for incoming connections. - -A value of -1 means infinite (default). This option implies the -@option{rtsp_flags} set to @samp{listen}. - @item listen_timeout Set maximum timeout (in seconds) to establish an initial connection. Setting @option{listen_timeout} > 0 sets @option{rtsp_flags} to @samp{listen}. Default is -1 @@ -1175,13 +1169,9 @@ which means an infinite timeout when @samp{listen} mode is set. @item reorder_queue_size Set number of packets to buffer for handling of reordered packets. -@item stimeout +@item timeout Set socket TCP I/O timeout in microseconds. -@item user-agent -This option is deprecated. Use @option{user_agent} instead. Override User-Agent header. If not specified, it defaults to the -libavformat identifier string. - @item user_agent Override User-Agent header. If not specified, it defaults to the libavformat identifier string. diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 25bdf475b3..a8c5a641cb 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -94,17 +94,9 @@ const AVOption ff_rtsp_options[] = { { "min_port", "set minimum local UDP port", OFFSET(rtp_port_min), AV_OPT_TYPE_INT, {.i64 = RTSP_RTP_PORT_MIN}, 0, 65535, DEC|ENC }, { "max_port", "set maximum local UDP port", OFFSET(rtp_port_max), AV_OPT_TYPE_INT, {.i64 = RTSP_RTP_PORT_MAX}, 0, 65535, DEC|ENC }, { "listen_timeout", "set maximum timeout (in seconds) to wait for incoming connections (-1 is infinite, imply flag listen)", OFFSET(initial_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, DEC }, -#if FF_API_OLD_RTSP_OPTIONS - { "timeout", "set maximum timeout (in seconds) to wait for incoming connections (-1 is infinite, imply flag listen) (deprecated, use listen_timeout)", OFFSET(initial_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, DEC|AV_OPT_FLAG_DEPRECATED }, - { "stimeout", "set timeout (in microseconds) of socket TCP I/O operations", OFFSET(stimeout), AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, DEC }, -#else { "timeout", "set timeout (in microseconds) of socket TCP I/O operations", OFFSET(stimeout), AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, DEC }, -#endif COMMON_OPTS(), { "user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT}, 0, 0, DEC }, -#if FF_API_OLD_RTSP_OPTIONS - { "user-agent", "override User-Agent header (deprecated, use user_agent)", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT}, 0, 0, DEC|AV_OPT_FLAG_DEPRECATED }, -#endif { NULL }, }; diff --git a/libavformat/version.h b/libavformat/version.h index 3e82007383..230ebd8a3e 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_OLD_RTSP_OPTIONS -#define FF_API_OLD_RTSP_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_DASH_MIN_SEG_DURATION #define FF_API_DASH_MIN_SEG_DURATION (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27034 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560459iob; Mon, 19 Apr 2021 07:17:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzriveJjFMoRVsF3GO2l9mFVkUfsocOTg/BfG2wnkK+BAeFuYRoCE4dUZg2VkVmvvpJP8J7 X-Received: by 2002:a5d:6b81:: with SMTP id n1mr14651603wrx.265.1618841834063; Mon, 19 Apr 2021 07:17:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841834; cv=none; d=google.com; s=arc-20160816; b=jArW4mtXJuVoubUE96zzgdebP1LWB56eLaJES+b2jdxiRS208UcwrHhRcJXOUxEIq+ dzLkbL68XrtiLGtv9FBHB0441ei3lL/XuGlmjEGim3X6RjJVRwvvJt5GB6R3H3x7CCwY iJw6GdK8+rvGdFoKxDflV70tB46QlB4biWBNiRRVCzq+qcg1ZMabvjGO8s4zvUNOEOcu W06Lh/N3P+4UWk7Zo9LTOcPkaMAmgYPnNdMuSs0bQvRKIeO39EMIxKXhtao11OGPbZB9 SrDn5pW8DaURuO0qvDjc3G2L6QpEWy1AT0rK7jD11ESfEiLVemHk9ItNGK4oV9vKbVhZ aaRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=A8/wzpOG1Cv4dF/u5f8LS1FSvL4QmCri/OgNYS+k44g=; b=kYBbIK8jtY0//DNqNN4hBVQfCwiaXGeCsIb+t6SF4m0d4A6sZG+3r7q57HjrcHX/ZL 4pXt1pH+4ars5z2NvY17TFNMJOxVSf4pQYZn0EuuLTVNN2GMUbJqXI0BjI16hwsh4V60 s6vWIldBsqa3B9jI7YJgGu497QeMRrzOYtOJb6S6vMhnY62N8J9DbanWhmcPTr8s1z/e vJ5GhTPN99t+jg2Wuv5zTwwhfhQe70+KMFXX7UQ8sjzmoOxJ/rRBtbFk8WUOodVaBvnZ bmLFWdkn/7c4CrYkhdZZ9Goxyik2EKG5vE4GAekPB1N9q5AoG3l2CTEM2CJMTNaqD3mE saYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=lK0rSTxT; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i11si14102436edb.109.2021.04.19.07.17.13; Mon, 19 Apr 2021 07:17: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=@gmail.com header.s=20161025 header.b=lK0rSTxT; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 25BD4689900; Mon, 19 Apr 2021 17:12:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5EEF9689753 for ; Mon, 19 Apr 2021 17:11:58 +0300 (EEST) Received: by mail-qt1-f173.google.com with SMTP id y12so26141036qtx.11 for ; Mon, 19 Apr 2021 07:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/qyCsve9IvWXCWocB1WZbXTjLstSyMnhlCmY1jUbzos=; b=lK0rSTxTAoCkLeIOGbiAIPtB/kSRADwa5PPKHY5cOLxWzfrMe0trRrQa5Ud4vu+DG/ nGtMFPMZZ2/WizsiNhP+YnpA9yVxCOR3RLMxK6sRAsS6ETqqm20k8ZR0zZ0b74YkuTgb +7XsMzYhm8hkLHD5cAMUNj4ev/RuRGfqoIu06e8VCqn2AN4T8WsYDw5YBLwGkEEznOp8 CxHrO8wwE4u00PX9Nm0TdV1nwxDvct617S6+KlzmD3P2gHXPsmnZymmgtnDTNAcQyqm8 MRW38AfS9MfW6L5nCtwDQMHIqgDdRozhuVh1vMrvOHUkN7IU10SVT0w3IuVS0mabKu3l BjUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/qyCsve9IvWXCWocB1WZbXTjLstSyMnhlCmY1jUbzos=; b=djaz8S42GmueoJujT0QBtN7XrNq3zMjRU72Yo1EqBRzHytoZWCyH36pJUms0y2E2Zs Lc7NVbB992zw8p3UFWIkuYBSUZppnjDfsYZB4ez/cUULBbaEEYySjY2yJ88Ho+5cHkkm VE6ru+fkIfSXY1Yul/gqudLaKJAkU+RepAamksKDcOQVZTX14opymZyx05ACj/W/3W9L JwF4Lh/shaSLR5of79TCEU9gkZmZC3i/kPddu0FRKevton0PpVDxLUO94PGDS63LK5jH JQCxkggR4uM1UQKIoRXfkUS8pvQANGYaatNZyQVYZwIQ0HfjdZpqMACOWE+68kZewVHN ++vQ== X-Gm-Message-State: AOAM532dNWYegK+2MPhDDGSEHupJ4yf+TQGVH0ZYAVBloIgj7tvjiN/0 84+/w0H3O2NloE1FHLR6A21EQOMlW2g= X-Received: by 2002:ac8:5cc4:: with SMTP id s4mr11696857qta.214.1618841516988; Mon, 19 Apr 2021 07:11:56 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:56 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:43 -0300 Message-Id: <20210419141024.8174-47-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 46/87] avformat/dashenc: Remove deprecated min_seg_duration option 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: StthdIzR6FwM From: Andreas Rheinhardt Deprecated in 01ba52852d2ada3c79fe02a7de5bc1fdc27d56e8. Signed-off-by: Andreas Rheinhardt --- doc/muxers.texi | 2 -- libavformat/dashenc.c | 12 ------------ libavformat/version.h | 3 --- 3 files changed, 17 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 29f1d3aee4..9aa4f86801 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -211,8 +211,6 @@ ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \ @end example @table @option -@item min_seg_duration @var{microseconds} -This is a deprecated option to set the segment length in microseconds, use @var{seg_duration} instead. @item seg_duration @var{duration} Set the segment length in seconds (fractional value can be set). The value is treated as average segment duration when @var{use_template} is enabled and diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 81a5c2b452..a73fa60d2a 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -147,9 +147,6 @@ typedef struct DASHContext { int nb_as; int window_size; int extra_window_size; -#if FF_API_DASH_MIN_SEG_DURATION - int min_seg_duration; -#endif int64_t seg_duration; int64_t frag_duration; int remove_at_exit; @@ -1374,12 +1371,6 @@ static int dash_init(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "At least one profile must be enabled.\n"); return AVERROR(EINVAL); } -#if FF_API_DASH_MIN_SEG_DURATION - if (c->min_seg_duration != 5000000) { - av_log(s, AV_LOG_WARNING, "The min_seg_duration option is deprecated and will be removed. Please use the -seg_duration\n"); - c->seg_duration = c->min_seg_duration; - } -#endif if (c->lhls && s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { av_log(s, AV_LOG_ERROR, "LHLS is experimental, Please set -strict experimental in order to enable it.\n"); @@ -2340,9 +2331,6 @@ static const AVOption options[] = { { "adaptation_sets", "Adaptation sets. Syntax: id=0,streams=0,1,2 id=1,streams=3,4 and so on", OFFSET(adaptation_sets), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { "window_size", "number of segments kept in the manifest", OFFSET(window_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, E }, { "extra_window_size", "number of segments kept outside of the manifest before removing from disk", OFFSET(extra_window_size), AV_OPT_TYPE_INT, { .i64 = 5 }, 0, INT_MAX, E }, -#if FF_API_DASH_MIN_SEG_DURATION - { "min_seg_duration", "minimum segment duration (in microseconds) (will be deprecated)", OFFSET(min_seg_duration), AV_OPT_TYPE_INT, { .i64 = 5000000 }, 0, INT_MAX, E }, -#endif { "seg_duration", "segment duration (in seconds, fractional value can be set)", OFFSET(seg_duration), AV_OPT_TYPE_DURATION, { .i64 = 5000000 }, 0, INT_MAX, E }, { "frag_duration", "fragment duration (in seconds, fractional value can be set)", OFFSET(frag_duration), AV_OPT_TYPE_DURATION, { .i64 = 0 }, 0, INT_MAX, E }, { "frag_type", "set type of interval for fragments", OFFSET(frag_type), AV_OPT_TYPE_INT, {.i64 = FRAG_TYPE_NONE }, 0, FRAG_TYPE_NB - 1, E, "frag_type"}, diff --git a/libavformat/version.h b/libavformat/version.h index 230ebd8a3e..baef650f8e 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_DASH_MIN_SEG_DURATION -#define FF_API_DASH_MIN_SEG_DURATION (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_LAVF_MP4A_LATM #define FF_API_LAVF_MP4A_LATM (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27048 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560619iob; Mon, 19 Apr 2021 07:17:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9jL3ilbbr9QWhkpHORBkBQtgLSlXnRH3fX/lh2oUt9gEDEkfP4yEbEFjhaKE60Y2shDio X-Received: by 2002:a17:906:170f:: with SMTP id c15mr22085091eje.358.1618841846069; Mon, 19 Apr 2021 07:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841846; cv=none; d=google.com; s=arc-20160816; b=FSDLHz4SuaIid/bu/I1sgNwaoJv9jUc2ulHPYLiqNMhEZyssrIw6ZEHk9ZJv03J8Y6 Bshxp57rYGC5wkS8u/Sj7ThFJy6W6VlRy7Vp5EhOqs8Unq1VO0mhQVTusVl4CRNHnyYt Oga1K1LNJDFo8C2Wf87qdTOPWGgTUSrqrR6nmsJdMiO0eI4lhbC0E00cReiEY7Tn0de+ HjDhvRaxwz5H8BEyq+vLGMI1tLUpE1+Ii6hZZ8+Xi90nSp20wWDAFRCKjXGkWmgWdAh4 OCsBu5B8uFeTso6h8DQ6Y4V6dhiXMZGCWHDirR8gE/2uk2plxd5aIEikHZUqRCpDuruc SxrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=X/MgQmTOKCY8CDJxLuufU5VhVqQnPok7P+5tkdJP9P0=; b=JbdzoYRGpVOxPXjNfO0J86lWdKGiBVTu/y1/rNjhVwACd4tmrQ/TrrNTPo9K2JJsFt 6DWI4CU6MNbzoBugUebU6TyHYc8mMnTu8Zzn8trFLar+FvgSe06uN/Hetqm8EYa/wWyE lLACdOAIkLdBvjYyfKX7teZD9pLbwcZO3I2J5UfTetLX1V/iD2KW7s8JXsRVTWMjbE2i tBEoqL6Y4h42Ns7hU8yR6xRYRON462ILWoHj3Ao09LNRwlmc7sIOSjoirmW8zNiDGh2m nNT5ogfjEmBFglWTnFQi7tPTNodcPVtdqX6dZhzrYt96hdmk4+xe/fwMMQjYXBHMK6Xg 7G/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=LzM9mdU4; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w17si12546184eja.56.2021.04.19.07.17.25; Mon, 19 Apr 2021 07:17: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=@gmail.com header.s=20161025 header.b=LzM9mdU4; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 03185689912; Mon, 19 Apr 2021 17:12:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7172268980B for ; Mon, 19 Apr 2021 17:11:59 +0300 (EEST) Received: by mail-qk1-f172.google.com with SMTP id x11so35789143qkp.11 for ; Mon, 19 Apr 2021 07:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TwvjtLSS+/MVPPyBjHpBd3iYY1TehFAtgb6GOSpYGFI=; b=LzM9mdU4fPlj3417KLz6nbLNgx3tnpfoXHx+kgk+GFFw/+f78+cQwQKnUGrwGIEVad 1PvwNl2DoMPtc3BzoeTnS0yuK0w84o8apM2rMfHsvLtBI1SLo3UW9JXFPZj2LhKrLJpa zEcUK/RP3MO+ADtwj/SZ5YB6cOU0k2L8F0nzL8CusVE9o1sDlLspNP1gfFA95SNDYBNL GlpncYv3XWWxLPwiAhdt6C7+MRQjx5RqBig13QTMKFm5GqYd0TuStEHtXBUf5wFnRUUr wzFycIIdPOPKXxHsPk0/ouSuy7Fd/O+H2YCTCeIpofygwnALo6U/5+YFGzEFfz2spZev 7Hbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TwvjtLSS+/MVPPyBjHpBd3iYY1TehFAtgb6GOSpYGFI=; b=of5N9zuhjex3ps0NN3CNhpPRZBAKfz/VUJwDE1SlGoywlde3upzV6EvLpsC8wCGUPC rSAmAzMzPOUTuBfY0TpP53o6OcApeAvrGKNE7jOEP0l7WyJVmZSfTsJ2GQ2pqBWEk3OE kK5+Mso7pXzfIg/DUPNMvTZfB2rzJJkeSLonprCnnfHhF/SilfnGLSMjogfotzHwRxbS IoPsE66ttCcNNhh+6GVDWu+999qHmu9yOdspYWt5dbQEQSvevjgjvuPov6iFi6XMtVL1 YmSEQV9Vbn7T2Yc07gnfJ1evONZp3Z9N1lD/R5dudVSyUf1vBnBYjUDyohUhlA+TRT7t 8FCQ== X-Gm-Message-State: AOAM532787mYPntOZVIvWoJ9Xu6CxA60vytzN30f8XYZTj0JXL3C6Duj WQqKR+Tn6MLeN69gLc0bKtOR6VdBw8E= X-Received: by 2002:a37:2ec4:: with SMTP id u187mr12418996qkh.472.1618841518106; Mon, 19 Apr 2021 07:11:58 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:57 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:44 -0300 Message-Id: <20210419141024.8174-48-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 47/87] avformat: Remove deprecated AVFMT_FLAG_MP4A_LATM flag, latm option 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: KarlRcuiUTCO From: Andreas Rheinhardt Deprecated in 67747c89ad4d3bfb4381c3d274603a4f0da773d8. Signed-off-by: Andreas Rheinhardt --- doc/formats.texi | 1 - libavformat/avformat.h | 3 --- libavformat/options_table.h | 3 --- libavformat/version.h | 3 --- 4 files changed, 10 deletions(-) diff --git a/doc/formats.texi b/doc/formats.texi index 9387f98b6a..640b23b790 100644 --- a/doc/formats.texi +++ b/doc/formats.texi @@ -69,7 +69,6 @@ This ensures that file and data checksums are reproducible and match between platforms. Its primary use is for regression testing. @item flush_packets Write out packets immediately. -@item latm (@emph{deprecated},@emph{inert}) @item shortest Stop muxing at the end of the shortest stream. It may be needed to increase max_interleave_delta to avoid flushing the longer diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6c12621bbb..6658a0f315 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1274,9 +1274,6 @@ typedef struct AVFormatContext { * This flag is mainly intended for testing. */ #define AVFMT_FLAG_BITEXACT 0x0400 -#if FF_API_LAVF_MP4A_LATM -#define AVFMT_FLAG_MP4A_LATM 0x8000 ///< Deprecated, does nothing. -#endif #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) #if FF_API_LAVF_PRIV_OPT #define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, will do nothing once av_demuxer_open() is removed) diff --git a/libavformat/options_table.h b/libavformat/options_table.h index d041ffb641..62c5bb40a3 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -49,9 +49,6 @@ static const AVOption avformat_options[] = { {"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"}, {"sortdts", "try to interleave outputted packets by dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"}, {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, "fflags"}, -#if FF_API_LAVF_MP4A_LATM -{"latm", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"}, -#endif {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"}, {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" }, {"shortest", "stop muxing with the shortest stream", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_SHORTEST }, 0, 0, E, "fflags" }, diff --git a/libavformat/version.h b/libavformat/version.h index baef650f8e..7ce6660f43 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_LAVF_MP4A_LATM -#define FF_API_LAVF_MP4A_LATM (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_DEMUXER_OPEN #define FF_API_DEMUXER_OPEN (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27030 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560775iob; Mon, 19 Apr 2021 07:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIUbV/hqhzu8tdaf35c5weeRA1wRHSLD1ylIDfLe6YX+UKEDQUrHZgqYHG7QJjWmc/Ozfq X-Received: by 2002:a05:6402:646:: with SMTP id u6mr25732352edx.74.1618841858295; Mon, 19 Apr 2021 07:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841858; cv=none; d=google.com; s=arc-20160816; b=iaYvBBCjmpkUcpr11+lF+3q2vRpZzJ4Wj7u9ExNaMxiZeRBvMtUxxdy6N+4MV3MdXS tEvH1saVtQSZJT4HD6ZaEjoAr1RuzMLyDKB/pze6/8DgSCU8Db6ZRYDpZTz95KZS1wrN hbc6XLQB9rR2FsH5UUOwSKMnfR25tUThZXN+GhjydWBhj8uMuiQ9FLlkPfQGXreWvjyT SPMEm+s7kwBU6jrS/K73jVJ6u3NOFJRoWRU3mGovq3cHSL9BgEYmG0jEr+oOTNoOoktA KCOcgNeujrLfcdHnRQ9yopVF1ubhSVsftFYWvOyIJr7DnX+RdHbuZIDRlSlL7+L81Kmd /StA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=FgEE7zAFJpxMjTRKbfoe8JxwWBpdba/KV5rA8DjwzsM=; b=WtOoMUbv8pS58Yroz9AaGTU2Sgyylkth0j/nAUuZ6oDYwHyhHNiu0tRA0L6tlOKnHw 1vfpj3z5APhaikYN/KfG0OjtJxiz1xeRSaAFPbDYd7vMHzu3MrEKt3IujKTUnq6DLlPF KqCkSJmsIldlCII8wxRvEP7HoJvKk2vSdPFZH7QpcJ2BuFeU7cGv29Y4ehDPoGnkMndW vWctQevYLhF82VRqTRYGsVNMhL9cLAXHH95frWEtia2WS3r9xrSY1LnBGVCMrm6ULPN5 ZDYsQgO6c7vmUgKSuIyWaLGT8En9rqnp34gm2gTBwsxm17Dn0PTQtl6LoajuCodNyS7F WxEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="OOB/JWUE"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z22si14858582edm.203.2021.04.19.07.17.37; Mon, 19 Apr 2021 07:17:38 -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=@gmail.com header.s=20161025 header.b="OOB/JWUE"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1199068991B; Mon, 19 Apr 2021 17:12:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 497526898DF for ; Mon, 19 Apr 2021 17:12:00 +0300 (EEST) Received: by mail-qt1-f174.google.com with SMTP id u8so26075027qtq.12 for ; Mon, 19 Apr 2021 07:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=wya30g0x9woxyxxCejN4hh+DIdxBU2uwVFCwlAZkVIE=; b=OOB/JWUEwmTZaKfU78QkqZcjHkLpwPWSKC/9UFsMb6q1jbSJOlQDqIn/vKn4MJjs8W e+kqWknpE1Ou4rgeTiaHivPjknkpSIhICntC03f29RpKejY9LgBnJEB9ncMp4p2cfhXj +Cy47a/vh5hZtoWnC1d0N2VVUOFXyU2lEROXI3AaJWZ+gSsjAjz0rFr/q1ragVKiFFKG yCTgiY2TJKnPs1t37E+IjyNAby1+Is9+8D2slhfdWyuOCtYgh2jMXpox3yhNk4Ux6E48 mwRMzwby06thgGwrsga4B9Q8JxbxBrtS8H9cbO6iBkavEHe4g764pJQlx3B+J24fLEZR 7qZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wya30g0x9woxyxxCejN4hh+DIdxBU2uwVFCwlAZkVIE=; b=j8mrZXJ78lpAJo5upiB7XirAMn8dyfQOB2u1f1exZQdTOpuf96mP2o0ZZWX2vTZyOS fVVsDxl2bN3IcV7ZQQRQchwClzaNu4ESx+8qc4iB/jYUERLsl7qCUqbeAX1iPj0Yd4+l X3Zaj5wJYz7yB6CHHNkwuT/aej9rB58TqSkcmnt1hPWM3nUWArCevO0ArJ5tm2vcynwF WSYIsoFwjV6MwOD/czFzVSiTCUOxfjo16wHCtFsC/9P6IjvCUdjuzjFdm5HW6zLge5dH TopFpk2t5krq/HqCw+7r/BvAwta98usP8Kvjr51NiFpOdtycxg2TRqGYkOVsmm3KGtKV /QCg== X-Gm-Message-State: AOAM5319wtwpk39fw4P2lcoRxlP5JXIUPWc7MDylWOQ6cAEVHleRMjyH Qn5JSpFvkeX+vgOLRGWxoaitmWyYNHw= X-Received: by 2002:a05:622a:11cd:: with SMTP id n13mr12110357qtk.37.1618841519618; Mon, 19 Apr 2021 07:11:59 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:11:58 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:45 -0300 Message-Id: <20210419141024.8174-49-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 48/87] avformat: Remove deprecated av_demuxer_open() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: eLtFc7qZvzbt From: Andreas Rheinhardt Deprecate in e37f161e66e042d6c2c7470c4d9881df9427fc4a. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 10 +--------- libavformat/utils.c | 29 ----------------------------- libavformat/version.h | 3 --- 3 files changed, 1 insertion(+), 41 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6658a0f315..272370db2a 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1276,7 +1276,7 @@ typedef struct AVFormatContext { #define AVFMT_FLAG_BITEXACT 0x0400 #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) #if FF_API_LAVF_PRIV_OPT -#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, will do nothing once av_demuxer_open() is removed) +#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, does nothing) #endif #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats #define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. @@ -2017,14 +2017,6 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options); -#if FF_API_DEMUXER_OPEN -/** - * @deprecated Use an AVDictionary to pass options to a demuxer. - */ -attribute_deprecated -int av_demuxer_open(AVFormatContext *ic); -#endif - /** * Read packets of a media file to get stream information. This * is useful for file formats with no headers such as MPEG. This diff --git a/libavformat/utils.c b/libavformat/utils.c index d8b44ce896..ba664f6214 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -370,27 +370,6 @@ FF_ENABLE_DEPRECATION_WARNINGS /************************************************************/ /* input media file */ -#if FF_API_DEMUXER_OPEN -int av_demuxer_open(AVFormatContext *ic) { - int err; - - if (ic->format_whitelist && av_match_list(ic->iformat->name, ic->format_whitelist, ',') <= 0) { - av_log(ic, AV_LOG_ERROR, "Format not on whitelist \'%s\'\n", ic->format_whitelist); - return AVERROR(EINVAL); - } - - if (ic->iformat->read_header) { - err = ic->iformat->read_header(ic); - if (err < 0) - return err; - } - - if (ic->pb && !ic->internal->data_offset) - ic->internal->data_offset = avio_tell(ic->pb); - - return 0; -} -#endif /* Open input file and probe the format if necessary. */ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options) @@ -603,11 +582,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, if (s->pb) ff_id3v2_read_dict(s->pb, &s->internal->id3v2_meta, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); -#if FF_API_DEMUXER_OPEN - if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header) -#else if (s->iformat->read_header) -#endif if ((ret = s->iformat->read_header(s)) < 0) goto fail; @@ -636,11 +611,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, if ((ret = avformat_queue_attached_pictures(s)) < 0) goto close; -#if FF_API_DEMUXER_OPEN - if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->pb && !s->internal->data_offset) -#else if (s->pb && !s->internal->data_offset) -#endif s->internal->data_offset = avio_tell(s->pb); s->internal->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE; diff --git a/libavformat/version.h b/libavformat/version.h index 7ce6660f43..70ac403a53 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_DEMUXER_OPEN -#define FF_API_DEMUXER_OPEN (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_CHAPTER_ID_INT #define FF_API_CHAPTER_ID_INT (LIBAVFORMAT_VERSION_MAJOR < 59) #endif From patchwork Mon Apr 19 14:09:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27039 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp560921iob; Mon, 19 Apr 2021 07:17:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCuUrUio8wfxXLFlcEd5mnkBCriMeB8Ac74A9kbljglQlJQSO5k5NKZrnKI6LsJj+r9cGF X-Received: by 2002:adf:e10f:: with SMTP id t15mr8578575wrz.331.1618841869709; Mon, 19 Apr 2021 07:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841869; cv=none; d=google.com; s=arc-20160816; b=ewNhunFNz5M/6HOlN+7HwQlgwp7b+oNv2WfEgwSwITU4uaz4Otjx5JMMbLrF9qp61Z ubtrT2o436LLzhgr8NPF8uH/ZsphH/JRMAmaDckJnDacvOug47YWy8pYDBxSWYnDicNL bWPNJCD1geqUUiWW/6uhP5E+01Y1yrsKoiesk2HPJAWHvvaEorwkbIbcS4PDWfMi24HC yavREFCmCpmrU2UQ9t/Hb+Z7YPaIvv7NYkHg7dq+Q1xexQDYxeTkkjX56o1FtSWa05dm ptmMQN3KTgZNtv1lD226DZJIr3ZFGCrI9mejAQwc09kacg5hhQwvB4ME1J7yAvjGUxhH LnzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=iuvIZNZf4f2lROo+qAmf/QTHZyyK3+OCjBsV5TZGvzI=; b=y3yyEmzDIzBkJc1WxxKRD1+1Fut4eDn0nvuTVEzpeIojnttMnh/vjSBYe9FA+3je6A xHl2ifiZWrx1AvmIf95IzwNMyRD2KaLO1NZUV2zXaPpP128LeE96FWZ5IGVDxM+L5bWW gekbR+5Ya7TMPIrMC4pWPR/j5pnB/55PjmJ9OpBt8rk9v0mDKCgYWcMLrxz+qPHJVWXI X5aYlMl3DDMeEpzp8Fdm/XBfge2RlkBDj/fsHtMRNLZwSReIAYpvg4T+Z2lnHIrOXjzO 2BLUOTQLf1S1V92Zlu5OOyeaOa0xOsxDwLwC5xM3mnRUlVcGOmGOArkUCcMTWopfUykp Z/lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=hBACRQHj; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w5si4071340edt.395.2021.04.19.07.17.49; Mon, 19 Apr 2021 07:17: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=@gmail.com header.s=20161025 header.b=hBACRQHj; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2A8246806EB; Mon, 19 Apr 2021 17:12:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 12DA56806EB for ; Mon, 19 Apr 2021 17:12:02 +0300 (EEST) Received: by mail-qt1-f176.google.com with SMTP id c6so26141874qtc.1 for ; Mon, 19 Apr 2021 07:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=G/pwkDvJivBEDXFbcpAH5SdgB+EXhQPnXE1f+wKWigI=; b=hBACRQHjXcEmIy5C6QlubIy8w0KHRvjlSlXXCJs18Ceq2t9mYFCzJtPYByiAdqIjjH WEVZl1xVOAQe1w018COTOg7jS0Rg/VLxbGh31RrkaIIyPLrfDYimJxKYd8TRuBhRmpaG 1ietslwdRgRA+DNyl0AQPEcR331MoHIeim/CTuLp4BC1kuXLbToDVLrNPaWK/f9wo+FC +inYEtSDZ7mqqKfNwrGoZacW3UW/tmGj8rQ9z8jOWO9aU2ictcD7vQYK+LlkPbK23kBY NxVpVkFghI3opZzQ4OkxbBHVA+YuesZ+4HMT+hJBuwxilCJ6dPmj5nBQf0lauJ+JW5g6 FEeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G/pwkDvJivBEDXFbcpAH5SdgB+EXhQPnXE1f+wKWigI=; b=iWplGnmV3sR1xgQOytBtlKZR1bd8pQxokiSyD+/+uUk83fPZ8rDbtQP+aR0BqPp3a1 22Jlb6bxA2lUgQStd+A4i0X7lv3NFJOBYlbpf+wemPkeBOCodEfCf9rr3FzUNm9XXchY +c2ZRF1Z/k45u3uYI4mqrYGdnSZ2fjhpE4IM3R4TAGsswI6q5TPqkkiDKzRNJcCazqDv GR2Xl1OLv43rp9+eRCsTxnnKvYT+hHl0B3DBc20xWQ1a33+RFE2DQ45HYLoJ75xbjEFX 7IayB2tnmpzO5yDPZnt+kchPBShkqklG3J42T8A9efwG3dq+tPGo1JXg4fcboX+CpwfX gt8A== X-Gm-Message-State: AOAM532TmvLQrmA/eMA5WXoq08TLLFtvVS0DqJKX+mjIt/hoETuJVubt PyO+CYLyvGm5zoK+LG0sARr8vGkGzNg= X-Received: by 2002:ac8:5704:: with SMTP id 4mr1676171qtw.379.1618841520714; Mon, 19 Apr 2021 07:12:00 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.11.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:00 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:46 -0300 Message-Id: <20210419141024.8174-50-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 49/87] avformat: Switch AVChapter.id to 64bits 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6fv08OW2hkQN From: Andreas Rheinhardt Announced in e318438f2f30525d8baca2b5683aa9898d0c56f7. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 4 ---- libavformat/internal.h | 4 ---- libavformat/matroskaenc.c | 4 ---- libavformat/utils.c | 4 ---- libavformat/version.h | 3 --- 5 files changed, 19 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 272370db2a..bb8ddef88d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1092,11 +1092,7 @@ typedef struct AVProgram { change dynamically at runtime. */ typedef struct AVChapter { -#if FF_API_CHAPTER_ID_INT - int id; ///< unique ID to identify the chapter -#else int64_t id; ///< unique ID to identify the chapter -#endif AVRational time_base; ///< time base in which the start/end timestamps are specified int64_t start, end; ///< chapter start/end time in time_base units AVDictionary *metadata; diff --git a/libavformat/internal.h b/libavformat/internal.h index a6987619f7..7d0eab44ac 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -579,11 +579,7 @@ void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance); * * @return AVChapter or NULL on error */ -#if FF_API_CHAPTER_ID_INT -AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, -#else AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base, -#endif int64_t start, int64_t end, const char *title); /** diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index b36e86ecb1..c3d895f931 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1671,11 +1671,7 @@ static int mkv_write_chapters(AVFormatContext *s) int64_t chapterstart = av_rescale_q(c->start, c->time_base, scale); int64_t chapterend = av_rescale_q(c->end, c->time_base, scale); const AVDictionaryEntry *t; -#if FF_API_CHAPTER_ID_INT - uint64_t uid = create_new_ids ? i + 1ULL : (uint32_t)c->id; -#else uint64_t uid = create_new_ids ? i + 1ULL : c->id; -#endif if (chapterstart < 0 || chapterstart > chapterend || chapterend < 0) { av_log(s, AV_LOG_ERROR, "Invalid chapter start (%"PRId64") or end (%"PRId64").\n", diff --git a/libavformat/utils.c b/libavformat/utils.c index ba664f6214..e36b75081f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4589,11 +4589,7 @@ AVProgram *av_new_program(AVFormatContext *ac, int id) return program; } -#if FF_API_CHAPTER_ID_INT -AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, -#else AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base, -#endif int64_t start, int64_t end, const char *title) { AVChapter *chapter = NULL; diff --git a/libavformat/version.h b/libavformat/version.h index 70ac403a53..e6b2807f22 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_CHAPTER_ID_INT -#define FF_API_CHAPTER_ID_INT (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_LAVF_PRIV_OPT #define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) #endif From patchwork Mon Apr 19 14:09:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27038 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp561263iob; Mon, 19 Apr 2021 07:18:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWDuSCOu+1/H6FX0oged4i31oRQOnN5ingXCqzjwRotGKjgmWjZ5xPTquONFYCscxql7L/ X-Received: by 2002:a5d:5444:: with SMTP id w4mr14516226wrv.202.1618841892022; Mon, 19 Apr 2021 07:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841892; cv=none; d=google.com; s=arc-20160816; b=fIDIsdsK7YauaLYrPaM8ULQrEPjIYhICSLJJrPBKDZRc3Eox77Wn/l9yl+Jkxet4my YdVB2r35ocbWwECHiKXcAXT0x1khmsgS3fF825f30b3nTq5G+X6tZD36+pusw6GBXZeq ZOrg/dK+LEUqgUiNtw6qgQ/TArblN72AIyd6ETcFaRdD+cZovG7tFkaklmnwQZIvfgLe vofzX/+zdHvqJhanKjAmqe5OMoL0wY8/RTk9vQiSx2D+5JIsGTZ59jfzsEvhDneHwMUv V6oR5rXlsDymKphTEdTmcwj6xrsFzvnMcnlfU4NSYhxAzNfRzAsRCOT77/iDRP51tj5q MXCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=mkn494zROKqVocrihqm4uf8vtcZRaPvL2yYOG+Y1GD4=; b=1CBg8e4rv7c0XQvY7jDC89+KY+vaaOf5p/1m2dFYdjWmyJl/WHRccUP8dhnhqu2uym MDV/F/dmqgfKIZnRiek6pypBPXXtinG2HdhwF53MyitqRPguVpzlu/whJwocwBM7Ynhl Pvuc3RvCHLP4xXjj/i2HP2GpNIOS+yC4U7QI9e/ZFEyJVtQhLgpABHGIPdgSUY2YMInq tCorYCQEc1pw8dgDFYhLgwQaYG3vPm87ltgJThmClLQmWGQk9sirVKAQgg+5wIC2J4m7 liUINtAf/yi+TCzX0lpEA2bVuEt7zlqSiHvQUlK5akQug59+cD1ewmFcG/vTU+ptcz5A vXOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Q0If1GEQ; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a3si13441312ejd.575.2021.04.19.07.18.11; Mon, 19 Apr 2021 07:18:12 -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=@gmail.com header.s=20161025 header.b=Q0If1GEQ; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 01761680867; Mon, 19 Apr 2021 17:12:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4717C689901 for ; Mon, 19 Apr 2021 17:12:03 +0300 (EEST) Received: by mail-qk1-f174.google.com with SMTP id e13so26003399qkl.6 for ; Mon, 19 Apr 2021 07:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4EsC+z21S9fSl1kTqpDckEaXLBeDzvebipiQCrc+9kA=; b=Q0If1GEQxjtRBmcxCXhltvsYlTCMChp3sRutFzFyuWtMEewTFZNUVO3yVuhwV/5GKg Ok5jlvplakeP058XpA2zdu2pq3PS3RYYwFVzhls6mR6jmUR91xtRRHZo/1jgMZVL568N U+2j7AEAdf3nukTECDsLMt1JxGepvs7/o/ICJUH2NH45DG4s2CL0elRvq5qFaJowmpSA ItHXBxSfTPgtXfyL1eXLb3hySTfqsftGG0ottAcG1tdu+pZVGcn7iKbwVbQXiulyNGGc X5GdfhiENAR1VnHxHsuXjzGgVSZ0JfeSbka2k5iTOYuYWcqR5lhFZwdDJi663/AujFU0 HhQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4EsC+z21S9fSl1kTqpDckEaXLBeDzvebipiQCrc+9kA=; b=UhjdfyaLJXwuJduMHzfi7gAgB6KsFY6b8i2RM9MJx+KHNj/KXKxTtKABFE0P0h7buh cJPe9L1Sxma1y9E82qbGqxagzZozBw11Ddx8JHHlrp4SDbUc7Nt/v37pcpS5uPm9CDNV AfLWL9Tcrlkh5BJ9iSWzTcSNdKbx9qucVh1oQ1x5kqhitlQjPcII0rBuU2la9ox8dv/H DarWCK+9/QeT3v7+lVIKPbjFK7vZTk+vQGQ3oIrVds8iKM8jyJHYfjhXD+cUP2YxSaa+ 7lwpyQfIIsgRrQ8nb3kZWJbweXXOoCB5KVLsbKgEDK8uAnpbqVuvCPNDxGUJj0V8SmEg jmGw== X-Gm-Message-State: AOAM5316fYb4dMp1RS/ZVHeo5zP8tqbOi3hqkgkd7UKkWBVyiZkcxseR 3NMtLVNISaiK3+Fo/7njlK5KswMG0nA= X-Received: by 2002:a37:6801:: with SMTP id d1mr3086706qkc.363.1618841521925; Mon, 19 Apr 2021 07:12:01 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:01 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:47 -0300 Message-Id: <20210419141024.8174-51-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 50/87] avfilter/avfilter: Remove compatibility code for old filter options 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4d1+I0w/+mBO From: Andreas Rheinhardt Added in ad7d972e08dddb1788ac6a434d1be314febcb09d; the old syntax has been deprecated in b439c992c23f3e0f3832fffd2a34a664b236c525. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 82 ++---------------------------------------- libavfilter/version.h | 3 -- 2 files changed, 3 insertions(+), 82 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 22ecad5f77..b3ad8d57b3 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -948,85 +948,9 @@ int avfilter_init_str(AVFilterContext *filter, const char *args) return AVERROR(EINVAL); } -#if FF_API_OLD_FILTER_OPTS_ERROR - if ( !strcmp(filter->filter->name, "format") || - !strcmp(filter->filter->name, "noformat") || - !strcmp(filter->filter->name, "frei0r") || - !strcmp(filter->filter->name, "frei0r_src") || - !strcmp(filter->filter->name, "ocv") || - !strcmp(filter->filter->name, "pan") || - !strcmp(filter->filter->name, "pp") || - !strcmp(filter->filter->name, "aevalsrc")) { - /* a hack for compatibility with the old syntax - * replace colons with |s */ - char *copy = av_strdup(args); - char *p = copy; - int nb_leading = 0; // number of leading colons to skip - int deprecated = 0; - - if (!copy) { - ret = AVERROR(ENOMEM); - goto fail; - } - - if (!strcmp(filter->filter->name, "frei0r") || - !strcmp(filter->filter->name, "ocv")) - nb_leading = 1; - else if (!strcmp(filter->filter->name, "frei0r_src")) - nb_leading = 3; - - while (nb_leading--) { - p = strchr(p, ':'); - if (!p) { - p = copy + strlen(copy); - break; - } - p++; - } - - deprecated = strchr(p, ':') != NULL; - - if (!strcmp(filter->filter->name, "aevalsrc")) { - deprecated = 0; - while ((p = strchr(p, ':')) && p[1] != ':') { - const char *epos = strchr(p + 1, '='); - const char *spos = strchr(p + 1, ':'); - const int next_token_is_opt = epos && (!spos || epos < spos); - if (next_token_is_opt) { - p++; - break; - } - /* next token does not contain a '=', assume a channel expression */ - deprecated = 1; - *p++ = '|'; - } - if (p && *p == ':') { // double sep '::' found - deprecated = 1; - memmove(p, p + 1, strlen(p)); - } - } else - while ((p = strchr(p, ':'))) - *p++ = '|'; - - if (deprecated) { - av_log(filter, AV_LOG_ERROR, "This syntax is deprecated. Use " - "'|' to separate the list items ('%s' instead of '%s')\n", - copy, args); - ret = AVERROR(EINVAL); - } else { - ret = process_options(filter, &options, copy); - } - av_freep(©); - - if (ret < 0) - goto fail; - } else -#endif - { - ret = process_options(filter, &options, args); - if (ret < 0) - goto fail; - } + ret = process_options(filter, &options, args); + if (ret < 0) + goto fail; } ret = avfilter_init_dict(filter, &options); diff --git a/libavfilter/version.h b/libavfilter/version.h index 18e1a95c72..fd38252411 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -50,9 +50,6 @@ * the public API and may change, break or disappear at any time. */ -#ifndef FF_API_OLD_FILTER_OPTS_ERROR -#define FF_API_OLD_FILTER_OPTS_ERROR (LIBAVFILTER_VERSION_MAJOR < 8) -#endif #ifndef FF_API_LAVR_OPTS #define FF_API_LAVR_OPTS (LIBAVFILTER_VERSION_MAJOR < 8) #endif From patchwork Mon Apr 19 14:09:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27045 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp561555iob; Mon, 19 Apr 2021 07:18:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbkuwSYe7H3aE0Q+K1ipXwvOhrdoR1BaTVVYoBVjx8HoB+EKZeBfgJ0fi4pWY5mJ3n3Nsd X-Received: by 2002:a17:906:3190:: with SMTP id 16mr22614590ejy.355.1618841915485; Mon, 19 Apr 2021 07:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841915; cv=none; d=google.com; s=arc-20160816; b=d7GIdbrEQituajKvcOwspGQaC/EowAwEDs89c6gn7Vuj4x0XMxq32rl0fZ9l0B6hmG gKVGEYxZ/d2LL7W6NBHvwJtEdJfGZ7C3afXrqR4sOY4G+tO6H+11nhWQwINVTB3UUPwt Md1hFLzcjMHInUpnjtkKQMGN26xstaUzbSju6g7Tuce/ISznJ+OEKP/FQcNFGVzgTx0j R5igRzGaHU8669FhH0Phzkjb7nxL4WCjcJyKR6Mh1aO087bQxt5uwlXQQWFF+fsDIZBc 6x/ijHeOZT9nGOklomVnQbo5WhatgLnb7oLj+HTb+h+5SDzeN19Idu72FVZ5yzjJv487 9GpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=EvXZW54FWYz6N2XCEFOKUYZQXhNtJLZ/uXtrufm+q2o=; b=CQJXm1sEsTc68j3uckFXwMdQOGwESbFusVSbXu7tFytEkUgZTJ2BmU6DN5DyfvJ7BF 6Z/uAVSqA8Jfo5oeYhaCD4RWGTfR6U0HWC24ZG3m6WxYUa8CI2yiUm0vFja8vzc0KvOW akd7WM0aoUAVme1zJ66X2r4KS74SJUMz6lCSAFUoAMpBXW06TN5bD118y8unZnLfoOlg fcY29tfMZi6N9qcmuNfI6HFZ8RiOsKwpwpLUGY8Scbct9nQ3JtnYtghB8uOTNH5m3HBu o440fEH+NmPNZrJ0Z208q0QeXMseJXlj5UpBB03vMTK7v7rbHthdtBF45/4lBTAutuVD Qe1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uKuPY63P; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ia20si11928654ejc.108.2021.04.19.07.18.35; Mon, 19 Apr 2021 07:18:35 -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=@gmail.com header.s=20161025 header.b=uKuPY63P; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 076E16899E4; Mon, 19 Apr 2021 17:12:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 580FC689902 for ; Mon, 19 Apr 2021 17:12:04 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id h13so17167647qka.2 for ; Mon, 19 Apr 2021 07:12:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=OMWwqrOJwFjgBg6ExApkq2o1YiuIekXvw2DUOtI374U=; b=uKuPY63POJFg8RTMY8aC1zeDws9UvdIZBO4pCW60kqnDd0jO9ar++pvvpShwQIibpQ Ut7YKkufaCxxQSfIjIJpR1s1XLRH7SIHj7YV5+A/IKDaGwEhvWV3WLy7DANb3s+hrjl+ itNG7sA8KwrE9UgLUg3cafcb/5HpF+zBZ4amgWuN6Bkl9hds0z3Q2dMqS9KXXSUbXwAk DB2bxsr9TC8sXYmzCwMU6sDOCuB0fpo/RdaxIs5rDX2Mb5PA7oHHCMTWlPmQmoP25YPm hyPQRM/4TIsAebcbqckdo7CvPJknkHszGkn1Ba+2PtoaLNOzBiYFclcjh5GhGLqgEAOl 941w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OMWwqrOJwFjgBg6ExApkq2o1YiuIekXvw2DUOtI374U=; b=Rw01Z0PZlFO+g7y4pzc1g8aU35vfUDQN6Se5qK9gMaisbh2TFP2GwgQ/2mwDu3l1lZ ayUlkr4HqJig5E6Jfz5JmxQcqYvnkaSBSr9pog5NXGyjpMPVXUf3yZ7Pn4kr4x9+4jYq aq6N7LxPR+UnEQ+ZtBjqzZ6jD+J4qjxaqy6rp4dXG0cAu1T0Mx+qgpIaZyvO8muwBVxA hnr1v7vrOURPnpN5MegYGodwrZP2/9GVy9Z4yB7QkdGXgPQFoh6Z0eyT82sjaijf6QmF MhAJWLNJ0TFnJntgidKwd8cQFzQnGqBqmASjmS9jVJXlr9ZXxvIOV338PLXvsJIsRKsv 90fw== X-Gm-Message-State: AOAM532asMDZAYx8fglbK6ihTuwM8CNOPvvzTUAqWylJ3lU1RRq6NW0+ bjs4jx27csfxlZgZ67hWTPqQ8HpkddA= X-Received: by 2002:a37:a68c:: with SMTP id p134mr8428213qke.451.1618841523049; Mon, 19 Apr 2021 07:12:03 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:02 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:48 -0300 Message-Id: <20210419141024.8174-52-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 51/87] avfilter: Remove deprecated resample_lavr_opts 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: q754p3f/AAgY From: Andreas Rheinhardt Deprecated in 3796fb2692f87d0000fc0aa4572ac025a6469c2b. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.h | 3 --- libavfilter/avfiltergraph.c | 3 --- libavfilter/version.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index be1242436b..b5e092f8bc 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -853,9 +853,6 @@ typedef struct AVFilterGraph { unsigned nb_filters; char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters -#if FF_API_LAVR_OPTS - attribute_deprecated char *resample_lavr_opts; ///< libavresample options to use for the auto-inserted resample filters -#endif /** * Type of multithreading allowed for filters in this graph. A combination diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index f6b572b3de..ed54d3dc11 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -131,9 +131,6 @@ void avfilter_graph_free(AVFilterGraph **graph) av_freep(&(*graph)->scale_sws_opts); av_freep(&(*graph)->aresample_swr_opts); -#if FF_API_LAVR_OPTS - av_freep(&(*graph)->resample_lavr_opts); -#endif av_freep(&(*graph)->filters); av_freep(&(*graph)->internal); av_freep(graph); diff --git a/libavfilter/version.h b/libavfilter/version.h index fd38252411..ba9ff5f633 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -50,9 +50,6 @@ * the public API and may change, break or disappear at any time. */ -#ifndef FF_API_LAVR_OPTS -#define FF_API_LAVR_OPTS (LIBAVFILTER_VERSION_MAJOR < 8) -#endif #ifndef FF_API_FILTER_GET_SET #define FF_API_FILTER_GET_SET (LIBAVFILTER_VERSION_MAJOR < 8) #endif From patchwork Mon Apr 19 14:09:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27031 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp561862iob; Mon, 19 Apr 2021 07:18:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQe1j7JWg0vTbVKPFzgEHu9A+YH0+6lnz7jRpuT/GG9stZse4u91RXChLO1+/ASBqAhpku X-Received: by 2002:a17:906:b251:: with SMTP id ce17mr22602917ejb.333.1618841937947; Mon, 19 Apr 2021 07:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841937; cv=none; d=google.com; s=arc-20160816; b=EcDetynuFL0/S6B4ZbDVKRIQUQWIJNwNV3e5snJan5274qjc/XPq6/5LghZLbgFvL6 abCEiGvh0wPdV9uf7hw4esw19fC54bSQcYgW8XTWx7r/RDw1xXN+WhdbaIWD0B/haXA5 wmGpEJ80vuk/IyCALITbbUEQvZjk9F/bVPfL6RZjrh0qYhV1gvgW40FMtEcyr7Yq1iR4 CbtIhj94XoUwGahz8I2RrEwwfgGI54bMJC9m+FFVYQ3Y8k0nEBK0YY6PyHmm8QJ4b2OJ 6ND/xBCVItdS7+QLdhaz6hUKJZMhulPqTxMItXlg+V6Txyv9OcRheuJLcQKzMi83Idle 4cRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=zNJ3wTtLATaDXwm1TDFbfhcAHbJuCx25YQbmioISqfE=; b=H1N7WHMb+stXdIq89ML+d52Fzppf3FVHXaDoJmJyiyL9NPa8zL0/RApZxULsr/LYFF KjmzRLU9qPbOIivSRZSVcZBY5pLVgGjr1JpJE9xSTV/P1hvNRFVrh9TKtu3aV3Kvxd69 rAzMw5I56EXGF8wvaMCZZCSAyN1NzrLvNUpCqG/F/WYK4yZhCo+oich/unpwSyaQHyh2 pY6pGm5oKtG8CfTyp7iNTW+r+Bp9vJ27TFd3RV5d8Bi3dxZeJb3WcVPLjcl0ncREHetr mwLNyjtuZxSuuyo55wbdk9Pmwkz1+hRTnCtwSZo6bUyObMtKR2fK6Rb6DAQ2De0k3ViC Fygw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="HX5Cm/WT"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dn3si7108719ejc.198.2021.04.19.07.18.57; Mon, 19 Apr 2021 07:18:57 -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=@gmail.com header.s=20161025 header.b="HX5Cm/WT"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A934C689A0D; Mon, 19 Apr 2021 17:12:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5B0A2689966 for ; Mon, 19 Apr 2021 17:12:05 +0300 (EEST) Received: by mail-qk1-f175.google.com with SMTP id o5so35881840qkb.0 for ; Mon, 19 Apr 2021 07:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FrpRs7MAjjTmilw7uU+Wd35gA0vE+j7u8KzqRJdHnxQ=; b=HX5Cm/WTkQbkemyw0T7WmjN8XtwKsK8abYu00DxWGDXsdlWrJP0T8tMttio7ysqAOr DMdMizI/c5dKQ9Y8mHnFnoA8ssfZyAqvq8Nt9BTcjsPJ26r3wMGVog4zwdMbor6DVk5j thj5NGKjSNFvAKHTCKx6Icw938GAQRzMWjjSF/MgoaDE1I/hc7EcYReajiNBcSrB4jsZ Zxh81e46C3MZZICJ63na9t+a5GAh/jVg5FPV5FEOGxOXhDRjEzTRVf3NqNEnim8DVcn+ EEj/b8O0+zWAgXYtayr221tifuIDpRmM+wLq6Vn2UWjP/qyJveAsawijXcu7+w9OQ4NB 1bZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FrpRs7MAjjTmilw7uU+Wd35gA0vE+j7u8KzqRJdHnxQ=; b=tyLC6zVzY/XTYSkEKsTuE3d3SojJGSFTmXQ88OOqKeI0wWpXW11lPMa8r/3spg15e6 uwppSDwNA4XBynOwR1GyDN2AMjjEW6l38w5Eedy4pwaVN8h0j7jp28IFLsffgrLcJt+a ZTBXNspC7o2dtmVpr5fK42b5mUk3OyCqy6lkcgPfU4ZEzDxr+jy+bJtiWUcmCuwyJIZB 0kKIOeBG7aN65rmXv0IOs2zwmdgUn9P6SaB0WFwmYuu+K6rNQs+5Ycjn8+Cl120fosEj Bb65aL/dd8zJJ8j2dA79kPhYp2zcGmnMZ/ro9BUxWjNHRIC3IrGpUSQTd+hF+thSo5MB yEKA== X-Gm-Message-State: AOAM533zE6SkZCpfPeG7X8n0JQpj+HFZBvz6RiPjSKXDlZRU9nKJ8Vgc E7mIBbjinfqxNMdfBDaP2ZVyNAM9Cts= X-Received: by 2002:a05:620a:1196:: with SMTP id b22mr11756417qkk.159.1618841524112; Mon, 19 Apr 2021 07:12:04 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:03 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:49 -0300 Message-Id: <20210419141024.8174-53-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 52/87] avfilter: Remove deprecated avfilter_link_get_channels 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: bg7+ubw5YLRw From: Andreas Rheinhardt Deprecated in b2c42fc6dc3502a8b6cae441c54d898972a51cff. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 7 ------- libavfilter/avfilter.h | 8 -------- libavfilter/version.h | 3 --- 3 files changed, 18 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index b3ad8d57b3..c0453be4de 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -183,13 +183,6 @@ void avfilter_link_free(AVFilterLink **link) av_freep(link); } -#if FF_API_FILTER_GET_SET -int avfilter_link_get_channels(AVFilterLink *link) -{ - return link->channels; -} -#endif - void ff_filter_set_ready(AVFilterContext *filter, unsigned priority) { filter->ready = FFMAX(filter->ready, priority); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index b5e092f8bc..6e4b2464c5 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -673,14 +673,6 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, */ void avfilter_link_free(AVFilterLink **link); -#if FF_API_FILTER_GET_SET -/** - * Get the number of channels of a link. - * @deprecated Use av_buffersink_get_channels() - */ -attribute_deprecated -int avfilter_link_get_channels(AVFilterLink *link); -#endif #if FF_API_FILTER_LINK_SET_CLOSED /** * Set the closed field of a link. diff --git a/libavfilter/version.h b/libavfilter/version.h index ba9ff5f633..bbadb00f0d 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -50,9 +50,6 @@ * the public API and may change, break or disappear at any time. */ -#ifndef FF_API_FILTER_GET_SET -#define FF_API_FILTER_GET_SET (LIBAVFILTER_VERSION_MAJOR < 8) -#endif #ifndef FF_API_SWS_PARAM_OPTION #define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 8) #endif From patchwork Mon Apr 19 14:09:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27142 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1098108yba; Mon, 19 Apr 2021 07:19:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWmtM0RjYEifAd0OsKzIPcDWJHUjjyUOv5gn/uon1aeWdv/aREUI6+9M+gi6yC6Er/uuZl X-Received: by 2002:a05:6402:34cd:: with SMTP id w13mr26193851edc.73.1618841965143; Mon, 19 Apr 2021 07:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841965; cv=none; d=google.com; s=arc-20160816; b=EO8IlYT3G/gytVOPoLanRTkUQQ2SglXH/WJ09QOEQLmkbF9trQvuxKF3a8xD3TSlhG B3tCyQkkwITpWPX0FkRS8DQ5k4DKOEOA9lDwOhe+pvCwgZbvNyrgS2Y+JkQLrVrAlBpA 9QqIWCf1hY3BU6c0YcmkA467u9JVDaIgHNEwDbis41cNgoxCg9X6Xp4sETVbA6nzF9vt e7xZ/jPWZrKcUyg6nk1vuGQz8Mu23GGRV3i0VaQxnBpJKrRw7yihpNJie0dYmJv7/BXl 6eE/HrLExT5Ae01GaCqOOipCaIMbmKGizJWh1rlDOhQTY8duFjB9K8GMQm2/a2l9jhS+ 5ExA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=tehfE+bpWv/xszziRbYEIJAbJCL8FU/ymzfxIs6opfE=; b=ynhXOau6+GHP8XdEG+81UMbEbZxMIZ6GMpiEv0kALuZtSfI/v09MpJwt2HNEsS8VHb KfKv3QbP6Dxo4Drk50LQ6wQ0FCclwiLTe6KbPfUIfzyBsHCnowgw5BtNDnt6FlEmUftK GrHqM2CsxlrSsuRvVd1TUe+4aqScrCpMCV0dUkcFiWv+I1ogR4WpflBGieaOBYCAUKRq mdXseWsZBbaVTlwbRfLom5W0sFDSWtyeesfO6U+cvjStYsbzSJw77rcL8Uk01MDVr/qS ivUPDQDMkEI9NdsS+u0DhcKh5mwa6XH3wbobXK2nEg+l9KeG6kNg0bquwNjhLE/lJDam Wg0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=d96M7IKP; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x13si11864923eju.369.2021.04.19.07.19.18; Mon, 19 Apr 2021 07:19:25 -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=@gmail.com header.s=20161025 header.b=d96M7IKP; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 508C3689A61; Mon, 19 Apr 2021 17:12:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8193C68993B for ; Mon, 19 Apr 2021 17:12:06 +0300 (EEST) Received: by mail-qv1-f42.google.com with SMTP id dp18so12294113qvb.5 for ; Mon, 19 Apr 2021 07:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=BnyvaDuGNlOQqu5PSkFlg8TkBLSDcOHF2k9oZXP40dg=; b=d96M7IKPyJjkdDG23+IBJoDHmP+mjgvjXQwcMGofHx0FrJgRRc4m1OqjQihKLCJc1g /nlT1BXyR/zu1qMRL0YJhrJv1aliGcbW5UXqWb5bkh7v7LAuQeyXfkM7710W9h1o0pVf HTPbhtnaUJAEfPzgHc5aI5K3C+dRG9K3NBN2XPwgDbdPIqR2ub/yVxjq5qBOwJE/9Hor reH5Khi3P9UnuTgJhRAU0X17AaZ4BUjFjYJbmcLz5DEryT28T3Q+vvED2T7wQbsf/FJx iFvefxuCLSFKCAwpsO3wcZbId0vZpypF03U9kpBzkbxn3WCeSzdPBJAnO1xDhZO3rwtT u3yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BnyvaDuGNlOQqu5PSkFlg8TkBLSDcOHF2k9oZXP40dg=; b=t2TOn1BbTKBXQmsFZRrCU5/sUGOlatyAZWTEb+qDO/qn3xuwGQRZrE/W5Wrk2mDQGG xkfEg6LgkQZajDrIvifQ3LkNKhC9+KQANWwjoLCU8vMFcOQzjIS3vxhnWxefXejTLWXN anPtxg3Joy+QGkrUdLWgG/yjOya2F4yW+Wq4kmC4jHbiPDqAVJO0mkLCf7wwcY8rj3tn IGBF2MW5APYCfu5Tax3OF1wlh96gtnW5/nL8WTrn5pGiPI+8C8Jv4pDOGxIjcDLxVP1m tSfWM5b9YuLrpp8TfiqZhsvFhpk3tbAd+DkmfIhs5djswE0ZOYgV/wXHaXFBbE9P4FEd ELqw== X-Gm-Message-State: AOAM531sL/8SL43AXzLxo7gtHj5bf1i8NNh9vgDQCSmZwCRJ77EQjzGg H3SWdzOIQRi6dL0XEK5IgBYs9GGP+aM= X-Received: by 2002:a05:6214:da7:: with SMTP id h7mr4462624qvh.48.1618841525212; Mon, 19 Apr 2021 07:12:05 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:04 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:50 -0300 Message-Id: <20210419141024.8174-54-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 53/87] avfilter: Remove avfilter_next/avfilter_register 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: geqn3OSsaCWa Content-Length: 3843 From: Andreas Rheinhardt Deprecated in 8f1382f80e0d4184c54c14afdda6482f050fbba7. Signed-off-by: Andreas Rheinhardt --- libavfilter/allfilters.c | 38 -------------------------------------- libavfilter/avfilter.h | 35 ----------------------------------- libavfilter/version.h | 3 --- 3 files changed, 76 deletions(-) diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 0d2bf7bbee..7dbd1fb1dd 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -557,41 +557,3 @@ const AVFilter *avfilter_get_by_name(const char *name) return NULL; } - - -#if FF_API_NEXT -FF_DISABLE_DEPRECATION_WARNINGS -static AVOnce av_filter_next_init = AV_ONCE_INIT; - -static void av_filter_init_next(void) -{ - AVFilter *prev = NULL, *p; - void *i = 0; - while ((p = (AVFilter*)av_filter_iterate(&i))) { - if (prev) - prev->next = p; - prev = p; - } -} - -void avfilter_register_all(void) -{ - ff_thread_once(&av_filter_next_init, av_filter_init_next); -} - -int avfilter_register(AVFilter *filter) -{ - ff_thread_once(&av_filter_next_init, av_filter_init_next); - - return 0; -} - -const AVFilter *avfilter_next(const AVFilter *prev) -{ - ff_thread_once(&av_filter_next_init, av_filter_init_next); - - return prev ? prev->next : filter_list[0]; -} - -FF_ENABLE_DEPRECATION_WARNINGS -#endif diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 6e4b2464c5..54fa656b01 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -286,14 +286,6 @@ typedef struct AVFilter { int flags_internal; ///< Additional flags for avfilter internal use only. -#if FF_API_NEXT - /** - * Used by the filter registration system. Must not be touched by any other - * code. - */ - struct AVFilter *next; -#endif - /** * Make the filter instance process a command. * @@ -710,33 +702,6 @@ int avfilter_process_command(AVFilterContext *filter, const char *cmd, const cha */ const AVFilter *av_filter_iterate(void **opaque); -#if FF_API_NEXT -/** Initialize the filter system. Register all builtin filters. */ -attribute_deprecated -void avfilter_register_all(void); - -/** - * Register a filter. This is only needed if you plan to use - * avfilter_get_by_name later to lookup the AVFilter structure by name. A - * filter can still by instantiated with avfilter_graph_alloc_filter even if it - * is not registered. - * - * @param filter the filter to register - * @return 0 if the registration was successful, a negative value - * otherwise - */ -attribute_deprecated -int avfilter_register(AVFilter *filter); - -/** - * Iterate over all registered filters. - * @return If prev is non-NULL, next registered filter after prev or NULL if - * prev is the last filter. If prev is NULL, return the first registered filter. - */ -attribute_deprecated -const AVFilter *avfilter_next(const AVFilter *prev); -#endif - /** * Get a filter definition matching the given name. * diff --git a/libavfilter/version.h b/libavfilter/version.h index bbadb00f0d..68923e4bd4 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -53,9 +53,6 @@ #ifndef FF_API_SWS_PARAM_OPTION #define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 8) #endif -#ifndef FF_API_NEXT -#define FF_API_NEXT (LIBAVFILTER_VERSION_MAJOR < 8) -#endif #ifndef FF_API_FILTER_LINK_SET_CLOSED #define FF_API_FILTER_LINK_SET_CLOSED (LIBAVFILTER_VERSION_MAJOR < 8) #endif From patchwork Mon Apr 19 14:09:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27041 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp561070iob; Mon, 19 Apr 2021 07:18:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx01bUKYlvXe2n8SegzE+lHtYLowynikl2EBUSESkK0GUKdXZ7ykULivohFJL/YO6ClZmNs X-Received: by 2002:a17:906:48c6:: with SMTP id d6mr9682201ejt.376.1618841880372; Mon, 19 Apr 2021 07:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841880; cv=none; d=google.com; s=arc-20160816; b=L7Prb5Tu5J6QasdrOBVhcgHJ+92CwCY9WYScFDeldJYS6XuPGqJE2cvufRb9shvUMB 1wOeY0HrTaf7QBBRwfWSZW30Nxrz5qYswTslnUdLozKmWsMkXt1Xfy7lu/pYJB39ESf9 Ga/OcVjJLDbhcsrS/Oib4aZcEn9ZQXsDt8B/aLSU9QkMCwtvrj08gciDW9g2YOr4kaWV S7iPGvtcMTgdZJsC5B6eYEQ9de9zgNn9El0pLv6Y4GoFqSHUFv2gpJyg4cPGe0m5FqBK DEL0/jMpAVIJVA/lzNZCU6UmQavIk9QZ6kjqYNjRNM3BIWnzFiPr7a4qC2eC/ypUdPBU wehw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=RJ/n7wi6EQ0EcKlWedAozHrgRKFYJxaZSHzMt8uq79s=; b=EcFkWGPvHZBXmwhUhQMm9/bltiT7eEbMUBjo8iJWLXmx3tK/i1Ir+n+CrM2zseFQ7c cxOh5hp5OvluK5CbWsqVd0kx3mazX07qUY5hAtuS/F9wBMQrKIhtP1xeqsTQTrueKJPL dT9l9jeEGeK8eVQmn+kfOTtjWu0uc31mWJN2ot1OZhFGJZ8MxxUeS+A2sowqJmJUbz2r zPBOJrKN1Iy44pEttZbZdNImwHioh/fOMAV15ZBVjeB0x7xZRVzjOFyWQOt6HnwaCyl7 DkCzgcpPa71vkry25PebwNdtugvtYK5FSUyGCdSgz1/pBv/PHLTvAbHon8x2/AV+hoxh Fmhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="pV/S2NP0"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y19si1613113eda.399.2021.04.19.07.18.00; Mon, 19 Apr 2021 07:18: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=@gmail.com header.s=20161025 header.b="pV/S2NP0"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 28C06689965; Mon, 19 Apr 2021 17:12:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D1C6689901 for ; Mon, 19 Apr 2021 17:12:07 +0300 (EEST) Received: by mail-qv1-f48.google.com with SMTP id er3so8416286qvb.6 for ; Mon, 19 Apr 2021 07:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cyAg/X/3CHeo1+SI4ly26gkqpjhEoh8QpDEvKKsW4Rw=; b=pV/S2NP0CaQRNJ1dGl8RqwQlcqcRIkLdgcv2n/Kb5ckno/ZViM2Vk/ROkRROSR1njR q6Z9xh5Mm6ICDBv+61afENGck4Kc3T+ElnJP14bQ1BQdvwow8SSdPNsgQ6PBUAfN8v8P ptfuaFZaaVDShfbWSOsuJFMdIDADaJmGHeRk+qP4Cs7BMtyPgyY4X0zNcl9gRkuf3yET 7cTbxAFJQrPDjNLxFGbmfgfqSuggdtm5JRJi+0k/93sbaOViHbLdP1olDYc2vfIYYb+/ AT4M6V0h9cHvDphNSE0K9Q3yuY7y41WQ3E/sOI/4SfFSef1bdtYfnb9BxrNo3zsldhQI im5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cyAg/X/3CHeo1+SI4ly26gkqpjhEoh8QpDEvKKsW4Rw=; b=YA22PzExfo2FlbqBIpxyNAK5RZTBUQMYSWo0SncWYSUFWfZq27ebuSq5DzZhEdjj5s or9a/Qo5/e9QO8eMdknijEYVFca5C5bLiV3sT0DrBkAwJrolwn/bKcGIrDdOmiG7Un5Y ZpQDulkIbyawYRdAY6x3R/8rfw6o9aEXuczuq67f6YVsbzyl3PabWzDTfqoEEDVexgvU 6EeKOf8iOQgbT9Lf6p30w7Cs/QTjqgudfrwzXFyGQAinJ2Zc4k+dZMJGNB/t9Xn4fGcW 4jffYFjx5gj+DJzG0lHpg8qeX+BeqAVrkSqS9GO+OMxUb2Yj//pLJj9XBTW/1FfQg5qQ 0lKA== X-Gm-Message-State: AOAM533ZADe5yeElErbQ+HSJYGbAm1Wpvzroo+6Rzq5faTgyFngyEtW0 mpPoNx70Sf2ds5YWoAn1DvIbkZiUgx0= X-Received: by 2002:a05:6214:1d0c:: with SMTP id e12mr21805258qvd.0.1618841526294; Mon, 19 Apr 2021 07:12:06 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:06 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:51 -0300 Message-Id: <20210419141024.8174-55-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 54/87] avfilter/avfilter: Remove deprecated avfilter_link_set_closed() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yT+oHOGxi0IK From: Andreas Rheinhardt Deprecated in 39a09e995d32d16e4f8c87a6ff5273cb9d98146e. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 6 ------ libavfilter/avfilter.h | 9 --------- libavfilter/version.h | 3 --- 3 files changed, 18 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index c0453be4de..6e12c8fa05 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -225,12 +225,6 @@ void ff_avfilter_link_set_out_status(AVFilterLink *link, int status, int64_t pts ff_filter_set_ready(link->src, 200); } -#if FF_API_FILTER_LINK_SET_CLOSED -void avfilter_link_set_closed(AVFilterLink *link, int closed) -{ - ff_avfilter_link_set_out_status(link, closed ? AVERROR_EOF : 0, AV_NOPTS_VALUE); -} -#endif int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx) { diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 54fa656b01..b82f72d040 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -665,15 +665,6 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, */ void avfilter_link_free(AVFilterLink **link); -#if FF_API_FILTER_LINK_SET_CLOSED -/** - * Set the closed field of a link. - * @deprecated applications are not supposed to mess with links, they should - * close the sinks. - */ -attribute_deprecated -void avfilter_link_set_closed(AVFilterLink *link, int closed); -#endif /** * Negotiate the media format, dimensions, etc of all inputs to a filter. * diff --git a/libavfilter/version.h b/libavfilter/version.h index 68923e4bd4..ebac663e0d 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -53,9 +53,6 @@ #ifndef FF_API_SWS_PARAM_OPTION #define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 8) #endif -#ifndef FF_API_FILTER_LINK_SET_CLOSED -#define FF_API_FILTER_LINK_SET_CLOSED (LIBAVFILTER_VERSION_MAJOR < 8) -#endif #ifndef FF_API_BUFFERSINK_ALLOC #define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) #endif From patchwork Mon Apr 19 14:09:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27035 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp561400iob; Mon, 19 Apr 2021 07:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5tAArHs4Tr1ta7dTpHDJ73jLu05p65tf5bQKULCCdVVCTz9AHf80c2bjKNvIxbU71yjT3 X-Received: by 2002:a05:6402:280c:: with SMTP id h12mr25441609ede.332.1618841903709; Mon, 19 Apr 2021 07:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841903; cv=none; d=google.com; s=arc-20160816; b=WLoOrtbV/D6j3zOf0pe1U8SwPQ/5/aa8GVc5JR+Lg/mj4u4dg08suuyRiiqNZL3PCh z7yl+Bg24zKQQEmqZYqkoOWBgtV+6UIgo2DUuH+J+39TNSMN4uyADyu/4tEfXUbAXEed GK+TEy1I5RU+P5Jzoqu2YXeZ8Uqcr/bJB2chZDoiEv3PLPc6OHjSx7Td6I3vHDpodbdR Lgsoh01JABCnFNgBWLyXqmvw9yYhpfj0apwpeRGv0oSTgLAoutuTzVjDgtEDUDNPPWtm njsmE48mjHFLEbVY10ho46I9GghGUuFZ0URAkJxcXo9OEdquP6fw0PSOS1ocEbvsORGw tnLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=HaWdKvVWgcm7ces2ZZfUtSfLnCK/rabtGxMyYqHoSbw=; b=z7opF8L8v9CtELERUAu/+S4CaI4mu5E9OYU9o9sFPcjB+GazJeg29r0cmxAyjqGpE2 MK1Rmqsj+l0D9XdaOCZUNgGxWbF3be8CPttZTauf9ZY+qHcSE6pN/RbWSaR0AIpYUnD7 Sh2CXqmw66LrCUWIP9PmeVQud8MQi98ASNF9nlEoFTwLJM7PkqDAdHq1Bp8Gv5DlQcwn uDIUkXz7qZJ2TyX52q8z0rFJ0QI+XAzJ9wy7gkCe33Zi+MBrydMhJsK9fOMo3RLPLrTG aV2l3JsOnyE0is7ZckP6r9yXosJw3cSJ7FCzMp4/BuVAf+ElYgVgo4HLSoheKiwmmx2t md/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Z70GXyN2; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id kq15si12398231ejb.556.2021.04.19.07.18.23; Mon, 19 Apr 2021 07:18:23 -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=@gmail.com header.s=20161025 header.b=Z70GXyN2; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BC776899A7; Mon, 19 Apr 2021 17:12:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B612068993C for ; Mon, 19 Apr 2021 17:12:08 +0300 (EEST) Received: by mail-qk1-f177.google.com with SMTP id o5so35882091qkb.0 for ; Mon, 19 Apr 2021 07:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=re/MsFgQtTRLgPblW4qmKtHIqOS0RxpIOzUw3lO0HQo=; b=Z70GXyN2UQm0RoMqqeMRfjzyNX8vPk/NUs1ijpGYgcby0EMNKkfzSOKIPJmbYeW+bg fsx/sq8K05lPTJQ8r7IQhEMF41tWYpxc/OVWt+8pBTXIGgNcoD7pGVEzVQMjj18zcq14 60ih58AgvJnDvSToAoA7kaJkPkMO3CK/DdQ0QynC3CgSK9WY+B6WFwvxmu5wfG0PV80z 7RsGzQ3LsXqxnJBymRYAYbjFwj3Gk6o/nkMq2gfrA8sINRD+PH+Sd8rGyuQrCdR7H6Tr F/mouvNT9c9lRqbz3PwUuW739ckOO9Qy5Bw9qagKhUoppAdmLiroP4odk//H8RFmI49d k6+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=re/MsFgQtTRLgPblW4qmKtHIqOS0RxpIOzUw3lO0HQo=; b=EI05S2VYptqIe25+SfJYqhX6pUsEuuCwFsfQb0XYbdz6R0mSMy26O1c7zN5ua/r21+ 0zNMoTyk9N7k8l07hVp2YpBi7+A49hIIJz2ptQe65nPQ4LrVH5Bk6LSscRNcE4YDSqmI eGDQaskqFgFr+PZjgWS/h9L11XGzPDD8Fn3z1ZXTulyxSrR3Nw8RSKmmbhJPaQ8q2JmG 6II6253A7nUWCjv/Ugad2YVP6qXYt1PhdyGWhq92EeS0voXEhYjCQZNE4wZ35kqQk2Cc VW8d3HcVIP97egRH/fmPX8WCEY2yVeDVthWuKDUjVKXrOnpB6AkGulOQgqy6Rcwg4UcN TPaw== X-Gm-Message-State: AOAM532kXyI5Me3ocYvsBCSJ8OI2gpb74PlpiDo3x7D6UT7kPyVqae/c ta6p/6s9LhJW4vHswX5jHnOPKcIktcU= X-Received: by 2002:a05:620a:66a:: with SMTP id a10mr7143299qkh.272.1618841527398; Mon, 19 Apr 2021 07:12:07 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:07 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:52 -0300 Message-Id: <20210419141024.8174-56-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 55/87] avfilter/formats: Remove avfilter_make_format64_list() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: PvuMhI7hjXdZ From: Andreas Rheinhardt The API it is part of has been made private long ago (see commit b74a1da49db5ebed51aceae6cacc2329288a92c1). Signed-off-by: Andreas Rheinhardt --- libavfilter/formats.c | 7 ------- libavfilter/formats.h | 4 ---- 2 files changed, 11 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 713173e707..6c05b118c9 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -304,13 +304,6 @@ AVFilterChannelLayouts *ff_make_format64_list(const int64_t *fmts) return formats; } -#if LIBAVFILTER_VERSION_MAJOR < 8 -AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts) -{ - return ff_make_format64_list(fmts); -} -#endif - #define ADD_FORMAT(f, fmt, unref_fn, type, list, nb) \ do { \ type *fmts; \ diff --git a/libavfilter/formats.h b/libavfilter/formats.h index 0520bf42a9..3a6044971b 100644 --- a/libavfilter/formats.h +++ b/libavfilter/formats.h @@ -157,10 +157,6 @@ AVFilterChannelLayouts *ff_all_channel_counts(void); av_warn_unused_result AVFilterChannelLayouts *ff_make_format64_list(const int64_t *fmts); -#if LIBAVFILTER_VERSION_MAJOR < 8 -AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts); -#endif - /** * A helper for query_formats() which sets all links to the same list of channel * layouts/sample rates. If there are no links hooked to this filter, the list From patchwork Mon Apr 19 14:09:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27042 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp561717iob; Mon, 19 Apr 2021 07:18:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI2ZIApt8/jucj1UKjc2GuJl6OlGmgMyiADj3QzscoAZd/ZjN4BhN0i2zPn/kypIPHR3JA X-Received: by 2002:a17:907:20f0:: with SMTP id rh16mr23452803ejb.320.1618841927096; Mon, 19 Apr 2021 07:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841927; cv=none; d=google.com; s=arc-20160816; b=Boa0PABbfM1PPgF0H8WcqdsQBojwYAIvhZo9GEYeRit9UXFIMzFcFkoWmz3Buw3B9t tQja5jePRZcu0wb1MGB5Hf8OC9mc3LEPv0IT2EoWaXcJgWhxRWdXb5ysA4wX8qcgx0OX DL/fJYFsyZYNo8eJLvB1asH6YBwx65u3we1m2kUYS5dul4C3yDELoVpQNrwLjN/nb5ev 9kFLWAM8B5KwVlNN+xSeyL8xLk5U04nryB8mJzD315xo9Mv8+tJQu77Fa4tW4MPB3MeE SFI8ZJvqWwEcm0+c+nQWUoXfafKBhiOLaQgvXOwWWwfQ9Jl0nd0A9kOW8O4bPIbmTJD5 3YvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=Yl6uRITgRVd5jKX3VFHc/EV/yOkVP9ssrilb9uTofHE=; b=hL/KEYzuLD6MDiL6+JlR+gppexL/qLNXJPi4HigWjUugi4elKu/QIkAoOCxMRgoT97 te0X+kvMSg8gd3zNINtVTybgsTE79CNgIiC+qqKpsybIG6UrXucBK2QAe3hOknOQOB1y uuFFRQt4mSVgyQjo69DpRS2O539L1DY+Vkc3Pb2AY3H/3+CYxsm5z0YVBOBQh4aNp4l0 SHJ8Cbl35TUoOkxE2oQvcwxzzGmr8tN+Z1OAQ0/eBeUdiueRNb9WZVY0/GnQDACLunql sbbtPcYuz1ZMF2Qj7Lot4Ngtqp9HnKpcx46OjcOODg1A+s2cpdZ2gDvNRagLyQmAOjrA 8Z+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cFlNOHo4; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o16si1665783edc.1.2021.04.19.07.18.46; Mon, 19 Apr 2021 07:18:47 -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=@gmail.com header.s=20161025 header.b=cFlNOHo4; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CCF156899EC; Mon, 19 Apr 2021 17:12:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 422E768995F for ; Mon, 19 Apr 2021 17:12:09 +0300 (EEST) Received: by mail-qt1-f180.google.com with SMTP id h7so26145228qtx.3 for ; Mon, 19 Apr 2021 07:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=f+GW4B6OTvck4V+xGSGS8qpc7JB1kxIBLpWjLgXc1Mo=; b=cFlNOHo4A2/kL+SuObmVYVC55OAvqGYbMgodns+Omhyw9TsClcmgP8FBmsCxj7LeD1 xgcPH878k3XOg3eqDaw5wdIALelSDCPe7nVllnNUkRR+SgDmGue0Yiy/Ocv9N45perER 8TDK0logHTfZtEngt1g7JXkA7vHnv8QlmZ5TeRXpRxCqodtS/jqOYtOS4DF9F6TQurx/ RSyFgUJtpcm3LEXLEt+R6NtW3zavfQHBp5as2VYPzCjwSbtuUOVDwKP9BHZoVbf3r1FR TmfOSPdZnbylVzGurBCYNenYbvM0Y1racE3PsylxYfxusp3DcwHeovDxTPLapYjoSgVB azWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f+GW4B6OTvck4V+xGSGS8qpc7JB1kxIBLpWjLgXc1Mo=; b=n4NnJtWdPNldAudjD+cP5rU7McPYISF8NcmML2DtfNi0VoLNuFuVEzFHngiAkam+If uPXDcStQFIZ7T/jmycnbYXGKgJ/+tfP2IYwvnES1st2tWeORJf24wEFgvcjrACXbBKWC gE/PU7jThGw+s6LxEIldDvDMYqin3x7+nEvysDhgyq0YQT6Z0Fyu5efSFlIfSrxhhrSV p7SfTNCNY2CDyajPZ47BYgCQUS52lYVR1NLEuHMSC1jj8CQIVYUl4WqdmAppQnENy93+ PkK6xei235fOyaziwWtajPpv9tneVxjXG7BhxgW8XAnPyP/uuzu4UYhHOjp5sg967T59 E7Pg== X-Gm-Message-State: AOAM532/etd8ilhM9rgdLFIGdbjI5O3OaANBR6A3bBXbq+gKCSkbYu31 GJO2+avm1l4tzfYgodbKaWVMWU+naOE= X-Received: by 2002:a05:622a:1487:: with SMTP id t7mr11468069qtx.345.1618841528568; Mon, 19 Apr 2021 07:12:08 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:08 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:53 -0300 Message-Id: <20210419141024.8174-57-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 56/87] avfilter/transform: Stop exporting internal functions 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 95C55lCHb+dX From: Andreas Rheinhardt avfilter_transform, avfilter_(add|sub|mult)_matrix are not part of the public API (transform.h is not a public header), yet they are currently exported because of their name. This commit changes this: avfilter_transform is renamed to ff_affine_transform; the other functions are just removed as they have never been used at all. Found-by: Anton Khirnov Signed-off-by: Andreas Rheinhardt --- libavfilter/transform.c | 23 +---------------------- libavfilter/transform.h | 29 +---------------------------- libavfilter/vf_deshake.c | 5 +++-- 3 files changed, 5 insertions(+), 52 deletions(-) diff --git a/libavfilter/transform.c b/libavfilter/transform.c index f4f9e0a47d..1f91436f73 100644 --- a/libavfilter/transform.c +++ b/libavfilter/transform.c @@ -122,28 +122,7 @@ void ff_get_matrix( matrix[8] = 1; } -void avfilter_add_matrix(const float *m1, const float *m2, float *result) -{ - int i; - for (i = 0; i < 9; i++) - result[i] = m1[i] + m2[i]; -} - -void avfilter_sub_matrix(const float *m1, const float *m2, float *result) -{ - int i; - for (i = 0; i < 9; i++) - result[i] = m1[i] - m2[i]; -} - -void avfilter_mul_matrix(const float *m1, float scalar, float *result) -{ - int i; - for (i = 0; i < 9; i++) - result[i] = m1[i] * scalar; -} - -int avfilter_transform(const uint8_t *src, uint8_t *dst, +int ff_affine_transform(const uint8_t *src, uint8_t *dst, int src_stride, int dst_stride, int width, int height, const float *matrix, enum InterpolateMethod interpolate, diff --git a/libavfilter/transform.h b/libavfilter/transform.h index 9b0c19ceca..0344f9c228 100644 --- a/libavfilter/transform.h +++ b/libavfilter/transform.h @@ -83,33 +83,6 @@ void ff_get_matrix( float *matrix ); -/** - * Add two matrices together. result = m1 + m2. - * - * @param m1 9-item transformation matrix - * @param m2 9-item transformation matrix - * @param result 9-item transformation matrix - */ -void avfilter_add_matrix(const float *m1, const float *m2, float *result); - -/** - * Subtract one matrix from another. result = m1 - m2. - * - * @param m1 9-item transformation matrix - * @param m2 9-item transformation matrix - * @param result 9-item transformation matrix - */ -void avfilter_sub_matrix(const float *m1, const float *m2, float *result); - -/** - * Multiply a matrix by a scalar value. result = m1 * scalar. - * - * @param m1 9-item transformation matrix - * @param scalar a number - * @param result 9-item transformation matrix - */ -void avfilter_mul_matrix(const float *m1, float scalar, float *result); - /** * Do an affine transformation with the given interpolation method. This * multiplies each vector [x,y,1] by the matrix and then interpolates to @@ -126,7 +99,7 @@ void avfilter_mul_matrix(const float *m1, float scalar, float *result); * @param fill edge fill method * @return negative on error */ -int avfilter_transform(const uint8_t *src, uint8_t *dst, +int ff_affine_transform(const uint8_t *src, uint8_t *dst, int src_stride, int dst_stride, int width, int height, const float *matrix, enum InterpolateMethod interpolate, diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index 28a541b94a..8771399351 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -330,8 +330,9 @@ static int deshake_transform_c(AVFilterContext *ctx, for (i = 0; i < 3; i++) { // Transform the luma and chroma planes - ret = avfilter_transform(in->data[i], out->data[i], in->linesize[i], out->linesize[i], - plane_w[i], plane_h[i], matrixs[i], interpolate, fill); + ret = ff_affine_transform(in->data[i], out->data[i], in->linesize[i], + out->linesize[i], plane_w[i], plane_h[i], + matrixs[i], interpolate, fill); if (ret < 0) return ret; } From patchwork Mon Apr 19 14:09:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27144 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1097899yba; Mon, 19 Apr 2021 07:19:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmZj3oFG6++4/lhT8XTyQ158pVPm9KCHVqc9E+laeySmjM6AxTeBHik6gG23xuGPIyHsde X-Received: by 2002:a05:6402:31ac:: with SMTP id dj12mr7703067edb.267.1618841949478; Mon, 19 Apr 2021 07:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841949; cv=none; d=google.com; s=arc-20160816; b=rhxP0o4/eaMb4m3eFfSMkbyzdfcRNLkph6s9YRnSDH9zh/mXQ3CLHF3Cvm2I2j/EqW uuBa4QdtoCh4zcqInNxboamy8qrLOiHLHnD1n8KXsdgaJGCSo0SWzgRcgWFCv4nCFS1F KMgQO07uknZ9JMgdDA8N3SRf6Y3lOmqvkQ5qq1yHEMh2TmBKuDLLgc9vwGxgRfdw3t0/ kwaSwJKxANN/ws8Au6e+Skg5Pz0jarAjnbSdCVIVMHiSk0G3HCLDhQFApHyVo8v86oX4 TgFWdzY2VqZK9ZmgI52efsKVl99Kl9V6kE/QgEsnnFyvI2WzOWCMaFiHZs+oPKNAKj8w 7exQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=6513IzkhW/Qfp+qLAatwYyqCzUpTrCVj+QKhxa6CiAw=; b=Qf8Ot4QsBJX2ByTs2bFsxtKM+5ZLrHrDTNw81LM8v9Eo1KNsqQd/YyOoUcApV1KQC3 fgs1F7LNAoQV9nH28t1ouneQFIvdxSZVI1/dCC5A+KMJkidtX37IAyXE0Rr/+6FY0Atl sr2B6xm2HFvG0qZWKpeHacjbSNqn3yQKUAjH12bHWTqu1ygdcQ97YSNiPNMRIwIaDnCY 6nFexgJSpZKt8hOK7IufgnHajlaLXKKTV2Auh7cLDriyPCWsln6hhF03k73ujL5zMGgS YBsxRVsdaCOdcbjafQYKBeqZnP7j/27Qs+VwZ58XcvZylGxU8oBEed8NuOCbLMrCK/BR 2vyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Z0fZ0lQw; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q2si12513905ejf.168.2021.04.19.07.19.08; Mon, 19 Apr 2021 07:19:09 -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=@gmail.com header.s=20161025 header.b=Z0fZ0lQw; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E4739689A1C; Mon, 19 Apr 2021 17:12:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F2098689981 for ; Mon, 19 Apr 2021 17:12:10 +0300 (EEST) Received: by mail-qk1-f180.google.com with SMTP id o5so35882222qkb.0 for ; Mon, 19 Apr 2021 07:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3gIYD55/XoMkEurf9k1vRxM6gR58jFuDkrOUex8iR6U=; b=Z0fZ0lQwL6X2gdr+0xBftKkMOC1RS7wUH3GxJ/LEiFO6iWgfvqyZSj0S+xakuk0QkA uWRsZMgqzOvB6xcw9DDx2+Wru7jp/DLWMZLCtgxXQFFgiZuVB4HVYn8eU9JoZbw5a8l6 zkAiC3/ygtEmlGGA/pFcDETn/USuDf4TbK52Rj9d2XC67yKR6nkL7cW8705ojblVEr1r RQeaEXbuq9sBoU436vwB5XCrkcHlzVfQa+D+ld50JGIrJ0nf3+dWMM7pjjWFFET5YK6M D2O/ih+/06hhJoNXUds8UbegWJzuGmOeDR84rzN/9W8j9fhugWxkgXUbjy6U7VT2I3T+ q6rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3gIYD55/XoMkEurf9k1vRxM6gR58jFuDkrOUex8iR6U=; b=qV22W+V3e0+AD/MnYW9ZIk4blJp54wnS7Oh/51W7kZ741sisjHiYT1509qw98qVrYZ tJXDHdIfbbF7VuojABNp2h9V/A3Hq0LSXN5yzPJHTVXdeXacdwbEoZ7NlJWKQJAytreq pHF1vgcA7MT6KhqSdu26raC0M+DnxPSZk1Mgg+EorYWnwS7V8OZbuVMVW1OLso5Eu5x7 AsGqPi4dMibBKxIBl8nCE01NSTEJNvTQhLEbzhFK1ANPrOS9jcHvQUc4Bknl2Dy0uwZU h37jcs9yEBMgjokJV0783lDCm5ENJ07yXfhZHr9mdoVmas42uvzMljL0wimFXF2yxKKG KGHg== X-Gm-Message-State: AOAM5317RO9Q7lELV0wBnefmoBArV7hPfIwlK7pDhoe7Xyf3pxRPNboY rugA+pGoE01IyuPoJb5k0iZHp8tnaUk= X-Received: by 2002:a37:a794:: with SMTP id q142mr11983764qke.216.1618841529640; Mon, 19 Apr 2021 07:12:09 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:09 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:54 -0300 Message-Id: <20210419141024.8174-58-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 57/87] avfilter/Makefile: Don't compile transform.c unconditionally 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vN0XbCUoc7hg Content-Length: 1915 From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavfilter/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavfilter/Makefile b/libavfilter/Makefile index b77f2276a4..42efa14a67 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -19,7 +19,6 @@ OBJS = allfilters.o \ framequeue.o \ graphdump.o \ graphparser.o \ - transform.o \ video.o \ OBJS-$(HAVE_THREADS) += pthread.o @@ -237,8 +236,8 @@ OBJS-$(CONFIG_DEJUDDER_FILTER) += vf_dejudder.o OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o OBJS-$(CONFIG_DENOISE_VAAPI_FILTER) += vf_misc_vaapi.o vaapi_vpp.o OBJS-$(CONFIG_DESHAKE_OPENCL_FILTER) += vf_deshake_opencl.o opencl.o \ - opencl/deshake.o -OBJS-$(CONFIG_DESHAKE_FILTER) += vf_deshake.o + opencl/deshake.o transform.o +OBJS-$(CONFIG_DESHAKE_FILTER) += vf_deshake.o transform.o OBJS-$(CONFIG_DESPILL_FILTER) += vf_despill.o OBJS-$(CONFIG_DETELECINE_FILTER) += vf_detelecine.o OBJS-$(CONFIG_DILATION_FILTER) += vf_neighbor.o From patchwork Mon Apr 19 14:09:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27137 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1098208yba; Mon, 19 Apr 2021 07:19:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1CDQlfE5xT+/VMPxkT3JXqjK2o+Dbr0yp8eacUx6hhtRO9MviPt9QJDWFdOOuo3Xd4yKe X-Received: by 2002:a17:906:f41:: with SMTP id h1mr12506076ejj.399.1618841973800; Mon, 19 Apr 2021 07:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841973; cv=none; d=google.com; s=arc-20160816; b=ynYMkv9xraaLJ9UCy4YSfYXn6is+U8kLFYg8rXtmctdBQmqF5W1uniNWhZ8qDZgvp9 EsQJ/YRyiFbwEz2tZXxR9uZ85HKTTdEYvZezJ0F0me4VYo/rKbnq9EV86WdLCzt5AIQR w+1XNZrUFAy4A4jA/gDATu2RmDQ7Dp0QB9VTFLSlNCLTqP7AppStPZofPXHs2dOsFKJt ffyxpWM8o0ZORAM7MGJp2DnkCHG5PU4kkNpiRgyT4McqXNVu3oqPLiKLcyq42hSw0XNc fPjJnzO+Uh4H0PxxZrayqNMP2dzBoeS4R6bhUhDxxJWTpKN2FwQsNJuUAz3GrFFA7NpH e+MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=6TzkrorM0rU0AMR/rSV3L5l/YTe/Lb6w/IwbflaYkiM=; b=LUnKDeZgSp0MZrn8BrRvVPJIr+MC91AqmXJiidOjeckAsLXfhh5drzLshp9jCR7902 ysOQ/+YyY7CEFrNVf0g/6B4x+UBSHipOu8DoRbdUe875Tcsgc5SlCc2Schl/Ck7pZdVk O2hbZJ2V/snVRnzhQTE23nfmuu2mTHM70cazxKG0MLzLitEFt7GCBc+fzoBa6/RD06Sj 3tV4GANwh77lmllC6u9+rpPCCxwCBq5wGM/t4uEI42ZYhySR5N/Y01qeYINI+M3BWC4q HxQa4j6Iojn8wAc+ws313j/+d88vlQ/6M+Pr8mzs7gWDFHiWBL0L0PQa+IMExO2O6oBn YsaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=VjUXUkrf; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y3si7347627edw.274.2021.04.19.07.19.33; Mon, 19 Apr 2021 07:19: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=@gmail.com header.s=20161025 header.b=VjUXUkrf; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DD9F4689ADE; Mon, 19 Apr 2021 17:12:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 317FD680987 for ; Mon, 19 Apr 2021 17:12:12 +0300 (EEST) Received: by mail-qt1-f175.google.com with SMTP id 1so26142533qtb.0 for ; Mon, 19 Apr 2021 07:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gLmpGIrebt4FqP4u4OuApbAcL6uJ9N+BRIwe48t2CaU=; b=VjUXUkrfQ30ca1xIuEmKxLcimEMf+k6C6oEYOtk2+QUiBy2Kn2o9MK4+v28w7PSzUZ AeYMgV7quv2H+nGuobcCQ44ockzguxbE5oM6JGrgBH5pISyMGiCxna2/exCJhAJN7Q+Q 6MMayTITujaQDC5lP5mOYDydvLXvKg/Tl+2SyYggBb5bRcO3tlgWmy3YdYpf+uFC3VXC 70q0grrZMEU+zF03Ix1v69C1KWCjG0aTnHWssuuRvpcpKdG3ToJVSmEaL3Oc/xtpTqXN +kjgDrtELp5aw4lU2ipVV5ee5EVhqBLfBP5rCPsUhYs9oE1eEQQP6tgWhwxTqTf1A1Su ci1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gLmpGIrebt4FqP4u4OuApbAcL6uJ9N+BRIwe48t2CaU=; b=AmegGvBQyAwZrKzSgp431s3aiCQueTJkrOn5w996lu/Ysy2yfrQsiw65zZmi4di9Mh OWHwee25Bn83ywC/XihM3Y9rIvSuxPztb1GyVIYQF9SFYilNJYU2JiUFuR4TB0j6l5C9 n5VQLtxPiCWI4vRecLLoJt+2ZDUaI6B40EKyQBOAFCRFfvKIwWjGu4ptTabEaIJGeWoH Cy5nA6nUd33r+KQm0YsvHdhSB38jhtcp8kzg/89ZRh85z6M9vKkqsBq4aQxPMONES9x5 0fP3PuRrZEcfvXBQ/jz84UXL0Hulw/vki9aRZovKhodwTvwpwCo0AE+kJAVdYhOhHL06 8u8Q== X-Gm-Message-State: AOAM531Q5ZbKmmGW/qzmdyLvOc3uq5ggzXE+RtFbcgHX/H9XkyqdHMF+ H6PSDg0dkwDF5Sgd5nJsECl3NeFSqaY= X-Received: by 2002:a05:622a:11cd:: with SMTP id n13mr12087947qtk.52.1618841530773; Mon, 19 Apr 2021 07:12:10 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:10 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:55 -0300 Message-Id: <20210419141024.8174-59-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 58/87] libswscale: Remove unused deprecated functions, make used ones static 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: rfAZRH87x/0/ Content-Length: 6273 From: Andreas Rheinhardt Deprecated in 3b905b9fe611efb3282aa4c5c659e1870d91a83b. Signed-off-by: Andreas Rheinhardt --- libswscale/swscale.h | 11 ----- libswscale/utils.c | 96 -------------------------------------------- libswscale/version.h | 4 -- 3 files changed, 111 deletions(-) diff --git a/libswscale/swscale.h b/libswscale/swscale.h index 7713f51ec6..50d6d46553 100644 --- a/libswscale/swscale.h +++ b/libswscale/swscale.h @@ -260,17 +260,6 @@ void sws_scaleVec(SwsVector *a, double scalar); */ void sws_normalizeVec(SwsVector *a, double height); -#if FF_API_SWS_VECTOR -attribute_deprecated SwsVector *sws_getConstVec(double c, int length); -attribute_deprecated SwsVector *sws_getIdentityVec(void); -attribute_deprecated void sws_convVec(SwsVector *a, SwsVector *b); -attribute_deprecated void sws_addVec(SwsVector *a, SwsVector *b); -attribute_deprecated void sws_subVec(SwsVector *a, SwsVector *b); -attribute_deprecated void sws_shiftVec(SwsVector *a, int shift); -attribute_deprecated SwsVector *sws_cloneVec(SwsVector *a); -attribute_deprecated void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level); -#endif - void sws_freeVec(SwsVector *a); SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur, diff --git a/libswscale/utils.c b/libswscale/utils.c index 352a8ed116..6bac7b658d 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -54,21 +54,14 @@ #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" -// We have to implement deprecated functions until they are removed, this is the -// simplest way to prevent warnings -#undef attribute_deprecated -#define attribute_deprecated - #include "rgb2rgb.h" #include "swscale.h" #include "swscale_internal.h" -#if !FF_API_SWS_VECTOR static SwsVector *sws_getIdentityVec(void); static void sws_addVec(SwsVector *a, SwsVector *b); static void sws_shiftVec(SwsVector *a, int shift); static void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level); -#endif static void handle_formats(SwsContext *c); @@ -2081,9 +2074,7 @@ SwsVector *sws_getGaussianVec(double variance, double quality) * Allocate and return a vector with length coefficients, all * with the same value c. */ -#if !FF_API_SWS_VECTOR static -#endif SwsVector *sws_getConstVec(double c, int length) { int i; @@ -2102,9 +2093,7 @@ SwsVector *sws_getConstVec(double c, int length) * Allocate and return a vector with just one coefficient, with * value 1.0. */ -#if !FF_API_SWS_VECTOR static -#endif SwsVector *sws_getIdentityVec(void) { return sws_getConstVec(1.0, 1); @@ -2134,26 +2123,6 @@ void sws_normalizeVec(SwsVector *a, double height) sws_scaleVec(a, height / sws_dcVec(a)); } -#if FF_API_SWS_VECTOR -static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b) -{ - int length = a->length + b->length - 1; - int i, j; - SwsVector *vec = sws_getConstVec(0.0, length); - - if (!vec) - return NULL; - - for (i = 0; i < a->length; i++) { - for (j = 0; j < b->length; j++) { - vec->coeff[i + j] += a->coeff[i] * b->coeff[j]; - } - } - - return vec; -} -#endif - static SwsVector *sws_sumVec(SwsVector *a, SwsVector *b) { int length = FFMAX(a->length, b->length); @@ -2171,25 +2140,6 @@ static SwsVector *sws_sumVec(SwsVector *a, SwsVector *b) return vec; } -#if FF_API_SWS_VECTOR -static SwsVector *sws_diffVec(SwsVector *a, SwsVector *b) -{ - int length = FFMAX(a->length, b->length); - int i; - SwsVector *vec = sws_getConstVec(0.0, length); - - if (!vec) - return NULL; - - for (i = 0; i < a->length; i++) - vec->coeff[i + (length - 1) / 2 - (a->length - 1) / 2] += a->coeff[i]; - for (i = 0; i < b->length; i++) - vec->coeff[i + (length - 1) / 2 - (b->length - 1) / 2] -= b->coeff[i]; - - return vec; -} -#endif - /* shift left / or right if "shift" is negative */ static SwsVector *sws_getShiftedVec(SwsVector *a, int shift) { @@ -2208,9 +2158,7 @@ static SwsVector *sws_getShiftedVec(SwsVector *a, int shift) return vec; } -#if !FF_API_SWS_VECTOR static -#endif void sws_shiftVec(SwsVector *a, int shift) { SwsVector *shifted = sws_getShiftedVec(a, shift); @@ -2224,9 +2172,7 @@ void sws_shiftVec(SwsVector *a, int shift) av_free(shifted); } -#if !FF_API_SWS_VECTOR static -#endif void sws_addVec(SwsVector *a, SwsVector *b) { SwsVector *sum = sws_sumVec(a, b); @@ -2240,53 +2186,11 @@ void sws_addVec(SwsVector *a, SwsVector *b) av_free(sum); } -#if FF_API_SWS_VECTOR -void sws_subVec(SwsVector *a, SwsVector *b) -{ - SwsVector *diff = sws_diffVec(a, b); - if (!diff) { - makenan_vec(a); - return; - } - av_free(a->coeff); - a->coeff = diff->coeff; - a->length = diff->length; - av_free(diff); -} - -void sws_convVec(SwsVector *a, SwsVector *b) -{ - SwsVector *conv = sws_getConvVec(a, b); - if (!conv) { - makenan_vec(a); - return; - } - av_free(a->coeff); - a->coeff = conv->coeff; - a->length = conv->length; - av_free(conv); -} - -SwsVector *sws_cloneVec(SwsVector *a) -{ - SwsVector *vec = sws_allocVec(a->length); - - if (!vec) - return NULL; - - memcpy(vec->coeff, a->coeff, a->length * sizeof(*a->coeff)); - - return vec; -} -#endif - /** * Print with av_log() a textual representation of the vector a * if log_level <= av_log_level. */ -#if !FF_API_SWS_VECTOR static -#endif void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level) { int i; diff --git a/libswscale/version.h b/libswscale/version.h index 7a616a42e0..f7bade61ca 100644 --- a/libswscale/version.h +++ b/libswscale/version.h @@ -46,8 +46,4 @@ * the public API and may change, break or disappear at any time. */ -#ifndef FF_API_SWS_VECTOR -#define FF_API_SWS_VECTOR (LIBSWSCALE_VERSION_MAJOR < 6) -#endif - #endif /* SWSCALE_VERSION_H */ From patchwork Mon Apr 19 14:09:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27138 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1098352yba; Mon, 19 Apr 2021 07:19:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+unXgxYAzI4FcZ4P3BpViNyzRwT61l+0+TRHtod+rt9SlAIrE7olzCcNaAlxR0Bfw6Wsn X-Received: by 2002:a17:906:5490:: with SMTP id r16mr23034937ejo.352.1618841985058; Mon, 19 Apr 2021 07:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841985; cv=none; d=google.com; s=arc-20160816; b=ukpCoiaIEgF3+fdFFy31ggsuKCKgftrlUSBtqCeQWsWHTZT6JbtgeKq/H2VF/e5/4T sx1S0bepsuMDCfjlyeEf4OrdWmGFinRk8zAxY8R2qg8J0YIu1nOmphNvQs+0XEYMFS6v FGfjBibF9DfXIN6K03kHJEZvXCPShV1P2mepUbCrOitoMCLwH+AXPh/e37HmO+aYWzk5 /Uk4gqeYWDGwi7IAxXzmc3ZPN6EZGia2NoB6TvwLT+IkPPyjIiGbwasQW40wqum8+7t3 c/0ckH6Tu6EXqUric+PzBwabHPUN7Mngde5/f79qvkB9M1S3eb18kJAH41VPOh2UGhgf ZIBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=o38hk9hqcG+721VEl8NMeEkYjVQm2JctRy5oT1efYTo=; b=r9NaePhqIHpJzn33m0yQD/IPNmXmp6gZMHQuRI6Ki38zos/bm0K5PZ4iNzV+HjmuXF 222zVSOkvnc3MHtWM3IiYhp1zldWkSD3TC15TCedcqYU2QXkZCIk2zH+IbL9sdiQz42N dlTkxwE+bxUwQhrefALIOBvYvQbyvpkwKXdwNUUfPO5MsBybQOXxbGtHQfQN4GG3/VZk YfIKff5FuvAMuG56LKtpGsrR9GL20H1ZcKd/OFppbv55DhCyVsD7gPOE+HGCe6T/b7ya Hpy5B73C4PeotDI9xk9JYMd1BQsb7L9mb8IW1MUFsoalN3AoK+9JLmNBl3kS6rb4D2Qu GUhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ryxtewXr; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p1si12630504edm.205.2021.04.19.07.19.44; Mon, 19 Apr 2021 07:19:45 -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=@gmail.com header.s=20161025 header.b=ryxtewXr; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EE699689A04; Mon, 19 Apr 2021 17:12:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 396D46899CF for ; Mon, 19 Apr 2021 17:12:13 +0300 (EEST) Received: by mail-qk1-f181.google.com with SMTP id o5so35882378qkb.0 for ; Mon, 19 Apr 2021 07:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=118pzRIsfBniqvJMUcL7u6ztpAn+fYHZh9kA0kZN76w=; b=ryxtewXr4wU5YubHyGjH4wgrsdrhlipeIsbAB99cAGZ8kMnpHB1hGR+TUqbAShMzHo 3Mm08t+5jCb0q/zWyaj9x8A//iXiFf892l3tF2KIaFEpU72BQXFkoBgaodaLcPTwnEay xrQGsdqFFb1UGkhCAyGPIT34Y1+7fRH00H8nazSHl/OrYRZVtgwQkYDs3QOnhT4ay4WP cUgaYsNcS7Ik19W0DONA6MLn9ZSkHWxgWpOcINpCCexySmA1i/O5fUJDaB/uTYuhVm5v W9hpzFQeVvcNwNKqZSUirqQ5PMUQDQkep6ALyzrLcnZdLb4j2ra9UQq8vc4HWrCWnU4B OYag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=118pzRIsfBniqvJMUcL7u6ztpAn+fYHZh9kA0kZN76w=; b=FBrz5/M00431ul1/ZGU1jAoWC5BX2Nl2PSanN7JW4ArzdRA5faQP6Rn5VNx7uRxnNI GUfA5z+qCDEXXOf04/vT51ogvDJEbQ8PP+ApXQQyNyh12Jzkh1VyIr0thTwkOQuSpwBA DuffzJkXCF5CWYZ7GJLhoK4NUJoha2amPf0GQDj83FTmvmgOhUhrSU2ouTpqqfbqZasX UWjcyipmAtWEc8vA63IbKhuQvgHLFSq4z7BWuqtezxAK9FUPZore4WtOJJDru2zGy65N +p8wgUf4Fb1Zb/EHSEAawdHrLRa0lHcNHlyEYgGEgo8e5+vVXB+1t7QyUvdxOA6NetjL fj9w== X-Gm-Message-State: AOAM53216sghBkFuG2GcjXFQZuNAThQAjddjw23x3IneXyi+QqImuoct bBBn8XIkhotkS0EG1b/AkbRzPmlRkIE= X-Received: by 2002:a37:a98e:: with SMTP id s136mr3483372qke.16.1618841531899; Mon, 19 Apr 2021 07:12:11 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:11 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:56 -0300 Message-Id: <20210419141024.8174-60-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 59/87] Disable vf_uspp/mcdeint. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: VH58GKPWmtEN Content-Length: 1013 From: Anton Khirnov These filters depend on avcodec APIs that are to be removed. Some people have expressed potential interest in updating these filters, so they are merely disabled for now instead of being removed. --- configure | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index cc1013fb1d..d552d5e150 100755 --- a/configure +++ b/configure @@ -7095,6 +7095,12 @@ esac enable frame_thread_encoder +# these filters depend on removed avcodec APIs +# they are kept disabled for now, but will be removed if +# nobody updates and re-enables them +disable mcdeint_filter +disable uspp_filter + enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } check_deps $CONFIG_LIST \ From patchwork Mon Apr 19 14:09:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27150 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1098494yba; Mon, 19 Apr 2021 07:19:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwveLq4daGWjC0oxpeei+gFsfC8UGgyyni9W1H7A+AjPV6VIAvoYpi8qTj/LkV2AmGC8P3h X-Received: by 2002:aa7:c245:: with SMTP id y5mr7872543edo.154.1618841996595; Mon, 19 Apr 2021 07:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841996; cv=none; d=google.com; s=arc-20160816; b=XeSS0YUS0Ilk3WiMWVmLivbCbr6m6SX/X1h4Ks8m62I9v6E9tCmBrNcrG/cd4BNmd/ JywGQE9T2y6FrVLJHuZYFCDrOkWiGTWB0plwApXqo+acdcO1kNVbN19TiNfBnhyyHTZ7 S1ko4U5rWEWQXRjzPXYJ0xdRaWTEQz58l6CJeRkCgpcioD09Nz5TG6VW2pmS3VNg9bLm f/7xZYaQrwzyZACJnvvI96zd76XIGXW1A/lgoGBAo4H+MfrT2Ca5e3Y9VREjLy8UMG+Z lnQncM+TwVe/zfcTq615SGkhx73MpvFUbJcChgh/w6MhnlZvgROuiV58WwtlUM/E0hYq bePw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=okeKwiYqxWYjDX3yui0caplCnnWB8tCz1omLGK+titE=; b=BQ9zY0q6ZwECS6P91uue6RVQi2OTVEFfjaAhMGd112W51t9bMC3kEhjXHEbhgMVSed GjlbhjKkVyWGkNNhQQec46tcVp4aKomqsxD9L9onYOGGqIDk27fVQz1hUPDKx7ymujAb hYFfFGLh+K4hbQ5veC4jSr0wP5QfvxH0tT8ndd+ABnM6xNwWrnwg2rISq76lGWRBHLHG pA+T9AGtaGEoRoI1U+QoEUjIvlX9hlWJxsKoRyP/mJtXLKqer01aJmRBEIKgc+CQpQ+t EUuEPfn9FJlcqOvMYWMIUYd7KYl2GsB/jKFuvxSqwresZt9kI8EZ+lfBdZY/a8CykFWw Bhdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=hFrtnbj6; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id pg28si11725328ejb.525.2021.04.19.07.19.52; Mon, 19 Apr 2021 07:19:56 -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=@gmail.com header.s=20161025 header.b=hFrtnbj6; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70314689B02; Mon, 19 Apr 2021 17:12:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 10CBD6899D2 for ; Mon, 19 Apr 2021 17:12:15 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id d19so136367qkk.12 for ; Mon, 19 Apr 2021 07:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3fKIC5Aofb8atMRM8zg5t+otcOsYlx5XKP1Wo4C7EXc=; b=hFrtnbj6FKPjQPwCfI4xaSfnv0bWVoFPFEOfN1nKqtvlvKgaRVs6GnfZo+rolzl3IU 0mXu1aBl+DnJapvhChZNw0l5cRLpF9hmAWrnRWBYHrffaMdMRSzbsEcG2mgs1D3cRs5d uUHoHxXWAFIhloJ47aTNVFjcs1CDtTV9pT9L3tAeJ+GzJYT1sQ7f33JO2qGxSY84SJBj BDrYJEAH2PWmkKfnWWGT3Tn3AqhIe5udF9WaQGxuwYDllYkMiyirpfTFAExFCcuimwUg hgvkc+5TuSROAIYPGXi4f+9VLESHKPx9NNhgLlB1CvwsbqpSN58f24JgQ/CAAqWTbplc 8yUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3fKIC5Aofb8atMRM8zg5t+otcOsYlx5XKP1Wo4C7EXc=; b=l/rllK0+DgwuYuuDdP7Q9mZ6CmMmfgiRtkXDyVMd7PDQDsZfXTLqZGaXNis4+Ecn3h SgGqYfjlhoR86HfYkR1JUe2t5gE/uwh0j/DhPDXCric/5LhPg6XnIq3PM6A6folsCqOq BSHV1o/z4TGZ9tR/y2F3GCR/6SM+eCeSAsNi55r9BHCBiPPDpBAOb+ERcvWF8+pmw1Dx m355JnRv2aGfs/gSBx2on6lMcvQSJl+hRJGhiidjSVf6mrnQJ2m10R3iJhF0J99upWDg 6jAE02pvWhGR7f7RUh+H3il9VvtJ4zb0shxNRr1FPF6j//BXLUKxF3Dyq+SdN27Kk1Ci 6miQ== X-Gm-Message-State: AOAM530M46dFlc6QaZIPybUocJAROaxvwLtneCxuXQ280mzg0WPf3cCy FInOeV3d6yPjOph7iSswSLkYHHenla0= X-Received: by 2002:a37:a68c:: with SMTP id p134mr8429034qke.451.1618841533147; Mon, 19 Apr 2021 07:12:13 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:12 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:57 -0300 Message-Id: <20210419141024.8174-61-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 60/87] avcodec: Remove deprecated AVCodecContext.coded_frame 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /f/z9k8W7IwU Content-Length: 37505 From: Andreas Rheinhardt Deprecated in 40cf1bbacc6220a0aa6bed5c331871d43f9ce370. (The currently disabled filter vf_mcdeint and vf_uspp were users of this field; they have not been changed, so that whoever wants to fix them can see the state of these filters when they were disabled.) Signed-off-by: Andreas Rheinhardt --- libavcodec/aliaspixenc.c | 7 ------- libavcodec/avcodec.c | 10 ---------- libavcodec/avcodec.h | 11 ----------- libavcodec/bmpenc.c | 6 ------ libavcodec/dnxhdenc.c | 17 ----------------- libavcodec/dvenc.c | 6 ------ libavcodec/encode.c | 8 -------- libavcodec/ffv1enc.c | 17 ----------------- libavcodec/flashsvenc.c | 13 ------------- libavcodec/huffyuvenc.c | 7 ------- libavcodec/jpeglsenc.c | 13 ------------- libavcodec/lclenc.c | 7 ------- libavcodec/libkvazaar.c | 11 ----------- libavcodec/libtheoraenc.c | 5 ----- libavcodec/libvpxenc.c | 24 ------------------------ libavcodec/libx264.c | 11 ----------- libavcodec/libx265.c | 6 ------ libavcodec/libxavs.c | 21 --------------------- libavcodec/libxvid.c | 18 ------------------ libavcodec/ljpegenc.c | 7 ------- libavcodec/mpegvideo_enc.c | 6 ------ libavcodec/nvenc.c | 6 ------ libavcodec/pamenc.c | 13 ------------- libavcodec/pcxenc.c | 13 ------------- libavcodec/pngenc.c | 7 ------- libavcodec/pnmenc.c | 17 ----------------- libavcodec/proresenc_kostya.c | 6 ------ libavcodec/pthread_frame.c | 5 ----- libavcodec/qsvenc.c | 6 ------ libavcodec/qtrleenc.c | 7 ------- libavcodec/rawenc.c | 5 ----- libavcodec/sgienc.c | 7 ------- libavcodec/snowenc.c | 19 ------------------- libavcodec/svq1enc.c | 7 ------- libavcodec/targaenc.c | 7 ------- libavcodec/tiffenc.c | 6 ------ libavcodec/utvideoenc.c | 9 +-------- libavcodec/v210enc.c | 6 ------ libavcodec/v410enc.c | 7 ------- libavcodec/version.h | 3 --- libavcodec/zmbvenc.c | 6 ------ libavdevice/v4l2.c | 15 --------------- 42 files changed, 1 insertion(+), 407 deletions(-) diff --git a/libavcodec/aliaspixenc.c b/libavcodec/aliaspixenc.c index a9ba00cd29..7c881d2e0a 100644 --- a/libavcodec/aliaspixenc.c +++ b/libavcodec/aliaspixenc.c @@ -33,13 +33,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int width, height, bits_pixel, i, j, length, ret; uint8_t *in_buf, *buf; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - width = avctx->width; height = avctx->height; diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 8e91350d67..62556301ce 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -400,11 +400,6 @@ free_and_end: av_opt_free(avctx); if (av_codec_is_encoder(avctx->codec)) { -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - av_frame_free(&avctx->coded_frame); -FF_ENABLE_DEPRECATION_WARNINGS -#endif av_freep(&avctx->extradata); avctx->extradata_size = 0; } @@ -577,11 +572,6 @@ av_cold int avcodec_close(AVCodecContext *avctx) av_freep(&avctx->priv_data); if (av_codec_is_encoder(avctx->codec)) { av_freep(&avctx->extradata); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - av_frame_free(&avctx->coded_frame); -FF_ENABLE_DEPRECATION_WARNINGS -#endif } avctx->codec = NULL; avctx->active_thread_type = 0; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c99b455814..144f299d46 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1578,17 +1578,6 @@ typedef struct AVCodecContext { */ int lowres; -#if FF_API_CODED_FRAME - /** - * the picture in the bitstream - * - encoding: Set by libavcodec. - * - decoding: unused - * - * @deprecated use the quality factor packet side data instead - */ - attribute_deprecated AVFrame *coded_frame; -#endif - /** * thread count * is used to decide how many independent tasks should be passed to execute() diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c index e829d68475..bab2558bc9 100644 --- a/libavcodec/bmpenc.c +++ b/libavcodec/bmpenc.c @@ -74,12 +74,6 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, int bit_count = avctx->bits_per_coded_sample; uint8_t *ptr, *buf; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif switch (avctx->pix_fmt) { case AV_PIX_FMT_RGB444: compression = BMP_BITFIELDS; diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 2461c51727..19e11b4214 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -499,12 +499,6 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) !FF_ALLOCZ_TYPED_ARRAY(ctx->mb_bits, ctx->m.mb_num) || !FF_ALLOCZ_TYPED_ARRAY(ctx->mb_qscale, ctx->m.mb_num)) return AVERROR(ENOMEM); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = 1; - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (avctx->active_thread_type == FF_THREAD_SLICE) { if (avctx->thread_count > MAX_THREADS) { @@ -1252,11 +1246,6 @@ static void dnxhd_load_picture(DNXHDEncContext *ctx, const AVFrame *frame) ctx->thread[i]->dct_uv_offset = ctx->m.uvlinesize*8; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - ctx->m.avctx->coded_frame->interlaced_frame = frame->interlaced_frame; -FF_ENABLE_DEPRECATION_WARNINGS -#endif ctx->cur_field = frame->interlaced_frame && !frame->top_field_first; } @@ -1317,12 +1306,6 @@ encode_coding_unit: goto encode_coding_unit; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->quality = ctx->qscale * FF_QP2LAMBDA; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_side_data_set_encoder_stats(pkt, ctx->qscale * FF_QP2LAMBDA, NULL, 0, AV_PICTURE_TYPE_I); pkt->flags |= AV_PKT_FLAG_KEY; diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c index e0679c538c..f1be3e43f6 100644 --- a/libavcodec/dvenc.c +++ b/libavcodec/dvenc.c @@ -1169,12 +1169,6 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt, c->pix_fmt = s->sys->pix_fmt; s->frame = frame; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - c->coded_frame->key_frame = 1; - c->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif s->buf = pkt->data; dv_format_frame(s, pkt->data); diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 9a4140f91a..cb4821066c 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -527,14 +527,6 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, int ff_encode_preinit(AVCodecContext *avctx) { int i; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame = av_frame_alloc(); - if (!avctx->coded_frame) { - return AVERROR(ENOMEM); - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (avctx->time_base.num <= 0 || avctx->time_base.den <= 0) { av_log(avctx, AV_LOG_ERROR, "The encoder timebase is not set.\n"); diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index b610d5d65e..749f6265f3 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -745,12 +745,6 @@ static av_cold int encode_init(AVCodecContext *avctx) if ((ret = ff_ffv1_allocate_initial_states(s)) < 0) return ret; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (!s->transparency) s->plane_count = 2; if (!s->chroma_planes && s->version > 3) @@ -1174,11 +1168,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, av_frame_unref(p); if ((ret = av_frame_ref(p, pict)) < 0) return ret; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (avctx->gop_size == 0 || f->picture_number % avctx->gop_size == 0) { put_rac(c, &keystate, 1); @@ -1244,12 +1233,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if (avctx->flags & AV_CODEC_FLAG_PASS1) avctx->stats_out[0] = '\0'; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = f->key_frame; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - f->picture_number++; pkt->size = buf_p - pkt->data; pkt->pts = diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 95ae988448..d365ff3999 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -245,21 +245,8 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, //mark the frame type so the muxer can mux it correctly if (I_frame) { -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif s->last_key_frame = avctx->frame_number; ff_dlog(avctx, "Inserting keyframe at frame %d\n", avctx->frame_number); - } else { -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P; - avctx->coded_frame->key_frame = 0; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } if (I_frame) diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index 218e57600d..f1b42c8499 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -222,13 +222,6 @@ static av_cold int encode_init(AVCodecContext *avctx) if (!avctx->extradata) return AVERROR(ENOMEM); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - s->bps = desc->comp[0].depth; s->yuv = !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2; s->chroma = desc->nb_components > 2; diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index 0f109c1304..bc64288c95 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -413,18 +413,6 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, return 0; } -static av_cold int encode_init_ls(AVCodecContext *ctx) -{ -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - ctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - ctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - - return 0; -} - #define OFFSET(x) offsetof(JPEGLSContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { @@ -450,7 +438,6 @@ AVCodec ff_jpegls_encoder = { .id = AV_CODEC_ID_JPEGLS, .priv_data_size = sizeof(JPEGLSContext), .priv_class = &jpegls_class, - .init = encode_init_ls, .capabilities = AV_CODEC_CAP_FRAME_THREADS, .encode2 = encode_picture_ls, .pix_fmts = (const enum AVPixelFormat[]) { diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c index 4fe52b40da..250cb5625c 100644 --- a/libavcodec/lclenc.c +++ b/libavcodec/lclenc.c @@ -121,13 +121,6 @@ static av_cold int encode_init(AVCodecContext *avctx) if (!avctx->extradata) return AVERROR(ENOMEM); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ? COMP_ZLIB_NORMAL : av_clip(avctx->compression_level, 0, 9); diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index 4432649853..7dca605059 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -276,20 +276,9 @@ static int libkvazaar_encode(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "Unknown picture type encountered.\n"); return AVERROR_EXTERNAL; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif ff_side_data_set_encoder_stats(avpkt, frame_info.qp * FF_QP2LAMBDA, NULL, 0, pict_type); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->quality = frame_info.qp * FF_QP2LAMBDA; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - *got_packet_ptr = 1; } diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 16966ed433..a067fa3344 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -346,11 +346,6 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt, // HACK: assumes no encoder delay, this is true until libtheora becomes // multithreaded (which will be disabled unless explicitly requested) pkt->pts = pkt->dts = frame->pts; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avc_context->coded_frame->key_frame = !(o_packet.granulepos & h->keyframe_mask); -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (!(o_packet.granulepos & h->keyframe_mask)) pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 76013a74d3..bcfbbf3e76 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -1179,28 +1179,12 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame, int pict_type; memcpy(pkt->data, cx_frame->buf, pkt->size); pkt->pts = pkt->dts = cx_frame->pts; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pts = cx_frame->pts; - avctx->coded_frame->key_frame = !!(cx_frame->flags & VPX_FRAME_IS_KEY); -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (!!(cx_frame->flags & VPX_FRAME_IS_KEY)) { pict_type = AV_PICTURE_TYPE_I; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif pkt->flags |= AV_PKT_FLAG_KEY; } else { pict_type = AV_PICTURE_TYPE_P; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } ff_side_data_set_encoder_stats(pkt, 0, cx_frame->sse + 1, @@ -1209,14 +1193,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if (cx_frame->have_sse) { int i; /* Beware of the Y/U/V/all order! */ -#if FF_API_CODED_FRAME && FF_API_ERROR_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->error[0] = cx_frame->sse[1]; - avctx->coded_frame->error[1] = cx_frame->sse[2]; - avctx->coded_frame->error[2] = cx_frame->sse[3]; - avctx->coded_frame->error[3] = 0; // alpha -FF_ENABLE_DEPRECATION_WARNINGS -#endif for (i = 0; i < 3; ++i) { avctx->error[i] += cx_frame->sse[i + 1]; } diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 4e7097e569..23f7ad897b 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -481,23 +481,12 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, av_log(ctx, AV_LOG_ERROR, "Unknown picture type encountered.\n"); return AVERROR_EXTERNAL; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - ctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif pkt->flags |= AV_PKT_FLAG_KEY*pic_out.b_keyframe; if (ret) { ff_side_data_set_encoder_stats(pkt, (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA, NULL, 0, pict_type); if (wallclock) ff_side_data_set_prft(pkt, wallclock); - -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - ctx->coded_frame->quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } *got_packet = ret; diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index b2008e96f1..a1bd205201 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -566,12 +566,6 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return AVERROR_EXTERNAL; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - #if X265_BUILD >= 130 if (x265pic_out.sliceType == X265_TYPE_B) #else diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index 0f22016731..b0b6b247b6 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -165,11 +165,6 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pts = pic_out.i_pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif pkt->pts = pic_out.i_pts; if (avctx->has_b_frames) { if (!x4->out_frame_count) @@ -194,29 +189,13 @@ FF_ENABLE_DEPRECATION_WARNINGS default: pict_type = AV_PICTURE_TYPE_NONE; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif /* There is no IDR frame in AVS JiZhun */ /* Sequence header is used as a flag */ if (pic_out.i_type == XAVS_TYPE_I) { -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif pkt->flags |= AV_PKT_FLAG_KEY; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_side_data_set_encoder_stats(pkt, (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA, NULL, 0, pict_type); x4->out_frame_count++; diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index 22582680a0..2bc32bddb1 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -828,31 +828,13 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, else pict_type = AV_PICTURE_TYPE_I; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; - avctx->coded_frame->quality = xvid_enc_stats.quant * FF_QP2LAMBDA; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_side_data_set_encoder_stats(pkt, xvid_enc_stats.quant * FF_QP2LAMBDA, NULL, 0, pict_type); if (xvid_enc_frame.out_flags & XVID_KEYFRAME) { -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif pkt->flags |= AV_PKT_FLAG_KEY; if (x->quicktime_format) return xvid_strip_vol_header(avctx, pkt, xvid_enc_stats.hlength, xerr); - } else { -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = 0; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } pkt->size = xerr; diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index 9a107e85ce..788fd4260b 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -281,13 +281,6 @@ static av_cold int ljpeg_encode_init(AVCodecContext *avctx) if (ret < 0) return ret; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - s->scratch = av_malloc_array(avctx->width + 1, sizeof(*s->scratch)); if (!s->scratch) return AVERROR(ENOMEM); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 8785f25787..0aa94dc7d8 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1605,12 +1605,6 @@ static void frame_end(MpegEncContext *s) if (s->pict_type!= AV_PICTURE_TYPE_B) s->last_non_b_pict_type = s->pict_type; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - av_frame_unref(s->avctx->coded_frame); - av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f); -FF_ENABLE_DEPRECATION_WARNINGS -#endif #if FF_API_ERROR_FRAME FF_DISABLE_DEPRECATION_WARNINGS memcpy(s->current_picture.f->error, s->current_picture.encoding_error, diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index d33ee489d0..0dcd93a99c 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -2041,12 +2041,6 @@ static int process_output_surface(AVCodecContext *avctx, AVPacket *pkt, NvencSur goto error; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_side_data_set_encoder_stats(pkt, (lock_params.frameAvgQP - 1) * FF_QP2LAMBDA, NULL, 0, pict_type); diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c index 50c9fcb404..ef3bc3bf16 100644 --- a/libavcodec/pamenc.c +++ b/libavcodec/pamenc.c @@ -127,24 +127,11 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -static av_cold int pam_encode_init(AVCodecContext *avctx) -{ -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - - return 0; -} - AVCodec ff_pam_encoder = { .name = "pam", .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PAM, - .init = pam_encode_init, .encode2 = pam_encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, diff --git a/libavcodec/pcxenc.c b/libavcodec/pcxenc.c index 6135944c31..709bf84d12 100644 --- a/libavcodec/pcxenc.c +++ b/libavcodec/pcxenc.c @@ -33,18 +33,6 @@ static const uint32_t monoblack_pal[16] = { 0x000000, 0xFFFFFF }; -static av_cold int pcx_encode_init(AVCodecContext *avctx) -{ -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - - return 0; -} - /** * PCX run-length encoder * @param dst output buffer @@ -209,7 +197,6 @@ AVCodec ff_pcx_encoder = { .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PCX, - .init = pcx_encode_init, .encode2 = pcx_encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_RGB24, diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index e2636b7daf..374d7c9cf7 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -1008,13 +1008,6 @@ static av_cold int png_enc_init(AVCodecContext *avctx) avctx->bits_per_coded_sample = 8; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_llvidencdsp_init(&s->llvidencdsp); if (avctx->pix_fmt == AV_PIX_FMT_MONOBLACK) diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c index 276504bf14..56e929a5f0 100644 --- a/libavcodec/pnmenc.c +++ b/libavcodec/pnmenc.c @@ -148,25 +148,12 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -static av_cold int pnm_encode_init(AVCodecContext *avctx) -{ -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - - return 0; -} - #if CONFIG_PGM_ENCODER AVCodec ff_pgm_encoder = { .name = "pgm", .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PGM, - .init = pnm_encode_init, .encode2 = pnm_encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_NONE @@ -181,7 +168,6 @@ AVCodec ff_pgmyuv_encoder = { .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PGMYUV, - .init = pnm_encode_init, .encode2 = pnm_encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_NONE @@ -196,7 +182,6 @@ AVCodec ff_ppm_encoder = { .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PPM, - .init = pnm_encode_init, .encode2 = pnm_encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_NONE @@ -211,7 +196,6 @@ AVCodec ff_pbm_encoder = { .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PBM, - .init = pnm_encode_init, .encode2 = pnm_encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_MONOWHITE, AV_PIX_FMT_NONE }, @@ -225,7 +209,6 @@ AVCodec ff_pfm_encoder = { .long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PFM, - .init = pnm_encode_init, .encode2 = pnm_encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_GBRPF32, AV_PIX_FMT_NONE }, diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 54fc6707a1..81a8cd73e7 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1179,12 +1179,6 @@ static av_cold int encode_init(AVCodecContext *avctx) int interlaced = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT); avctx->bits_per_raw_sample = 10; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif ctx->fdct = prores_fdct; ctx->scantable = interlaced ? ff_prores_interlaced_scan diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index ae5b000d97..78116e7e5a 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -321,11 +321,6 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, } if (for_user) { -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - dst->coded_frame = src->coded_frame; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (dst->codec->update_thread_context_for_user) err = dst->codec->update_thread_context_for_user(dst, src); } else { diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 6281e63a54..0ec8e0e597 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1555,12 +1555,6 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, return AVERROR_INVALIDDATA; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = pict_type; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - #if QSV_VERSION_ATLEAST(1, 26) if (avctx->codec_id == AV_CODEC_ID_H264) { enc_buf = bs->ExtParam; diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c index f7eee4a591..9340563084 100644 --- a/libavcodec/qtrleenc.c +++ b/libavcodec/qtrleenc.c @@ -391,13 +391,6 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return ret; } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = s->key_frame; - avctx->coded_frame->pict_type = s->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->key_frame) pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c index d181b74570..a7dd162d55 100644 --- a/libavcodec/rawenc.c +++ b/libavcodec/rawenc.c @@ -36,11 +36,6 @@ static av_cold int raw_encode_init(AVCodecContext *avctx) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc); if(!avctx->codec_tag) avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt); diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index 2a898f5a4f..d31f6340f7 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -100,13 +100,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, unsigned int width, height, depth, dimension; unsigned int bytes_per_channel, pixmax, put_be; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - width = avctx->width; height = avctx->height; bytes_per_channel = 1; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index fc0e5230a9..255968341a 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1618,22 +1618,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->lambda = 0; }//else keep previous frame's qlog until after motion estimation -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - av_frame_unref(avctx->coded_frame); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (s->current_picture->data[0]) { int w = s->avctx->width; int h = s->avctx->height; -#if FF_API_CODED_FRAME - ret = av_frame_make_writable(s->current_picture); - if (ret < 0) - return ret; -#endif - s->mpvencdsp.draw_edges(s->current_picture->data[0], s->current_picture->linesize[0], w , h , EDGE_WIDTH , EDGE_WIDTH , EDGE_TOP | EDGE_BOTTOM); @@ -1649,13 +1637,6 @@ FF_ENABLE_DEPRECATION_WARNINGS } ff_snow_frame_start(s); -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - ret = av_frame_ref(avctx->coded_frame, s->current_picture); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (ret < 0) - return ret; s->m.current_picture_ptr= &s->m.current_picture; s->m.current_picture.f = s->current_picture; diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 2b74f009e0..b68df598c1 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -615,13 +615,6 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->pict_type = AV_PICTURE_TYPE_I; s->quality = pict->quality; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = s->pict_type; - avctx->coded_frame->key_frame = s->pict_type == AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_side_data_set_encoder_stats(pkt, pict->quality, NULL, 0, s->pict_type); svq1_write_header(s, s->pict_type); diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c index f662e4a489..cd6cc9e874 100644 --- a/libavcodec/targaenc.c +++ b/libavcodec/targaenc.c @@ -184,13 +184,6 @@ static av_cold int targa_encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = 1; - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - return 0; } diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 6661e59d31..03262f97b2 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -533,12 +533,6 @@ static av_cold int encode_init(AVCodecContext *avctx) } #endif -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; - avctx->coded_frame->key_frame = 1; -FF_ENABLE_DEPRECATION_WARNINGS -#endif s->avctx = avctx; return 0; diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index 8c8a9535a1..670e48aa9f 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -621,15 +621,8 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, * At least currently Ut Video is IDR only. * Set flags accordingly. */ -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = 1; - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - - pkt->size = bytestream2_tell_p(&pb); pkt->flags |= AV_PKT_FLAG_KEY; + pkt->size = bytestream2_tell_p(&pb); /* Packet should be done */ *got_packet = 1; diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 16e8810271..91af88b359 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -101,12 +101,6 @@ static av_cold int encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ff_v210enc_init(s); avctx->bits_per_coded_sample = 20; diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c index 5e2450279f..9dc13f7144 100644 --- a/libavcodec/v410enc.c +++ b/libavcodec/v410enc.c @@ -51,13 +51,6 @@ static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return ret; dst = pkt->data; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->key_frame = 1; - avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - y = (uint16_t *)pic->data[0]; u = (uint16_t *)pic->data[1]; v = (uint16_t *)pic->data[2]; diff --git a/libavcodec/version.h b/libavcodec/version.h index 0830acf8b2..9e3181e810 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -51,9 +51,6 @@ * at once through the bump. This improves the git bisect-ability of the change. */ -#ifndef FF_API_CODED_FRAME -#define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_OPENH264_SLICE_MODE #define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 59) #endif diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c index 319381dd48..1d4c617b4a 100644 --- a/libavcodec/zmbvenc.c +++ b/libavcodec/zmbvenc.c @@ -180,12 +180,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, c->curfrm++; if(c->curfrm == c->keyint) c->curfrm = 0; -#if FF_API_CODED_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - avctx->coded_frame->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - avctx->coded_frame->key_frame = keyframe; -FF_ENABLE_DEPRECATION_WARNINGS -#endif palptr = (avctx->pix_fmt == AV_PIX_FMT_PAL8) ? (uint32_t *)p->data[1] : NULL; chpal = !keyframe && palptr && memcmp(palptr, c->pal2, 1024); diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 365bacd771..a5226d5e6f 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -981,27 +981,12 @@ fail: static int v4l2_read_packet(AVFormatContext *ctx, AVPacket *pkt) { -#if FF_API_CODED_FRAME && FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - struct video_data *s = ctx->priv_data; - AVFrame *frame = ctx->streams[0]->codec->coded_frame; -FF_ENABLE_DEPRECATION_WARNINGS -#endif int res; if ((res = mmap_read_frame(ctx, pkt)) < 0) { return res; } -#if FF_API_CODED_FRAME && FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (frame && s->interlaced) { - frame->interlaced_frame = 1; - frame->top_field_first = s->top_field_first; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - return pkt->size; } From patchwork Mon Apr 19 14:09:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27058 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp562857iob; Mon, 19 Apr 2021 07:20:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycWQutQY2VUq6Xuvd8V+Us6Y1H8Rz+YlgAXz88kqf0tEPZZJzVkyPczMyYjj7b5zTd0Qda X-Received: by 2002:a17:906:8a79:: with SMTP id hy25mr22533181ejc.461.1618842010298; Mon, 19 Apr 2021 07:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842010; cv=none; d=google.com; s=arc-20160816; b=txIN3u/j4CYSNgyDoLOzWK0PSckcSc/SgN84aRwbwi9jS1CIpvz+e88sB5Ap3trOdZ Rxyh5+pZlz5Cggsu9qEapccqOv7ttcSeULJVUkXnvpyNMlqmMPANx9izisihRJbMDRuG 3wFQK2+dA+XOa/bBUn7plgH5pL49T0mgBDcbeE7Gf3YrsEw76opRR2UAWkVo1YqWpG9w IHClFQ7YNk5waJuM+xo1mZadDWOzYUdUqymO0zfuV6AR8PfFSqQLbDcQVQaS2eAr7pPr P4JMzAipx+xhPbU/4Q+VHuTsQJ5LD5QENyFrA8T72hjqwZOFR/8vIJPeIVFO0b+dLxjG +54w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=FdMhOloodrSEFIImRLVvKPvpO7EBzrmDmVKGmOyXb9o=; b=wsXgufeQ8A/qhPMJrxJF1kynK0UgueOgjrg4aON8I1FK5AZM7Alf3lyjJoyZeDJ0K0 GHkXp1aEU2h4UHYkDStPNacgSXjuPIqLf+w3JDkROeCRnDZ4EUMYUscp5NmE/t/YfOPB uFRBHsAb39jSpw6UToZw1/epQZHrNuZIXvEe2jh/F/3Bfxmyt+H2ZKWdNCRXvtF9DD7y 8JBlgvM57ZtSkcbNmIz17F9B2S7pTOt2yMrN3+QH+W4hYfe1owTlKpBPZ81Wo+12Xk0b kNYgX74mPRGPQRbo9Rg7J0l5GmES4YkFvqP3p29iFiqn/TX5VVktX5u1BOSxwj6wB6qh bxIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ZgggC8qD; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n18si6599104eja.397.2021.04.19.07.20.09; Mon, 19 Apr 2021 07:20: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=@gmail.com header.s=20161025 header.b=ZgggC8qD; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C311689AFD; Mon, 19 Apr 2021 17:12:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F712689A1C for ; Mon, 19 Apr 2021 17:12:16 +0300 (EEST) Received: by mail-qt1-f180.google.com with SMTP id m16so25493132qtx.9 for ; Mon, 19 Apr 2021 07:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2YLdlA7+k+U9XP3i3S7SO0rii6S5zNEMSfzTZv2CKn4=; b=ZgggC8qDRo0H7Jpvx0lAYLd6Qu5VkQnctGBhIUGyxnHRNaQebXm96zhZ1u6qgx4PJP o0QWdaFsuZ2oIpy7F99BG48MM+zX+ppO4cEDikoytmf6nTgUfGYvAXPm7xnA3yL7CgL2 UdydCmTAnJLAlykWTBvFqQ3X4mmONVT49svVi4Eyfd2TMi7H67cLaeDOmhg5mAdxrFKc 3Bp0Nfg1PUXCqwcUGaT5R7/D2QgHkfJFAZBjXF9OrX/9ItALg3QwdvUHCDFP8evKYYdg AoL3mSxntyE73brAyZfYesvh7MnLXxS+/18/nxI3chSG39XKQceWVKN8Mowt4EF5dkb2 FeKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2YLdlA7+k+U9XP3i3S7SO0rii6S5zNEMSfzTZv2CKn4=; b=gXZRqroCM7MTTiEsUPvh21mbmDINE0mPEh+4ICYVtzqM+Y2spzNmdu7fmfdOksLbkv tgLVmvqYVIOy678v86YsFFBNds2LnqQdF/UCrehkwGr3EYBlUUXYbkcqMqlqP43ng+k8 hoaPfnajaMRkdPQARNKGGhVUTvQBrPlco5WKp6S+F+BiaiOUJ10k00h0xEJ1MxvSjHUe ovMoR31Ko1FbvrQKpeOGv/4dKyR27ZNa7zZd+8TNLUXSK1VMqA5yv+MXOQ3bGzcENF4R 7o0B8XGRt+MjdI5v40EnkxNp2bc7VNuphMa6mACdeRB9nGhJmSH8K6xj2y6ZwTJWC1Qm pwfg== X-Gm-Message-State: AOAM532ni63c+iXqKV0bgSnBDyGuBfGrqp16JqdTwEy4jtYlFCy1PN88 VaMdXWqHkc85v/+K/LRRsp9kw5JWThM= X-Received: by 2002:ac8:5f49:: with SMTP id y9mr12184995qta.152.1618841534402; Mon, 19 Apr 2021 07:12:14 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:14 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:58 -0300 Message-Id: <20210419141024.8174-62-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 61/87] avcodec: Remove deprecated old encode/decode APIs 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: o8QlbKvrZ8P8 From: Andreas Rheinhardt Deprecated in commits 7fc329e2dd6226dfecaa4a1d7adf353bf2773726 and 31f6a4b4b83aca1d73f3cfc99ce2b39331970bf3. Signed-off-by: Andreas Rheinhardt --- configure | 8 -- libavcodec/aarch64/neontest.c | 35 ----- libavcodec/arm/neontest.c | 35 ----- libavcodec/avcodec.c | 30 ----- libavcodec/avcodec.h | 245 +--------------------------------- libavcodec/decode.c | 155 --------------------- libavcodec/encode.c | 111 --------------- libavcodec/internal.h | 16 --- libavcodec/mpegvideo.h | 2 +- libavcodec/options_table.h | 3 - libavcodec/thread.h | 4 +- libavcodec/version.h | 3 - libavcodec/x86/w64xmmtest.c | 35 ----- 13 files changed, 4 insertions(+), 678 deletions(-) diff --git a/configure b/configure index d552d5e150..30b598dcc6 100755 --- a/configure +++ b/configure @@ -6857,11 +6857,7 @@ check_stripflags -x enabled neon_clobber_test && check_ldflags -Wl,--wrap,avcodec_open2 \ - -Wl,--wrap,avcodec_decode_audio4 \ - -Wl,--wrap,avcodec_decode_video2 \ -Wl,--wrap,avcodec_decode_subtitle2 \ - -Wl,--wrap,avcodec_encode_audio2 \ - -Wl,--wrap,avcodec_encode_video2 \ -Wl,--wrap,avcodec_encode_subtitle \ -Wl,--wrap,avcodec_send_packet \ -Wl,--wrap,avcodec_receive_packet \ @@ -6873,11 +6869,7 @@ enabled neon_clobber_test && enabled xmm_clobber_test && check_ldflags -Wl,--wrap,avcodec_open2 \ - -Wl,--wrap,avcodec_decode_audio4 \ - -Wl,--wrap,avcodec_decode_video2 \ -Wl,--wrap,avcodec_decode_subtitle2 \ - -Wl,--wrap,avcodec_encode_audio2 \ - -Wl,--wrap,avcodec_encode_video2 \ -Wl,--wrap,avcodec_encode_subtitle \ -Wl,--wrap,avcodec_send_packet \ -Wl,--wrap,avcodec_receive_packet \ diff --git a/libavcodec/aarch64/neontest.c b/libavcodec/aarch64/neontest.c index a4fc5a0e2f..ed84b6e073 100644 --- a/libavcodec/aarch64/neontest.c +++ b/libavcodec/aarch64/neontest.c @@ -29,41 +29,6 @@ wrap(avcodec_open2(AVCodecContext *avctx, testneonclobbers(avcodec_open2, avctx, codec, options); } -#if FF_API_OLD_ENCDEC -wrap(avcodec_decode_audio4(AVCodecContext *avctx, - AVFrame *frame, - int *got_frame_ptr, - AVPacket *avpkt)) -{ - testneonclobbers(avcodec_decode_audio4, avctx, frame, - got_frame_ptr, avpkt); -} - -wrap(avcodec_decode_video2(AVCodecContext *avctx, - AVFrame *picture, - int *got_picture_ptr, - AVPacket *avpkt)) -{ - testneonclobbers(avcodec_decode_video2, avctx, picture, - got_picture_ptr, avpkt); -} - -wrap(avcodec_encode_audio2(AVCodecContext *avctx, - AVPacket *avpkt, - const AVFrame *frame, - int *got_packet_ptr)) -{ - testneonclobbers(avcodec_encode_audio2, avctx, avpkt, frame, - got_packet_ptr); -} - -wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, - const AVFrame *frame, int *got_packet_ptr)) -{ - testneonclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr); -} -#endif - wrap(avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, diff --git a/libavcodec/arm/neontest.c b/libavcodec/arm/neontest.c index d1ede4955c..df64c6f778 100644 --- a/libavcodec/arm/neontest.c +++ b/libavcodec/arm/neontest.c @@ -29,41 +29,6 @@ wrap(avcodec_open2(AVCodecContext *avctx, testneonclobbers(avcodec_open2, avctx, codec, options); } -#if FF_API_OLD_ENCDEC -wrap(avcodec_decode_audio4(AVCodecContext *avctx, - AVFrame *frame, - int *got_frame_ptr, - AVPacket *avpkt)) -{ - testneonclobbers(avcodec_decode_audio4, avctx, frame, - got_frame_ptr, avpkt); -} - -wrap(avcodec_decode_video2(AVCodecContext *avctx, - AVFrame *picture, - int *got_picture_ptr, - AVPacket *avpkt)) -{ - testneonclobbers(avcodec_decode_video2, avctx, picture, - got_picture_ptr, avpkt); -} - -wrap(avcodec_encode_audio2(AVCodecContext *avctx, - AVPacket *avpkt, - const AVFrame *frame, - int *got_packet_ptr)) -{ - testneonclobbers(avcodec_encode_audio2, avctx, avpkt, frame, - got_packet_ptr); -} - -wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, - const AVFrame *frame, int *got_packet_ptr)) -{ - testneonclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr); -} -#endif - wrap(avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 62556301ce..4c6be665ff 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -181,15 +181,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code } avctx->internal = avci; -#if FF_API_OLD_ENCDEC - avci->to_free = av_frame_alloc(); - avci->compat_decode_frame = av_frame_alloc(); - avci->compat_encode_packet = av_packet_alloc(); - if (!avci->to_free || !avci->compat_decode_frame || !avci->compat_encode_packet) { - ret = AVERROR(ENOMEM); - goto free_and_end; - } -#endif avci->buffer_frame = av_frame_alloc(); avci->buffer_pkt = av_packet_alloc(); avci->es.in_frame = av_frame_alloc(); @@ -408,11 +399,6 @@ free_and_end: av_freep(&avctx->priv_data); av_freep(&avctx->subtitle_header); -#if FF_API_OLD_ENCDEC - av_frame_free(&avci->to_free); - av_frame_free(&avci->compat_decode_frame); - av_packet_free(&avci->compat_encode_packet); -#endif av_frame_free(&avci->buffer_frame); av_packet_free(&avci->buffer_pkt); av_packet_free(&avci->last_pkt_props); @@ -452,10 +438,6 @@ void avcodec_flush_buffers(AVCodecContext *avctx) avci->draining_done = 0; avci->nb_draining_errors = 0; av_frame_unref(avci->buffer_frame); -#if FF_API_OLD_ENCDEC - av_frame_unref(avci->compat_decode_frame); - av_packet_unref(avci->compat_encode_packet); -#endif av_packet_unref(avci->buffer_pkt); av_packet_unref(avci->last_pkt_props); @@ -480,13 +462,6 @@ void avcodec_flush_buffers(AVCodecContext *avctx) if (av_codec_is_decoder(avctx->codec)) av_bsf_flush(avci->bsf); - -#if FF_API_OLD_ENCDEC -FF_DISABLE_DEPRECATION_WARNINGS - if (!avctx->refcounted_frames) - av_frame_unref(avci->to_free); -FF_ENABLE_DEPRECATION_WARNINGS -#endif } void avsubtitle_free(AVSubtitle *sub) @@ -528,11 +503,6 @@ av_cold int avcodec_close(AVCodecContext *avctx) avctx->codec->close(avctx); avci->byte_buffer_size = 0; av_freep(&avci->byte_buffer); -#if FF_API_OLD_ENCDEC - av_frame_free(&avci->to_free); - av_frame_free(&avci->compat_decode_frame); - av_packet_free(&avci->compat_encode_packet); -#endif av_frame_free(&avci->buffer_frame); av_packet_free(&avci->buffer_pkt); av_packet_unref(avci->last_pkt_props); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 144f299d46..bb5e8490ca 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -155,29 +155,6 @@ * at least will not fail with AVERROR(EAGAIN). In general, no codec will * permit unlimited buffering of input or output. * - * This API replaces the following legacy functions: - * - avcodec_decode_video2() and avcodec_decode_audio4(): - * Use avcodec_send_packet() to feed input to the decoder, then use - * avcodec_receive_frame() to receive decoded frames after each packet. - * Unlike with the old video decoding API, multiple frames might result from - * a packet. For audio, splitting the input packet into frames by partially - * decoding packets becomes transparent to the API user. You never need to - * feed an AVPacket to the API twice (unless it is rejected with AVERROR(EAGAIN) - then - * no data was read from the packet). - * Additionally, sending a flush/draining packet is required only once. - * - avcodec_encode_video2()/avcodec_encode_audio2(): - * Use avcodec_send_frame() to feed input to the encoder, then use - * avcodec_receive_packet() to receive encoded packets. - * Providing user-allocated buffers for avcodec_receive_packet() is not - * possible. - * - The new API does not handle subtitles yet. - * - * Mixing new and old function calls on the same AVCodecContext is not allowed, - * and will result in undefined behavior. - * - * Some codecs might require using the new API; using the old API will return - * an error when calling it. All codecs support the new API. - * * A codec is not allowed to return AVERROR(EAGAIN) for both sending and receiving. This * would be an invalid state, which could put the codec user into an endless * loop. The API has no concept of time either: it cannot happen that trying to @@ -685,7 +662,7 @@ typedef struct AVCodecContext { * picture width / height. * * @note Those fields may not match the values of the last - * AVFrame output by avcodec_decode_video2 due frame + * AVFrame output by avcodec_receive_frame() due frame * reordering. * * - encoding: MUST be set by user. @@ -1275,24 +1252,6 @@ typedef struct AVCodecContext { */ int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags); -#if FF_API_OLD_ENCDEC - /** - * If non-zero, the decoded audio and video frames returned from - * avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted - * and are valid indefinitely. The caller must free them with - * av_frame_unref() when they are not needed anymore. - * Otherwise, the decoded frames must not be freed by the caller and are - * only valid until the next decode call. - * - * This is always automatically enabled if avcodec_receive_frame() is used. - * - * - encoding: unused - * - decoding: set by the caller before avcodec_open2(). - */ - attribute_deprecated - int refcounted_frames; -#endif - /* - encoding parameters */ float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0) float qblur; ///< amount of qscale smoothing over time (0.0-1.0) @@ -2644,115 +2603,6 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos); */ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); -#if FF_API_OLD_ENCDEC -/** - * Decode the audio frame of size avpkt->size from avpkt->data into frame. - * - * Some decoders may support multiple frames in a single AVPacket. Such - * decoders would then just decode the first frame and the return value would be - * less than the packet size. In this case, avcodec_decode_audio4 has to be - * called again with an AVPacket containing the remaining data in order to - * decode the second frame, etc... Even if no frames are returned, the packet - * needs to be fed to the decoder with remaining data until it is completely - * consumed or an error occurs. - * - * Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input - * and output. This means that for some packets they will not immediately - * produce decoded output and need to be flushed at the end of decoding to get - * all the decoded data. Flushing is done by calling this function with packets - * with avpkt->data set to NULL and avpkt->size set to 0 until it stops - * returning samples. It is safe to flush even those decoders that are not - * marked with AV_CODEC_CAP_DELAY, then no samples will be returned. - * - * @warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE - * larger than the actual read bytes because some optimized bitstream - * readers read 32 or 64 bits at once and could read over the end. - * - * @note The AVCodecContext MUST have been opened with @ref avcodec_open2() - * before packets may be fed to the decoder. - * - * @param avctx the codec context - * @param[out] frame The AVFrame in which to store decoded audio samples. - * The decoder will allocate a buffer for the decoded frame by - * calling the AVCodecContext.get_buffer2() callback. - * When AVCodecContext.refcounted_frames is set to 1, the frame is - * reference counted and the returned reference belongs to the - * caller. The caller must release the frame using av_frame_unref() - * when the frame is no longer needed. The caller may safely write - * to the frame if av_frame_is_writable() returns 1. - * When AVCodecContext.refcounted_frames is set to 0, the returned - * reference belongs to the decoder and is valid only until the - * next call to this function or until closing or flushing the - * decoder. The caller may not write to it. - * @param[out] got_frame_ptr Zero if no frame could be decoded, otherwise it is - * non-zero. Note that this field being set to zero - * does not mean that an error has occurred. For - * decoders with AV_CODEC_CAP_DELAY set, no given decode - * call is guaranteed to produce a frame. - * @param[in] avpkt The input AVPacket containing the input buffer. - * At least avpkt->data and avpkt->size should be set. Some - * decoders might also require additional fields to be set. - * @return A negative error code is returned if an error occurred during - * decoding, otherwise the number of bytes consumed from the input - * AVPacket is returned. - * -* @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). - */ -attribute_deprecated -int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, - int *got_frame_ptr, const AVPacket *avpkt); - -/** - * Decode the video frame of size avpkt->size from avpkt->data into picture. - * Some decoders may support multiple frames in a single AVPacket, such - * decoders would then just decode the first frame. - * - * @warning The input buffer must be AV_INPUT_BUFFER_PADDING_SIZE larger than - * the actual read bytes because some optimized bitstream readers read 32 or 64 - * bits at once and could read over the end. - * - * @warning The end of the input buffer buf should be set to 0 to ensure that - * no overreading happens for damaged MPEG streams. - * - * @note Codecs which have the AV_CODEC_CAP_DELAY capability set have a delay - * between input and output, these need to be fed with avpkt->data=NULL, - * avpkt->size=0 at the end to return the remaining frames. - * - * @note The AVCodecContext MUST have been opened with @ref avcodec_open2() - * before packets may be fed to the decoder. - * - * @param avctx the codec context - * @param[out] picture The AVFrame in which the decoded video frame will be stored. - * Use av_frame_alloc() to get an AVFrame. The codec will - * allocate memory for the actual bitmap by calling the - * AVCodecContext.get_buffer2() callback. - * When AVCodecContext.refcounted_frames is set to 1, the frame is - * reference counted and the returned reference belongs to the - * caller. The caller must release the frame using av_frame_unref() - * when the frame is no longer needed. The caller may safely write - * to the frame if av_frame_is_writable() returns 1. - * When AVCodecContext.refcounted_frames is set to 0, the returned - * reference belongs to the decoder and is valid only until the - * next call to this function or until closing or flushing the - * decoder. The caller may not write to it. - * - * @param[in] avpkt The input AVPacket containing the input buffer. - * You can create such packet with av_init_packet() and by then setting - * data and size, some decoders might in addition need other fields like - * flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least - * fields possible. - * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero. - * @return On error a negative value is returned, otherwise the number of bytes - * used or zero if no frame could be decompressed. - * - * @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). - */ -attribute_deprecated -int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, - int *got_picture_ptr, - const AVPacket *avpkt); -#endif - /** * Decode a subtitle message. * Return a negative value on error, otherwise return the number of bytes used. @@ -2796,10 +2646,6 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, * larger than the actual read bytes because some optimized bitstream * readers read 32 or 64 bits at once and could read over the end. * - * @warning Do not mix this API with the legacy API (like avcodec_decode_video2()) - * on the same AVCodecContext. It will return unexpected results now - * or in future libavcodec versions. - * * @note The AVCodecContext MUST have been opened with @ref avcodec_open2() * before packets may be fed to the decoder. * @@ -3265,95 +3111,6 @@ void av_parser_close(AVCodecParserContext *s); * @{ */ -#if FF_API_OLD_ENCDEC -/** - * Encode a frame of audio. - * - * Takes input samples from frame and writes the next output packet, if - * available, to avpkt. The output packet does not necessarily contain data for - * the most recent frame, as encoders can delay, split, and combine input frames - * internally as needed. - * - * @param avctx codec context - * @param avpkt output AVPacket. - * The user can supply an output buffer by setting - * avpkt->data and avpkt->size prior to calling the - * function, but if the size of the user-provided data is not - * large enough, encoding will fail. If avpkt->data and - * avpkt->size are set, avpkt->destruct must also be set. All - * other AVPacket fields will be reset by the encoder using - * av_init_packet(). If avpkt->data is NULL, the encoder will - * allocate it. The encoder will set avpkt->size to the size - * of the output packet. - * - * If this function fails or produces no output, avpkt will be - * freed using av_packet_unref(). - * @param[in] frame AVFrame containing the raw audio data to be encoded. - * May be NULL when flushing an encoder that has the - * AV_CODEC_CAP_DELAY capability set. - * If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame - * can have any number of samples. - * If it is not set, frame->nb_samples must be equal to - * avctx->frame_size for all frames except the last. - * The final frame may be smaller than avctx->frame_size. - * @param[out] got_packet_ptr This field is set to 1 by libavcodec if the - * output packet is non-empty, and to 0 if it is - * empty. If the function returns an error, the - * packet can be assumed to be invalid, and the - * value of got_packet_ptr is undefined and should - * not be used. - * @return 0 on success, negative error code on failure - * - * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead. - * If allowed and required, set AVCodecContext.get_encode_buffer to - * a custom function to pass user supplied output buffers. - */ -attribute_deprecated -int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, - const AVFrame *frame, int *got_packet_ptr); - -/** - * Encode a frame of video. - * - * Takes input raw video data from frame and writes the next output packet, if - * available, to avpkt. The output packet does not necessarily contain data for - * the most recent frame, as encoders can delay and reorder input frames - * internally as needed. - * - * @param avctx codec context - * @param avpkt output AVPacket. - * The user can supply an output buffer by setting - * avpkt->data and avpkt->size prior to calling the - * function, but if the size of the user-provided data is not - * large enough, encoding will fail. All other AVPacket fields - * will be reset by the encoder using av_init_packet(). If - * avpkt->data is NULL, the encoder will allocate it. - * The encoder will set avpkt->size to the size of the - * output packet. The returned data (if any) belongs to the - * caller, he is responsible for freeing it. - * - * If this function fails or produces no output, avpkt will be - * freed using av_packet_unref(). - * @param[in] frame AVFrame containing the raw video data to be encoded. - * May be NULL when flushing an encoder that has the - * AV_CODEC_CAP_DELAY capability set. - * @param[out] got_packet_ptr This field is set to 1 by libavcodec if the - * output packet is non-empty, and to 0 if it is - * empty. If the function returns an error, the - * packet can be assumed to be invalid, and the - * value of got_packet_ptr is undefined and should - * not be used. - * @return 0 on success, negative error code on failure - * - * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead. - * If allowed and required, set AVCodecContext.get_encode_buffer to - * a custom function to pass user supplied output buffers. - */ -attribute_deprecated -int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, - const AVFrame *frame, int *got_packet_ptr); -#endif - int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub); diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 0078f00607..dbc3f0110b 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -241,11 +241,6 @@ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt) if (ret < 0) goto finish; -#if FF_API_OLD_ENCDEC - if (avctx->codec->receive_frame) - avci->compat_decode_consumed += pkt->size; -#endif - return 0; finish: av_packet_unref(pkt); @@ -490,10 +485,6 @@ FF_ENABLE_DEPRECATION_WARNINGS } } -#if FF_API_OLD_ENCDEC - avci->compat_decode_consumed += ret; -#endif - if (ret >= pkt->size || ret < 0) { av_packet_unref(pkt); av_packet_unref(avci->last_pkt_props); @@ -716,152 +707,6 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr return 0; } -#if FF_API_OLD_ENCDEC -FF_DISABLE_DEPRECATION_WARNINGS -static int unrefcount_frame(AVCodecInternal *avci, AVFrame *frame) -{ - int ret; - - /* move the original frame to our backup */ - av_frame_unref(avci->to_free); - av_frame_move_ref(avci->to_free, frame); - - /* now copy everything except the AVBufferRefs back - * note that we make a COPY of the side data, so calling av_frame_free() on - * the caller's frame will work properly */ - ret = av_frame_copy_props(frame, avci->to_free); - if (ret < 0) - return ret; - - memcpy(frame->data, avci->to_free->data, sizeof(frame->data)); - memcpy(frame->linesize, avci->to_free->linesize, sizeof(frame->linesize)); - if (avci->to_free->extended_data != avci->to_free->data) { - int planes = avci->to_free->channels; - int size = planes * sizeof(*frame->extended_data); - - if (!size) { - av_frame_unref(frame); - return AVERROR_BUG; - } - - frame->extended_data = av_malloc(size); - if (!frame->extended_data) { - av_frame_unref(frame); - return AVERROR(ENOMEM); - } - memcpy(frame->extended_data, avci->to_free->extended_data, - size); - } else - frame->extended_data = frame->data; - - frame->format = avci->to_free->format; - frame->width = avci->to_free->width; - frame->height = avci->to_free->height; - frame->channel_layout = avci->to_free->channel_layout; - frame->nb_samples = avci->to_free->nb_samples; - frame->channels = avci->to_free->channels; - - return 0; -} - -static int compat_decode(AVCodecContext *avctx, AVFrame *frame, - int *got_frame, const AVPacket *pkt) -{ - AVCodecInternal *avci = avctx->internal; - int ret = 0; - - av_assert0(avci->compat_decode_consumed == 0); - - if (avci->draining_done && pkt && pkt->size != 0) { - av_log(avctx, AV_LOG_WARNING, "Got unexpected packet after EOF\n"); - avcodec_flush_buffers(avctx); - } - - *got_frame = 0; - - if (avci->compat_decode_partial_size > 0 && - avci->compat_decode_partial_size != pkt->size) { - av_log(avctx, AV_LOG_ERROR, - "Got unexpected packet size after a partial decode\n"); - ret = AVERROR(EINVAL); - goto finish; - } - - if (!avci->compat_decode_partial_size) { - ret = avcodec_send_packet(avctx, pkt); - if (ret == AVERROR_EOF) - ret = 0; - else if (ret == AVERROR(EAGAIN)) { - /* we fully drain all the output in each decode call, so this should not - * ever happen */ - ret = AVERROR_BUG; - goto finish; - } else if (ret < 0) - goto finish; - } - - while (ret >= 0) { - ret = avcodec_receive_frame(avctx, frame); - if (ret < 0) { - if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) - ret = 0; - goto finish; - } - - if (frame != avci->compat_decode_frame) { - if (!avctx->refcounted_frames) { - ret = unrefcount_frame(avci, frame); - if (ret < 0) - goto finish; - } - - *got_frame = 1; - frame = avci->compat_decode_frame; - } else { - if (!avci->compat_decode_warned) { - av_log(avctx, AV_LOG_WARNING, "The deprecated avcodec_decode_* " - "API cannot return all the frames for this decoder. " - "Some frames will be dropped. Update your code to the " - "new decoding API to fix this.\n"); - avci->compat_decode_warned = 1; - } - } - - if (avci->draining || (!avctx->codec->bsfs && avci->compat_decode_consumed < pkt->size)) - break; - } - -finish: - if (ret == 0) { - /* if there are any bsfs then assume full packet is always consumed */ - if (avctx->codec->bsfs) - ret = pkt->size; - else - ret = FFMIN(avci->compat_decode_consumed, pkt->size); - } - avci->compat_decode_consumed = 0; - avci->compat_decode_partial_size = (ret >= 0) ? pkt->size - ret : 0; - - return ret; -} - -int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, - int *got_picture_ptr, - const AVPacket *avpkt) -{ - return compat_decode(avctx, picture, got_picture_ptr, avpkt); -} - -int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, - AVFrame *frame, - int *got_frame_ptr, - const AVPacket *avpkt) -{ - return compat_decode(avctx, frame, got_frame_ptr, avpkt); -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - static void get_subtitle_defaults(AVSubtitle *sub) { memset(sub, 0, sizeof(*sub)); diff --git a/libavcodec/encode.c b/libavcodec/encode.c index cb4821066c..ba084d1f76 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -413,117 +413,6 @@ int attribute_align_arg avcodec_receive_packet(AVCodecContext *avctx, AVPacket * return 0; } -#if FF_API_OLD_ENCDEC -static int compat_encode(AVCodecContext *avctx, AVPacket *avpkt, - int *got_packet, const AVFrame *frame) -{ - AVCodecInternal *avci = avctx->internal; - AVPacket user_pkt; - int ret; - - *got_packet = 0; - - if (frame && avctx->codec->type == AVMEDIA_TYPE_VIDEO) { - if (frame->format == AV_PIX_FMT_NONE) - av_log(avctx, AV_LOG_WARNING, "AVFrame.format is not set\n"); - if (frame->width == 0 || frame->height == 0) - av_log(avctx, AV_LOG_WARNING, "AVFrame.width or height is not set\n"); - } - - if (avctx->codec->capabilities & AV_CODEC_CAP_DR1) { - av_log(avctx, AV_LOG_WARNING, "The deprecated avcodec_encode_* API does not support " - "AV_CODEC_CAP_DR1 encoders\n"); - return AVERROR(ENOSYS); - } - - ret = avcodec_send_frame(avctx, frame); - if (ret == AVERROR_EOF) - ret = 0; - else if (ret == AVERROR(EAGAIN)) { - /* we fully drain all the output in each encode call, so this should not - * ever happen */ - return AVERROR_BUG; - } else if (ret < 0) - return ret; - - av_packet_move_ref(&user_pkt, avpkt); - while (ret >= 0) { - ret = avcodec_receive_packet(avctx, avpkt); - if (ret < 0) { - if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) - ret = 0; - goto finish; - } - - if (avpkt != avci->compat_encode_packet) { - if (avpkt->data && user_pkt.data) { - if (user_pkt.size >= avpkt->size) { - memcpy(user_pkt.data, avpkt->data, avpkt->size); - av_buffer_unref(&avpkt->buf); - avpkt->buf = user_pkt.buf; - avpkt->data = user_pkt.data; -FF_DISABLE_DEPRECATION_WARNINGS - av_init_packet(&user_pkt); -FF_ENABLE_DEPRECATION_WARNINGS - } else { - av_log(avctx, AV_LOG_ERROR, "Provided packet is too small, needs to be %d\n", avpkt->size); - av_packet_unref(avpkt); - ret = AVERROR(EINVAL); - goto finish; - } - } - - *got_packet = 1; - avpkt = avci->compat_encode_packet; - } else { - if (!avci->compat_decode_warned) { - av_log(avctx, AV_LOG_WARNING, "The deprecated avcodec_encode_* " - "API cannot return all the packets for this encoder. " - "Some packets will be dropped. Update your code to the " - "new encoding API to fix this.\n"); - avci->compat_decode_warned = 1; - av_packet_unref(avpkt); - } - } - - if (avci->draining) - break; - } - -finish: - if (ret < 0) - av_packet_unref(&user_pkt); - - return ret; -} - -int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, - AVPacket *avpkt, - const AVFrame *frame, - int *got_packet_ptr) -{ - int ret = compat_encode(avctx, avpkt, got_packet_ptr, frame); - - if (ret < 0) - av_packet_unref(avpkt); - - return ret; -} - -int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, - AVPacket *avpkt, - const AVFrame *frame, - int *got_packet_ptr) -{ - int ret = compat_encode(avctx, avpkt, got_packet_ptr, frame); - - if (ret < 0) - av_packet_unref(avpkt); - - return ret; -} -#endif - int ff_encode_preinit(AVCodecContext *avctx) { int i; diff --git a/libavcodec/internal.h b/libavcodec/internal.h index b57b996816..b101f20c40 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -136,10 +136,6 @@ typedef struct AVCodecInternal { */ int last_audio_frame; -#if FF_API_OLD_ENCDEC - AVFrame *to_free; -#endif - AVBufferRef *pool; void *thread_ctx; @@ -186,18 +182,6 @@ typedef struct AVCodecInternal { AVFrame *buffer_frame; int draining_done; -#if FF_API_OLD_ENCDEC - int compat_decode_warned; - /* this variable is set by the decoder internals to signal to the old - * API compat wrappers the amount of data consumed from the last packet */ - size_t compat_decode_consumed; - /* when a partial packet has been consumed, this stores the remaining size - * of the packet (that should be submitted in the next decode call */ - size_t compat_decode_partial_size; - AVFrame *compat_decode_frame; - AVPacket *compat_encode_packet; -#endif - int showed_multi_packet_warning; int skip_samples_multiplier; diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 75e343838a..546d9c7929 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -137,7 +137,7 @@ typedef struct MpegEncContext { Picture **input_picture; ///< next pictures on display order for encoding Picture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding - int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_encode_video2() + int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_send_frame() /** * pts difference between the first and second input frame, used for * calculating dts of the first frame when there's a delay */ diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 6ad54c2d67..ed428b1310 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -368,9 +368,6 @@ static const AVOption avcodec_options[] = { {"ignore", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_IGNORE}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, {"sub_text_format", "set decoded text subtitle format", OFFSET(sub_text_format), AV_OPT_TYPE_INT, {.i64 = FF_SUB_TEXT_FMT_ASS}, 0, 1, S|D, "sub_text_format"}, {"ass", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_TEXT_FMT_ASS}, INT_MIN, INT_MAX, S|D, "sub_text_format"}, -#if FF_API_OLD_ENCDEC -{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|V|D }, -#endif {"apply_cropping", NULL, OFFSET(apply_cropping), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, V | D }, {"skip_alpha", "Skip processing alpha", OFFSET(skip_alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, V|D }, {"field_order", "Field order", OFFSET(field_order), AV_OPT_TYPE_INT, {.i64 = AV_FIELD_UNKNOWN }, 0, 5, V|D|E, "field_order" }, diff --git a/libavcodec/thread.h b/libavcodec/thread.h index 413196269f..d7d2ddd8f1 100644 --- a/libavcodec/thread.h +++ b/libavcodec/thread.h @@ -52,10 +52,10 @@ void ff_thread_flush(AVCodecContext *avctx); * Returns the next available frame in picture. *got_picture_ptr * will be 0 if none is available. * The return value on success is the size of the consumed packet for - * compatibility with avcodec_decode_video2(). This means the decoder + * compatibility with AVCodec.decode. This means the decoder * has to consume the full packet. * - * Parameters are the same as avcodec_decode_video2(). + * Parameters are the same as AVCodec.decode. */ int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt); diff --git a/libavcodec/version.h b/libavcodec/version.h index 9e3181e810..75fde1f8c7 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -60,9 +60,6 @@ #ifndef FF_API_UNUSED_CODEC_CAPS #define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 59) #endif -#ifndef FF_API_OLD_ENCDEC -#define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_THREAD_SAFE_CALLBACKS #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) #endif diff --git a/libavcodec/x86/w64xmmtest.c b/libavcodec/x86/w64xmmtest.c index d0782b9408..00b1a394d7 100644 --- a/libavcodec/x86/w64xmmtest.c +++ b/libavcodec/x86/w64xmmtest.c @@ -29,41 +29,6 @@ wrap(avcodec_open2(AVCodecContext *avctx, testxmmclobbers(avcodec_open2, avctx, codec, options); } -#if FF_API_OLD_ENCDEC -wrap(avcodec_decode_audio4(AVCodecContext *avctx, - AVFrame *frame, - int *got_frame_ptr, - AVPacket *avpkt)) -{ - testxmmclobbers(avcodec_decode_audio4, avctx, frame, - got_frame_ptr, avpkt); -} - -wrap(avcodec_decode_video2(AVCodecContext *avctx, - AVFrame *picture, - int *got_picture_ptr, - AVPacket *avpkt)) -{ - testxmmclobbers(avcodec_decode_video2, avctx, picture, - got_picture_ptr, avpkt); -} - -wrap(avcodec_encode_audio2(AVCodecContext *avctx, - AVPacket *avpkt, - const AVFrame *frame, - int *got_packet_ptr)) -{ - testxmmclobbers(avcodec_encode_audio2, avctx, avpkt, frame, - got_packet_ptr); -} - -wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, - const AVFrame *frame, int *got_packet_ptr)) -{ - testxmmclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr); -} -#endif - wrap(avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, From patchwork Mon Apr 19 14:09:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27053 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp563069iob; Mon, 19 Apr 2021 07:20:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNrBrax8iVECuAux5jMmcU/UFQYGPiEosPhiDJbIQMG+yx0aRAfpCIwXEeD1lRD90yp1W4 X-Received: by 2002:aa7:d046:: with SMTP id n6mr25319202edo.357.1618842024151; Mon, 19 Apr 2021 07:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842024; cv=none; d=google.com; s=arc-20160816; b=K+FcI3youwVBenQSk394OZ4oRQdqnz+Rtki+poSJeanhCVfsv20zi/NLe1J/BSbRMG rZElqVc9G8o68ASGpXegZzzu7s8CwhsCYOm08sStHfp8/4FM4cKuVWTU8J2di5XnAZTS /LnUHfijk6UOy4W2906llXZyS0EfS8stmBk90FK6l6O0qaa1pNymgs1IqcFwkUsFJ6kR jSJmzrV6HFVQ/H3D7w0U3iVCzhk1SLSzwTNAbl7WpL7+CIOuicYRWxvPj0GIQkWCJOCh sqoN3HwGcWq5WfJLvTtbg4wAq5Am9xRf3XjtEuZRmm+XkL4gZokblRXj3oGwL0BoSINA J8yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=CcGp9/n1QwFt8QD0fPlxvfqPW0KKqnh6zlwz6T91j9I=; b=TZAj/REBsKMXkQ6JmwKgelEWP53PNiYm8LVY6ID3aAiSNskE0ScUMP+wxvTNTTmguk IL/ZB1yZSf711Lm50Jtq17L3RUWaoq30hUghAmsB9OqGT+V/hUhy3L8E6nE5JgIfbFwX KSrEFVmf+QkzxP44IhSIRjj7E70k/z3Z6OYDcg+rIy/NkRZ40RgWMPJd1jgdwPfSMj1U W2zAonww578x6ZfE96+3evUwOOcof2Fbg2e9Z+I18xZFc59Bp0NU3S+RwaWrUGn1IU72 lKci6Xs7YdYQgXN9ylgACfu1GLVUJ0+fDYhuKWLHTZ14J6WoySEgwI5brKxgrb77fR6s Fwpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=lYes5PU8; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h1si8086139ede.545.2021.04.19.07.20.23; Mon, 19 Apr 2021 07:20: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=@gmail.com header.s=20161025 header.b=lYes5PU8; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 40B9A689B43; Mon, 19 Apr 2021 17:12:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E70F7689A29 for ; Mon, 19 Apr 2021 17:12:16 +0300 (EEST) Received: by mail-qv1-f42.google.com with SMTP id gv2so7618524qvb.8 for ; Mon, 19 Apr 2021 07:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3VWufqTQCisielmGnVWCDiFQ3kI1f9wYte2OFFlgttg=; b=lYes5PU8Uebrt99OKqTzjo+o6u5ZyLI5YidMjd0Iir+Dr4c+7mDbdRaX/0OEjWRgkM sRz3OhNa3I9o2RPfeFkroRcXmCX8HmpIf/kFtn8lITW9M2GrkSefYZF0A+2TOjWfslwk wWVhfs1wrHHdyQIJX8/AmrG7KjOEh/GpQ2HNw0Zv74fO3TnqrBL1/50/XNQRPbpUGcyt gu70A4iTqKdH+QD80KEpOCagFY430/UBzNQiE3RJDi5yceFk5LaaqG0yFwzz4UXO6lOZ eTrPgxDo71pKH5gXw8RRv6CmrWv00E277aM9LNoyjm0KqLZdAeTBgCq//cC+KGhnGkIK ZGVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3VWufqTQCisielmGnVWCDiFQ3kI1f9wYte2OFFlgttg=; b=beSaNHgV4orlO3hQ0bAx5BHUmHAPVvGTzwhF5AMXUaMU8vHNVLsxiRGpXrvZsBaEDD hnBfLuAZJ3Dd8HDGq4L3u/l1gMDFAQt0m3nKD6LPM83YN8vCyfh+CU9Ym65Dv7fZ4Eum c7HzOLMKPLk1iMs8fZWGiJkRdJV5JCozT/HAclnqMdMozNPc2e7LAj7uFJ47RkHhq83Q Xh9memVylMyu300Bi6nKyJWivPROHJcemHOy0Ou3EeVWh+BGWjXNjW0AF3g/rnol5efi CesRfqzC4yJPMVfwmRgY2LxLazZCAE0GJE2DOx/frnw4BSC83YjnFAZvwuyrdRUS7L44 5uWA== X-Gm-Message-State: AOAM532OhqZzNKd6BdztC1oY7ksTRHBICNlnd9VeAhCDNI5jlT/DMZDi pTBL0Pcn9nElAK0WskIMbcJhVmAWXdM= X-Received: by 2002:ad4:4ee8:: with SMTP id dv8mr2749022qvb.46.1618841535618; Mon, 19 Apr 2021 07:12:15 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:15 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:59 -0300 Message-Id: <20210419141024.8174-63-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 62/87] avutil/pixfmt: Remove deprecated VAAPI pixel formats 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LB29u1RqargA From: Andreas Rheinhardt Deprecated in 9f8e57efe4400ca86352277873792792279c3b15. Signed-off-by: Andreas Rheinhardt --- libavutil/pixdesc.c | 25 ------------------------- libavutil/pixfmt.h | 10 ---------- libavutil/version.h | 3 --- 3 files changed, 38 deletions(-) diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 18c7a0efc8..a4ab93c975 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -1329,33 +1329,12 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, .flags = AV_PIX_FMT_FLAG_RGB, }, -#if FF_API_VAAPI - [AV_PIX_FMT_VAAPI_MOCO] = { - .name = "vaapi_moco", - .log2_chroma_w = 1, - .log2_chroma_h = 1, - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, - [AV_PIX_FMT_VAAPI_IDCT] = { - .name = "vaapi_idct", - .log2_chroma_w = 1, - .log2_chroma_h = 1, - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, - [AV_PIX_FMT_VAAPI_VLD] = { - .name = "vaapi_vld", - .log2_chroma_w = 1, - .log2_chroma_h = 1, - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, -#else [AV_PIX_FMT_VAAPI] = { .name = "vaapi", .log2_chroma_w = 1, .log2_chroma_h = 1, .flags = AV_PIX_FMT_FLAG_HWACCEL, }, -#endif [AV_PIX_FMT_YUV420P9LE] = { .name = "yuv420p9le", .nb_components = 3, @@ -2515,10 +2494,6 @@ enum AVPixelFormat av_get_pix_fmt(const char *name) pix_fmt = get_pix_fmt_internal(name2); } -#if FF_API_VAAPI - if (pix_fmt == AV_PIX_FMT_NONE && !strcmp(name, "vaapi")) - pix_fmt = AV_PIX_FMT_VAAPI; -#endif return pix_fmt; } diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 46ef211add..30591133a4 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -112,21 +112,11 @@ enum AVPixelFormat { AV_PIX_FMT_BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined AV_PIX_FMT_BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined -#if FF_API_VAAPI - /** @name Deprecated pixel formats */ - /**@{*/ - AV_PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers - AV_PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers - AV_PIX_FMT_VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3] contains a VASurfaceID - /**@}*/ - AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD, -#else /** * Hardware acceleration through VA-API, data[3] contains a * VASurfaceID. */ AV_PIX_FMT_VAAPI, -#endif AV_PIX_FMT_YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian AV_PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian diff --git a/libavutil/version.h b/libavutil/version.h index 658bcd402e..628a40d22b 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_VAAPI -#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_FRAME_QP #define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 57) #endif From patchwork Mon Apr 19 14:10:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27061 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp563261iob; Mon, 19 Apr 2021 07:20:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyME4q3am5WvcG3u9JoiGSEDyvyZBc/G7RpzxE16eSQsPYanvyFhkZP1jZbzYFxu3BpFgMT X-Received: by 2002:a17:906:4ed1:: with SMTP id i17mr21830801ejv.424.1618842036540; Mon, 19 Apr 2021 07:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842036; cv=none; d=google.com; s=arc-20160816; b=Oq9yMeMiT5DYHSrcMKYO4C6VekJpAcZ5QFIEaByUQan+Dg+T6EasTmtmk/la82J23s aOzmZS/pqc6rkEr6LGGNdZo6E+MBgA5RyCFehkGWr/l2ihHahZs11Oa1LbYptbeyNgtt h1ktSTdcL12vsOM/TfpPJRYCgbwUQHM+/++W2yrFhoFPApXI8sc9WNXohwPiyBTabdwC pALl9/S84bfvkTrldL1cNLsjcw5vUyXLL6euJhf9grBg/UqLDiktte5XBWTvV6ZM9QVd rzlpd3scIxhPgdWxAZJ74BiDCmBv1f5ddw5AN6u/wD4hJ1zxszHN6J/a/fHt0YlrrFfO FalQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=mu9aJavk+gf3/j1fz08/BJUADtLqSx/nLs3LxbTKAKo=; b=JPLghfFRAqoXydS4xWsMM8Ym8r4HT2t0JteSgoT9B3v894yxmJFv5kiJf8J61C44td OIL1qOznsK9D4Z05FIlDKaUoGs15it6IDp2AJP1fPTRh7QPtolOCE9TXS5e9yDR52k1o iqLhSSpRu1paLG6Ps/amFBDWfs9Zp2d244IVPmyOqx/VNojfZyxpPKY9Zb34HUrD1Bwq FEtclmblqRiS8mPSNOaKTmm7h1xn3GMu90qnSqfEG9iM3g+KfQw6iXRZlcCGzRGXPXyW zeh815sP57gubF7tlR53SXVstffHUs2ZrahQ8L5kVcEBfBZCVj/zLesdpUaQNVwdpASy SGJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=NFFu77Ge; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a4si11648348ejs.331.2021.04.19.07.20.36; Mon, 19 Apr 2021 07:20:36 -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=@gmail.com header.s=20161025 header.b=NFFu77Ge; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 39DDE689BC2; Mon, 19 Apr 2021 17:12:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 56140689ADE for ; Mon, 19 Apr 2021 17:12:18 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id x11so35790338qkp.11 for ; Mon, 19 Apr 2021 07:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/se7bbEisFPqALPEvirL75WOeSdlXxjdUvojdmGVZrI=; b=NFFu77Geerwz5935e/s2Fa8AryCZN9TQDm+tW1jd9zihCFNN6VvZlUOv2FtQHRRykr wU6kDzY9zALfKxKZTnLiBYizLNiwWT2reY8eyDkYqAuOkMluMGh3GMuRUnSEFRytfkx4 gZ8C0yd4RyOtbZypd3jRzDbSJHsvo0Un5v+rNZBtU972IFwaafg3hyn1myU6BeRxh2QB RByKUJjlIp8Vf/3YsEykGfRfB3gxmemp+uQGnh+xEQA00tmF59PkUn6Og/KMb/jXQ+Vb K++QO1uDaGYPEIJmq5pjmfV0fHrID5sliCCTC8FqqygOKdst0TiODPqnK/BL/JogbnLz ybTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/se7bbEisFPqALPEvirL75WOeSdlXxjdUvojdmGVZrI=; b=S8mcatF+gsgWK84nEfHoLH2e40r5fLas8ii2eEgm3/PURbo2XWXko6bBG0CxqTzj9A Ocet25DKCuDtefSIZssChlWvZkAvz+byxUODDxjBrBkSdI1KM05A2qnmbmFOWAHP01bK JJ2OaGprp5/b6puWpCBVnFij1LuC/DDuNmgk/JJWhMLCFOwsob8sBqXtq7IwQmQKq7Kx U+0VcgQF+D9JuOoWvRPgUZlxKkJDCYRdOwOjpbz0ikzxyED12qkTYFJoip9gfD6lEAWS jKbhHPH5ATWv7rdRA1jb2WD+DmNwZZNFgkRNenIdNsAfF6cJsCYTfnCDoSJ13/6BrJfR 5idA== X-Gm-Message-State: AOAM533d2cURTngML4zjqG1CoHIjUmRuo8NRMTZrDe68OtbeVyW0VgiY 3J9+Y6xaqa5X6fFsYEQYVxn3qfIIiIU= X-Received: by 2002:a37:2ec4:: with SMTP id u187mr12420464qkh.472.1618841536773; Mon, 19 Apr 2021 07:12:16 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:16 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:00 -0300 Message-Id: <20210419141024.8174-64-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 63/87] avutil/frame: Remove AVFrame QP table 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ZzeOPJAd4nGq From: Andreas Rheinhardt Originally deprecated in 1296b1f6c0631ab79464e22d48a6a1548450b943; scheduled again for removal in a9915268327b097bba84a07f68968d8c07f4b549. Signed-off-by: Andreas Rheinhardt --- libavfilter/f_sidedata.c | 34 -------------- libavutil/frame.c | 97 ---------------------------------------- libavutil/frame.h | 41 ----------------- libavutil/version.h | 3 -- 4 files changed, 175 deletions(-) diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c index 6f25d2b311..0542373ed8 100644 --- a/libavfilter/f_sidedata.c +++ b/libavfilter/f_sidedata.c @@ -43,7 +43,6 @@ typedef struct SideDataContext { } SideDataContext; #define OFFSET(x) offsetof(SideDataContext, x) -#if FF_API_FRAME_QP #define DEFINE_OPTIONS(filt_name, FLAGS) \ static const AVOption filt_name##_options[] = { \ { "mode", "set a mode of operation", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, SIDEDATA_NB-1, FLAGS, "mode" }, \ @@ -66,8 +65,6 @@ static const AVOption filt_name##_options[] = { \ { "SPHERICAL", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_SPHERICAL }, 0, 0, FLAGS, "type" }, \ { "CONTENT_LIGHT_LEVEL", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_CONTENT_LIGHT_LEVEL }, 0, 0, FLAGS, "type" }, \ { "ICC_PROFILE", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_ICC_PROFILE }, 0, 0, FLAGS, "type" }, \ - { "QP_TABLE_PROPERTIES", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_QP_TABLE_PROPERTIES }, 0, 0, FLAGS, "type" }, \ - { "QP_TABLE_DATA", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_QP_TABLE_DATA }, 0, 0, FLAGS, "type" }, \ { "S12M_TIMECOD", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_S12M_TIMECODE }, 0, 0, FLAGS, "type" }, \ { "DYNAMIC_HDR_PLUS", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DYNAMIC_HDR_PLUS }, 0, 0, FLAGS, "type" }, \ { "REGIONS_OF_INTEREST", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_REGIONS_OF_INTEREST }, 0, 0, FLAGS, "type" }, \ @@ -75,37 +72,6 @@ static const AVOption filt_name##_options[] = { \ { "SEI_UNREGISTERED", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_SEI_UNREGISTERED }, 0, 0, FLAGS, "type" }, \ { NULL } \ } -#else -#define DEFINE_OPTIONS(filt_name, FLAGS) \ -static const AVOption filt_name##_options[] = { \ - { "mode", "set a mode of operation", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, SIDEDATA_NB-1, FLAGS, "mode" }, \ - { "select", "select frame", 0, AV_OPT_TYPE_CONST, {.i64 = SIDEDATA_SELECT }, 0, 0, FLAGS, "mode" }, \ - { "delete", "delete side data", 0, AV_OPT_TYPE_CONST, {.i64 = SIDEDATA_DELETE }, 0, 0, FLAGS, "mode" }, \ - { "type", "set side data type", OFFSET(type), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, INT_MAX, FLAGS, "type" }, \ - { "PANSCAN", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_PANSCAN }, 0, 0, FLAGS, "type" }, \ - { "A53_CC", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_A53_CC }, 0, 0, FLAGS, "type" }, \ - { "STEREO3D", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_STEREO3D }, 0, 0, FLAGS, "type" }, \ - { "MATRIXENCODING", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_MATRIXENCODING }, 0, 0, FLAGS, "type" }, \ - { "DOWNMIX_INFO", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DOWNMIX_INFO }, 0, 0, FLAGS, "type" }, \ - { "REPLAYGAIN", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_REPLAYGAIN }, 0, 0, FLAGS, "type" }, \ - { "DISPLAYMATRIX", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DISPLAYMATRIX }, 0, 0, FLAGS, "type" }, \ - { "AFD", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_AFD }, 0, 0, FLAGS, "type" }, \ - { "MOTION_VECTORS", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_MOTION_VECTORS }, 0, 0, FLAGS, "type" }, \ - { "SKIP_SAMPLES", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_SKIP_SAMPLES }, 0, 0, FLAGS, "type" }, \ - { "AUDIO_SERVICE_TYPE", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_AUDIO_SERVICE_TYPE }, 0, 0, FLAGS, "type" }, \ - { "MASTERING_DISPLAY_METADATA", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_MASTERING_DISPLAY_METADATA }, 0, 0, FLAGS, "type" }, \ - { "GOP_TIMECODE", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_GOP_TIMECODE }, 0, 0, FLAGS, "type" }, \ - { "SPHERICAL", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_SPHERICAL }, 0, 0, FLAGS, "type" }, \ - { "CONTENT_LIGHT_LEVEL", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_CONTENT_LIGHT_LEVEL }, 0, 0, FLAGS, "type" }, \ - { "ICC_PROFILE", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_ICC_PROFILE }, 0, 0, FLAGS, "type" }, \ - { "S12M_TIMECOD", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_S12M_TIMECODE }, 0, 0, FLAGS, "type" }, \ - { "DYNAMIC_HDR_PLUS", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DYNAMIC_HDR_PLUS }, 0, 0, FLAGS, "type" }, \ - { "REGIONS_OF_INTEREST", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_REGIONS_OF_INTEREST }, 0, 0, FLAGS, "type" }, \ - { "DETECTION_BOUNDING_BOXES", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_DETECTION_BBOXES }, 0, 0, FLAGS, "type" }, \ - { "SEI_UNREGISTERED", "", 0, AV_OPT_TYPE_CONST, {.i64 = AV_FRAME_DATA_SEI_UNREGISTERED }, 0, 0, FLAGS, "type" }, \ - { NULL } \ -} -#endif static av_cold int init(AVFilterContext *ctx) { diff --git a/libavutil/frame.c b/libavutil/frame.c index bb77e2d534..df826fbfb7 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -46,80 +46,6 @@ MAKE_ACCESSORS(AVFrame, frame, enum AVColorRange, color_range) (frame)->channels == \ av_get_channel_layout_nb_channels((frame)->channel_layout)) -#if FF_API_FRAME_QP -struct qp_properties { - int stride; - int type; -}; - -int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int qp_type) -{ - struct qp_properties *p; - AVFrameSideData *sd; - AVBufferRef *ref; - -FF_DISABLE_DEPRECATION_WARNINGS - av_buffer_unref(&f->qp_table_buf); - - f->qp_table_buf = buf; - f->qscale_table = buf->data; - f->qstride = stride; - f->qscale_type = qp_type; -FF_ENABLE_DEPRECATION_WARNINGS - - av_frame_remove_side_data(f, AV_FRAME_DATA_QP_TABLE_PROPERTIES); - av_frame_remove_side_data(f, AV_FRAME_DATA_QP_TABLE_DATA); - - ref = av_buffer_ref(buf); - if (!av_frame_new_side_data_from_buf(f, AV_FRAME_DATA_QP_TABLE_DATA, ref)) { - av_buffer_unref(&ref); - return AVERROR(ENOMEM); - } - - sd = av_frame_new_side_data(f, AV_FRAME_DATA_QP_TABLE_PROPERTIES, - sizeof(struct qp_properties)); - if (!sd) - return AVERROR(ENOMEM); - - p = (struct qp_properties *)sd->data; - p->stride = stride; - p->type = qp_type; - - return 0; -} - -int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type) -{ - AVBufferRef *buf = NULL; - - *stride = 0; - *type = 0; - -FF_DISABLE_DEPRECATION_WARNINGS - if (f->qp_table_buf) { - *stride = f->qstride; - *type = f->qscale_type; - buf = f->qp_table_buf; -FF_ENABLE_DEPRECATION_WARNINGS - } else { - AVFrameSideData *sd; - struct qp_properties *p; - sd = av_frame_get_side_data(f, AV_FRAME_DATA_QP_TABLE_PROPERTIES); - if (!sd) - return NULL; - p = (struct qp_properties *)sd->data; - sd = av_frame_get_side_data(f, AV_FRAME_DATA_QP_TABLE_DATA); - if (!sd) - return NULL; - *stride = p->stride; - *type = p->type; - buf = sd->buf; - } - - return buf ? buf->data : NULL; -} -#endif - #if FF_API_COLORSPACE_NAME const char *av_get_colorspace_name(enum AVColorSpace val) { @@ -422,20 +348,6 @@ FF_ENABLE_DEPRECATION_WARNINGS av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0); } -#if FF_API_FRAME_QP -FF_DISABLE_DEPRECATION_WARNINGS - dst->qscale_table = NULL; - dst->qstride = 0; - dst->qscale_type = 0; - av_buffer_replace(&dst->qp_table_buf, src->qp_table_buf); - if (dst->qp_table_buf) { - dst->qscale_table = dst->qp_table_buf->data; - dst->qstride = src->qstride; - dst->qscale_type = src->qscale_type; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - ret = av_buffer_replace(&dst->opaque_ref, src->opaque_ref); ret |= av_buffer_replace(&dst->private_ref, src->private_ref); return ret; @@ -566,11 +478,6 @@ void av_frame_unref(AVFrame *frame) av_buffer_unref(&frame->extended_buf[i]); av_freep(&frame->extended_buf); av_dict_free(&frame->metadata); -#if FF_API_FRAME_QP -FF_DISABLE_DEPRECATION_WARNINGS - av_buffer_unref(&frame->qp_table_buf); -FF_ENABLE_DEPRECATION_WARNINGS -#endif av_buffer_unref(&frame->hw_frames_ctx); @@ -844,10 +751,6 @@ const char *av_frame_side_data_name(enum AVFrameSideDataType type) case AV_FRAME_DATA_S12M_TIMECODE: return "SMPTE 12-1 timecode"; case AV_FRAME_DATA_SPHERICAL: return "Spherical Mapping"; case AV_FRAME_DATA_ICC_PROFILE: return "ICC profile"; -#if FF_API_FRAME_QP - case AV_FRAME_DATA_QP_TABLE_PROPERTIES: return "QP table properties"; - case AV_FRAME_DATA_QP_TABLE_DATA: return "QP table data"; -#endif case AV_FRAME_DATA_DYNAMIC_HDR_PLUS: return "HDR Dynamic Metadata SMPTE2094-40 (HDR10+)"; case AV_FRAME_DATA_REGIONS_OF_INTEREST: return "Regions Of Interest"; case AV_FRAME_DATA_VIDEO_ENC_PARAMS: return "Video encoding parameters"; diff --git a/libavutil/frame.h b/libavutil/frame.h index 0d7ed29dfc..fbecebbd70 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -142,23 +142,6 @@ enum AVFrameSideDataType { */ AV_FRAME_DATA_ICC_PROFILE, -#if FF_API_FRAME_QP - /** - * Implementation-specific description of the format of AV_FRAME_QP_TABLE_DATA. - * The contents of this side data are undocumented and internal; use - * av_frame_set_qp_table() and av_frame_get_qp_table() to access this in a - * meaningful way instead. - */ - AV_FRAME_DATA_QP_TABLE_PROPERTIES, - - /** - * Raw QP table data. Its format is described by - * AV_FRAME_DATA_QP_TABLE_PROPERTIES. Use av_frame_set_qp_table() and - * av_frame_get_qp_table() to access this instead. - */ - AV_FRAME_DATA_QP_TABLE_DATA, -#endif - /** * Timecode which conforms to SMPTE ST 12-1. The data is an array of 4 uint32_t * where the first uint32_t describes how many (1-3) of the other timecodes are used. @@ -638,24 +621,6 @@ typedef struct AVFrame { */ int pkt_size; -#if FF_API_FRAME_QP - /** - * QP table - */ - attribute_deprecated - int8_t *qscale_table; - /** - * QP store stride - */ - attribute_deprecated - int qstride; - - attribute_deprecated - int qscale_type; - - attribute_deprecated - AVBufferRef *qp_table_buf; -#endif /** * For hwaccel-format frames, this should be a reference to the * AVHWFramesContext describing the frame. @@ -744,12 +709,6 @@ attribute_deprecated int av_frame_get_pkt_size(const AVFrame *frame); attribute_deprecated void av_frame_set_pkt_size(AVFrame *frame, int val); -#if FF_API_FRAME_QP -attribute_deprecated -int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type); -attribute_deprecated -int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type); -#endif attribute_deprecated enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame); attribute_deprecated diff --git a/libavutil/version.h b/libavutil/version.h index 628a40d22b..2aa67060d2 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_FRAME_QP -#define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_PLUS1_MINUS1 #define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 57) #endif From patchwork Mon Apr 19 14:10:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27055 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp563708iob; Mon, 19 Apr 2021 07:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAisqhmpfz4GHMMcW7uRcFCLl934EgXENAzcFFZuRgu4CMN0sxWtfB3ZoKOr2x20XPJ6/w X-Received: by 2002:aa7:d14a:: with SMTP id r10mr26156957edo.385.1618842063050; Mon, 19 Apr 2021 07:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842063; cv=none; d=google.com; s=arc-20160816; b=WZsELDZoKqVPgms2OAjA0934+7rADF7W1SAIpES+rp7xeO6A4R37xr3QKVECIRLbUd 461F+9pCrMEhp3RziV8wTaA1HyL9hif7ruGbmls0Y7+CNoiy92fByMf4VMk0sG6AGa8Q v2vs2h1HRovlT22Tl491k99ybBEh3n7da7STkJ9PkA1CkvjLO0A0Jg8g6lKNQ6no1/tZ rWDNwKbSb/QPIk+lF513gLSAxaRxazm/pKp3Svz3IBPgIk08jpVwU9cENvJu61wu5d6m kmctmFub0gXBNkUTYEXiZiYggxMcxx/02BHACjd1kI+/NhGH3ttJe68Virqsei07vIhs HiVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=LwAdql2F76VKIWVEyPHQqLDx8OQPsvRQz812oI0R0gE=; b=i7iK857dSuWPJpqq6WIVewqQn7E0YovP/PxVHCrUtrO2+97ntPEkbFTyvkS5ONzUSy DfxJIpx360xMg7QEqz+eSFILGjwogC0EPwsqgWbdu1aNC92yiVRNVTbTRMT1Ti7iSQbB 193B34MmJ4/ESTobpdkban5tDj9yErtAB/IlVoVDSoAZ8NkzOgQCTTqUe5JQV5I9yFRu SmgqxqKEOzK0brlq8mPXE4Uj5nA4b60pu0hmkdSYGgtB6S8fu5i7K45UFf7P9C5Q/5f1 MAq8xf85BWPl9c4j/OOcHKS/Zjx2CqIEk8axLF4oY+mqotYYD7/WaOlbIezQyZ1E5dBL fcqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="Fz/9EILf"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b6si14195956ejb.398.2021.04.19.07.21.02; Mon, 19 Apr 2021 07:21:03 -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=@gmail.com header.s=20161025 header.b="Fz/9EILf"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E7B6689C2E; Mon, 19 Apr 2021 17:12:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B9FB6689B43 for ; Mon, 19 Apr 2021 17:12:22 +0300 (EEST) Received: by mail-qk1-f175.google.com with SMTP id o5so35882996qkb.0 for ; Mon, 19 Apr 2021 07:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3ddLuRIpS5kof/U5G9+ITqzZCl1YL0rIuG9Gmfprmco=; b=Fz/9EILfJ+pc0usKj4+E80ailqHiegyUCImGa90O4/X+TTcrTYcew9cytSQuja+Gyz Ae5jbml0qy+SshLK7FFFglebaCaz/ikut/OGg3IrAUgBKTJ/h/g4ZkC7qd9+vUf7Xpzc bNz/lTfCeNMl02Rpv2NqXryi0rpynUzszNgf/4pCpoE82eVukXkhxFp90oufzJuzAi4a xytpbsRClKuYde4Dx+K0wHBiq3UVApaDZMyULjRPqm0pM0+UhMsokbAOKPM4zI0RtnIG 5uOyGHUwZD0BGaE7uXj956LlZ4aAqZUj38fJ1RDSmnKyNbuvY2LfXncLFi8K3epfVR+7 ab7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3ddLuRIpS5kof/U5G9+ITqzZCl1YL0rIuG9Gmfprmco=; b=HAC3m5KPLOrJhOjbNIXhcfXLHg/IM8fKrRvT0bjGjxuVJF5yjUA3FhreUHhkrrRj/s XOrl0cC+G0Ybf+6OhRvG7OBqSBDvS9bFQ8yHsieoWUS+9aCAM+sTqmKnVol7vQP3KUxh A6+J3otGIpBqsw2knNbQSKNTWa/c7mM9jV9kr7k80rUKM9JOn2DtMIuXFVvWobVMHYW/ XL4YiZNn2OZIjB412G6eSLxdRk2fWi/Fr8kW3TgKnldCm5CbZdZon8SBs7VtSE1WbrkW usAEURWPfsfXg9cag3gdwyUS3V53enpmnXv77V1+u5tkqKEiInaPUfMfasq1fEcoZRUx 1U6g== X-Gm-Message-State: AOAM5334geBjoFDKjeDojgl25Y5WgfWaQnhpO2LhoiH6wu5D8F9j2FCl rLkHTxtdoa5Qj77r0pjn3ofdZKrZVo4= X-Received: by 2002:a37:a794:: with SMTP id q142mr11984517qke.216.1618841539593; Mon, 19 Apr 2021 07:12:19 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:17 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:01 -0300 Message-Id: <20210419141024.8174-65-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 64/87] avutil/pixdesc: Remove deprecated off-by-one fields from pix fmt descs 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DtZqBxXLFKvA From: Andreas Rheinhardt Deprecated in 2268db2cd052674fde55c7d48b7a5098ce89b4ba. Signed-off-by: Andreas Rheinhardt --- libavutil/pixdesc.c | 1056 +++++++++++++++++++++---------------------- libavutil/pixdesc.h | 11 - libavutil/version.h | 3 - 3 files changed, 525 insertions(+), 545 deletions(-) diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index a4ab93c975..e701005bc0 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -167,9 +167,6 @@ void av_write_image_line(const uint16_t *src, av_write_image_line2(src, data, linesize, desc, x, y, c, w, 2); } -#if FF_API_PLUS1_MINUS1 -FF_DISABLE_DEPRECATION_WARNINGS -#endif static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { [AV_PIX_FMT_YUV420P] = { .name = "yuv420p", @@ -177,9 +174,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -189,9 +186,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 8, 1, 7, 1 }, /* Y */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* U */ - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* V */ + { 0, 2, 0, 0, 8 }, /* Y */ + { 0, 4, 1, 0, 8 }, /* U */ + { 0, 4, 3, 0, 8 }, /* V */ }, }, [AV_PIX_FMT_YVYU422] = { @@ -200,9 +197,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 8, 1, 7, 1 }, /* Y */ - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* U */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* V */ + { 0, 2, 0, 0, 8 }, /* Y */ + { 0, 4, 3, 0, 8 }, /* U */ + { 0, 4, 1, 0, 8 }, /* V */ }, }, [AV_PIX_FMT_Y210LE] = { @@ -211,9 +208,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 4, 0, 6, 10, 3, 9, 1 }, /* Y */ - { 0, 8, 2, 6, 10, 7, 9, 3 }, /* U */ - { 0, 8, 6, 6, 10, 7, 9, 7 }, /* V */ + { 0, 4, 0, 6, 10 }, /* Y */ + { 0, 8, 2, 6, 10 }, /* U */ + { 0, 8, 6, 6, 10 }, /* V */ }, }, [AV_PIX_FMT_Y210BE] = { @@ -222,9 +219,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 4, 0, 6, 10, 3, 9, 1 }, /* Y */ - { 0, 8, 2, 6, 10, 7, 9, 3 }, /* U */ - { 0, 8, 6, 6, 10, 7, 9, 7 }, /* V */ + { 0, 4, 0, 6, 10 }, /* Y */ + { 0, 8, 2, 6, 10 }, /* U */ + { 0, 8, 6, 6, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE, }, @@ -234,9 +231,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 3, 0, 0, 8, 2, 7, 1 }, /* R */ - { 0, 3, 1, 0, 8, 2, 7, 2 }, /* G */ - { 0, 3, 2, 0, 8, 2, 7, 3 }, /* B */ + { 0, 3, 0, 0, 8 }, /* R */ + { 0, 3, 1, 0, 8 }, /* G */ + { 0, 3, 2, 0, 8 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -246,9 +243,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 3, 2, 0, 8, 2, 7, 3 }, /* R */ - { 0, 3, 1, 0, 8, 2, 7, 2 }, /* G */ - { 0, 3, 0, 0, 8, 2, 7, 1 }, /* B */ + { 0, 3, 2, 0, 8 }, /* R */ + { 0, 3, 1, 0, 8 }, /* G */ + { 0, 3, 0, 0, 8 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -258,9 +255,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, .log2_chroma_h= 0, .comp = { - { 0, 4, 2, 4, 10, 3, 9, 2 }, /* R */ - { 0, 4, 1, 2, 10, 3, 9, 3 }, /* G */ - { 0, 4, 0, 0, 10, 3, 9, 4 }, /* B */ + { 0, 4, 2, 4, 10 }, /* R */ + { 0, 4, 1, 2, 10 }, /* G */ + { 0, 4, 0, 0, 10 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -270,9 +267,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, .log2_chroma_h= 0, .comp = { - { 0, 4, 0, 4, 10, 3, 9, 2 }, /* R */ - { 0, 4, 1, 2, 10, 3, 9, 3 }, /* G */ - { 0, 4, 2, 0, 10, 3, 9, 4 }, /* B */ + { 0, 4, 0, 4, 10 }, /* R */ + { 0, 4, 1, 2, 10 }, /* G */ + { 0, 4, 2, 0, 10 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE, }, @@ -282,9 +279,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -294,9 +291,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -306,9 +303,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 2, .log2_chroma_h = 2, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -318,9 +315,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 2, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -330,9 +327,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 2, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -342,7 +339,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ + { 0, 1, 0, 0, 8 }, /* Y */ }, .flags = FF_PSEUDOPAL, .alias = "gray8,y8", @@ -353,7 +350,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 1, 0, 0, 1 }, /* Y */ + { 0, 1, 0, 0, 1 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BITSTREAM, }, @@ -363,7 +360,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 7, 1, 0, 0, 1 }, /* Y */ + { 0, 1, 0, 7, 1 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BITSTREAM, }, @@ -373,7 +370,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, + { 0, 1, 0, 0, 8 }, }, .flags = AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_ALPHA, }, @@ -383,9 +380,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -395,9 +392,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -407,9 +404,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -423,9 +420,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 1, 0, 8, 1, 7, 2 }, /* Y */ - { 0, 4, 0, 0, 8, 3, 7, 1 }, /* U */ - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* V */ + { 0, 2, 1, 0, 8 }, /* Y */ + { 0, 4, 0, 0, 8 }, /* U */ + { 0, 4, 2, 0, 8 }, /* V */ }, }, [AV_PIX_FMT_UYYVYY411] = { @@ -434,9 +431,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 2, .log2_chroma_h = 0, .comp = { - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* Y */ - { 0, 6, 0, 0, 8, 5, 7, 1 }, /* U */ - { 0, 6, 3, 0, 8, 5, 7, 4 }, /* V */ + { 0, 4, 1, 0, 8 }, /* Y */ + { 0, 6, 0, 0, 8 }, /* U */ + { 0, 6, 3, 0, 8 }, /* V */ }, }, [AV_PIX_FMT_BGR8] = { @@ -445,9 +442,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 3, 0, 2, 1 }, /* R */ - { 0, 1, 0, 3, 3, 0, 2, 1 }, /* G */ - { 0, 1, 0, 6, 2, 0, 1, 1 }, /* B */ + { 0, 1, 0, 0, 3 }, /* R */ + { 0, 1, 0, 3, 3 }, /* G */ + { 0, 1, 0, 6, 2 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, }, @@ -457,9 +454,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 3, 0, 1, 3, 0, 4 }, /* R */ - { 0, 4, 1, 0, 2, 3, 1, 2 }, /* G */ - { 0, 4, 0, 0, 1, 3, 0, 1 }, /* B */ + { 0, 4, 3, 0, 1 }, /* R */ + { 0, 4, 1, 0, 2 }, /* G */ + { 0, 4, 0, 0, 1 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB, }, @@ -469,9 +466,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 1, 0, 0, 1 }, /* R */ - { 0, 1, 0, 1, 2, 0, 1, 1 }, /* G */ - { 0, 1, 0, 3, 1, 0, 0, 1 }, /* B */ + { 0, 1, 0, 0, 1 }, /* R */ + { 0, 1, 0, 1, 2 }, /* G */ + { 0, 1, 0, 3, 1 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, }, @@ -481,9 +478,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 6, 2, 0, 1, 1 }, /* R */ - { 0, 1, 0, 3, 3, 0, 2, 1 }, /* G */ - { 0, 1, 0, 0, 3, 0, 2, 1 }, /* B */ + { 0, 1, 0, 6, 2 }, /* R */ + { 0, 1, 0, 3, 3 }, /* G */ + { 0, 1, 0, 0, 3 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, }, @@ -493,9 +490,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 0, 0, 1, 3, 0, 1 }, /* R */ - { 0, 4, 1, 0, 2, 3, 1, 2 }, /* G */ - { 0, 4, 3, 0, 1, 3, 0, 4 }, /* B */ + { 0, 4, 0, 0, 1 }, /* R */ + { 0, 4, 1, 0, 2 }, /* G */ + { 0, 4, 3, 0, 1 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB, }, @@ -505,9 +502,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 3, 1, 0, 0, 1 }, /* R */ - { 0, 1, 0, 1, 2, 0, 1, 1 }, /* G */ - { 0, 1, 0, 0, 1, 0, 0, 1 }, /* B */ + { 0, 1, 0, 3, 1 }, /* R */ + { 0, 1, 0, 1, 2 }, /* G */ + { 0, 1, 0, 0, 1 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, }, @@ -517,9 +514,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 2, 0, 0, 8, 1, 7, 1 }, /* U */ - { 1, 2, 1, 0, 8, 1, 7, 2 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 2, 0, 0, 8 }, /* U */ + { 1, 2, 1, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -529,9 +526,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 2, 1, 0, 8, 1, 7, 2 }, /* U */ - { 1, 2, 0, 0, 8, 1, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 2, 1, 0, 8 }, /* U */ + { 1, 2, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -541,10 +538,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* R */ - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */ - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* B */ - { 0, 4, 0, 0, 8, 3, 7, 1 }, /* A */ + { 0, 4, 1, 0, 8 }, /* R */ + { 0, 4, 2, 0, 8 }, /* G */ + { 0, 4, 3, 0, 8 }, /* B */ + { 0, 4, 0, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -554,10 +551,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 0, 0, 8, 3, 7, 1 }, /* R */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */ - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* B */ - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* A */ + { 0, 4, 0, 0, 8 }, /* R */ + { 0, 4, 1, 0, 8 }, /* G */ + { 0, 4, 2, 0, 8 }, /* B */ + { 0, 4, 3, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -567,10 +564,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* R */ - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* B */ - { 0, 4, 0, 0, 8, 3, 7, 1 }, /* A */ + { 0, 4, 3, 0, 8 }, /* R */ + { 0, 4, 2, 0, 8 }, /* G */ + { 0, 4, 1, 0, 8 }, /* B */ + { 0, 4, 0, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -580,10 +577,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* R */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */ - { 0, 4, 0, 0, 8, 3, 7, 1 }, /* B */ - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* A */ + { 0, 4, 2, 0, 8 }, /* R */ + { 0, 4, 1, 0, 8 }, /* G */ + { 0, 4, 0, 0, 8 }, /* B */ + { 0, 4, 3, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -593,9 +590,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, .log2_chroma_h= 0, .comp = { - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* R */ - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */ - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* B */ + { 0, 4, 1, 0, 8 }, /* R */ + { 0, 4, 2, 0, 8 }, /* G */ + { 0, 4, 3, 0, 8 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -605,9 +602,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, .log2_chroma_h= 0, .comp = { - { 0, 4, 0, 0, 8, 3, 7, 1 }, /* R */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */ - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* B */ + { 0, 4, 0, 0, 8 }, /* R */ + { 0, 4, 1, 0, 8 }, /* G */ + { 0, 4, 2, 0, 8 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -617,9 +614,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, .log2_chroma_h= 0, .comp = { - { 0, 4, 3, 0, 8, 3, 7, 4 }, /* R */ - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* B */ + { 0, 4, 3, 0, 8 }, /* R */ + { 0, 4, 2, 0, 8 }, /* G */ + { 0, 4, 1, 0, 8 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -629,9 +626,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, .log2_chroma_h= 0, .comp = { - { 0, 4, 2, 0, 8, 3, 7, 3 }, /* R */ - { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */ - { 0, 4, 0, 0, 8, 3, 7, 1 }, /* B */ + { 0, 4, 2, 0, 8 }, /* R */ + { 0, 4, 1, 0, 8 }, /* G */ + { 0, 4, 0, 0, 8 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -641,7 +638,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ + { 0, 2, 0, 0, 9 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BE, .alias = "y9be", @@ -652,7 +649,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ + { 0, 2, 0, 0, 9 }, /* Y */ }, .alias = "y9le", }, @@ -662,7 +659,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ + { 0, 2, 0, 0, 10 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BE, .alias = "y10be", @@ -673,7 +670,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ + { 0, 2, 0, 0, 10 }, /* Y */ }, .alias = "y10le", }, @@ -683,7 +680,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ + { 0, 2, 0, 0, 12 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BE, .alias = "y12be", @@ -694,7 +691,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ + { 0, 2, 0, 0, 12 }, /* Y */ }, .alias = "y12le", }, @@ -704,7 +701,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ + { 0, 2, 0, 0, 14 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BE, .alias = "y14be", @@ -715,7 +712,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ + { 0, 2, 0, 0, 14 }, /* Y */ }, .alias = "y14le", }, @@ -725,7 +722,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ + { 0, 2, 0, 0, 16 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BE, .alias = "y16be", @@ -736,7 +733,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ + { 0, 2, 0, 0, 16 }, /* Y */ }, .alias = "y16le", }, @@ -746,9 +743,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 1, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -758,9 +755,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 1, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -770,9 +767,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -782,9 +779,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -794,9 +791,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -806,9 +803,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -818,10 +815,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ - { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ + { 3, 1, 0, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -831,10 +828,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ - { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ + { 3, 1, 0, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -844,10 +841,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */ - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */ - { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 1, 0, 0, 8 }, /* U */ + { 2, 1, 0, 0, 8 }, /* V */ + { 3, 1, 0, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -857,10 +854,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ - { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ + { 3, 2, 0, 0, 9 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -870,10 +867,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ - { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ + { 3, 2, 0, 0, 9 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -883,10 +880,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ - { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ + { 3, 2, 0, 0, 9 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -896,10 +893,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ - { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ + { 3, 2, 0, 0, 9 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -909,10 +906,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ - { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ + { 3, 2, 0, 0, 9 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -922,10 +919,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ - { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ + { 3, 2, 0, 0, 9 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -935,10 +932,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -948,10 +945,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -961,10 +958,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -974,10 +971,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -987,10 +984,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1000,10 +997,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1013,10 +1010,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1026,10 +1023,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1039,10 +1036,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1052,10 +1049,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1065,10 +1062,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1078,10 +1075,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1091,9 +1088,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 6, 0, 0, 16, 5, 15, 1 }, /* R */ - { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */ - { 0, 6, 4, 0, 16, 5, 15, 5 }, /* B */ + { 0, 6, 0, 0, 16 }, /* R */ + { 0, 6, 2, 0, 16 }, /* G */ + { 0, 6, 4, 0, 16 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE, }, @@ -1103,9 +1100,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 6, 0, 0, 16, 5, 15, 1 }, /* R */ - { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */ - { 0, 6, 4, 0, 16, 5, 15, 5 }, /* B */ + { 0, 6, 0, 0, 16 }, /* R */ + { 0, 6, 2, 0, 16 }, /* G */ + { 0, 6, 4, 0, 16 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1115,10 +1112,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 8, 0, 0, 16, 7, 15, 1 }, /* R */ - { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */ - { 0, 8, 4, 0, 16, 7, 15, 5 }, /* B */ - { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */ + { 0, 8, 0, 0, 16 }, /* R */ + { 0, 8, 2, 0, 16 }, /* G */ + { 0, 8, 4, 0, 16 }, /* B */ + { 0, 8, 6, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1128,10 +1125,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 8, 0, 0, 16, 7, 15, 1 }, /* R */ - { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */ - { 0, 8, 4, 0, 16, 7, 15, 5 }, /* B */ - { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */ + { 0, 8, 0, 0, 16 }, /* R */ + { 0, 8, 2, 0, 16 }, /* G */ + { 0, 8, 4, 0, 16 }, /* B */ + { 0, 8, 6, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1141,9 +1138,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, -1, 3, 5, 1, 4, 0 }, /* R */ - { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */ - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */ + { 0, 2, -1, 3, 5 }, /* R */ + { 0, 2, 0, 5, 6 }, /* G */ + { 0, 2, 0, 0, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, }, @@ -1153,9 +1150,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 1, 3, 5, 1, 4, 2 }, /* R */ - { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */ - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */ + { 0, 2, 1, 3, 5 }, /* R */ + { 0, 2, 0, 5, 6 }, /* G */ + { 0, 2, 0, 0, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1165,9 +1162,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, -1, 2, 5, 1, 4, 0 }, /* R */ - { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */ - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */ + { 0, 2, -1, 2, 5 }, /* R */ + { 0, 2, 0, 5, 5 }, /* G */ + { 0, 2, 0, 0, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, }, @@ -1177,9 +1174,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 1, 2, 5, 1, 4, 2 }, /* R */ - { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */ - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */ + { 0, 2, 1, 2, 5 }, /* R */ + { 0, 2, 0, 5, 5 }, /* G */ + { 0, 2, 0, 0, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1189,9 +1186,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, -1, 0, 4, 1, 3, 0 }, /* R */ - { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */ - { 0, 2, 0, 0, 4, 1, 3, 1 }, /* B */ + { 0, 2, -1, 0, 4 }, /* R */ + { 0, 2, 0, 4, 4 }, /* G */ + { 0, 2, 0, 0, 4 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, }, @@ -1201,9 +1198,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 1, 0, 4, 1, 3, 2 }, /* R */ - { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */ - { 0, 2, 0, 0, 4, 1, 3, 1 }, /* B */ + { 0, 2, 1, 0, 4 }, /* R */ + { 0, 2, 0, 4, 4 }, /* G */ + { 0, 2, 0, 0, 4 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1213,9 +1210,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 6, 4, 0, 16, 5, 15, 5 }, /* R */ - { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */ - { 0, 6, 0, 0, 16, 5, 15, 1 }, /* B */ + { 0, 6, 4, 0, 16 }, /* R */ + { 0, 6, 2, 0, 16 }, /* G */ + { 0, 6, 0, 0, 16 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, }, @@ -1225,9 +1222,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 6, 4, 0, 16, 5, 15, 5 }, /* R */ - { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */ - { 0, 6, 0, 0, 16, 5, 15, 1 }, /* B */ + { 0, 6, 4, 0, 16 }, /* R */ + { 0, 6, 2, 0, 16 }, /* G */ + { 0, 6, 0, 0, 16 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1237,10 +1234,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 8, 4, 0, 16, 7, 15, 5 }, /* R */ - { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */ - { 0, 8, 0, 0, 16, 7, 15, 1 }, /* B */ - { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */ + { 0, 8, 4, 0, 16 }, /* R */ + { 0, 8, 2, 0, 16 }, /* G */ + { 0, 8, 0, 0, 16 }, /* B */ + { 0, 8, 6, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1250,10 +1247,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 8, 4, 0, 16, 7, 15, 5 }, /* R */ - { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */ - { 0, 8, 0, 0, 16, 7, 15, 1 }, /* B */ - { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */ + { 0, 8, 4, 0, 16 }, /* R */ + { 0, 8, 2, 0, 16 }, /* G */ + { 0, 8, 0, 0, 16 }, /* B */ + { 0, 8, 6, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1263,9 +1260,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */ - { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */ - { 0, 2, -1, 3, 5, 1, 4, 0 }, /* B */ + { 0, 2, 0, 0, 5 }, /* R */ + { 0, 2, 0, 5, 6 }, /* G */ + { 0, 2, -1, 3, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, }, @@ -1275,9 +1272,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */ - { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */ - { 0, 2, 1, 3, 5, 1, 4, 2 }, /* B */ + { 0, 2, 0, 0, 5 }, /* R */ + { 0, 2, 0, 5, 6 }, /* G */ + { 0, 2, 1, 3, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1287,9 +1284,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */ - { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */ - { 0, 2, -1, 2, 5, 1, 4, 0 }, /* B */ + { 0, 2, 0, 0, 5 }, /* R */ + { 0, 2, 0, 5, 5 }, /* G */ + { 0, 2, -1, 2, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, }, @@ -1299,9 +1296,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */ - { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */ - { 0, 2, 1, 2, 5, 1, 4, 2 }, /* B */ + { 0, 2, 0, 0, 5 }, /* R */ + { 0, 2, 0, 5, 5 }, /* G */ + { 0, 2, 1, 2, 5 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1311,9 +1308,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 4, 1, 3, 1 }, /* R */ - { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */ - { 0, 2, -1, 0, 4, 1, 3, 0 }, /* B */ + { 0, 2, 0, 0, 4 }, /* R */ + { 0, 2, 0, 4, 4 }, /* G */ + { 0, 2, -1, 0, 4 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, }, @@ -1323,9 +1320,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 4, 1, 3, 1 }, /* R */ - { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */ - { 0, 2, 1, 0, 4, 1, 3, 2 }, /* B */ + { 0, 2, 0, 0, 4 }, /* R */ + { 0, 2, 0, 4, 4 }, /* G */ + { 0, 2, 1, 0, 4 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, @@ -1341,9 +1338,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1353,9 +1350,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1365,9 +1362,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1377,9 +1374,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1389,9 +1386,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1401,9 +1398,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1413,9 +1410,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */ - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */ + { 0, 2, 0, 0, 14 }, /* Y */ + { 1, 2, 0, 0, 14 }, /* U */ + { 2, 2, 0, 0, 14 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1425,9 +1422,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */ - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */ + { 0, 2, 0, 0, 14 }, /* Y */ + { 1, 2, 0, 0, 14 }, /* U */ + { 2, 2, 0, 0, 14 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1437,9 +1434,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1449,9 +1446,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1461,9 +1458,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1473,9 +1470,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1485,9 +1482,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1497,9 +1494,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1509,9 +1506,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1521,9 +1518,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1533,9 +1530,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */ - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */ + { 0, 2, 0, 0, 14 }, /* Y */ + { 1, 2, 0, 0, 14 }, /* U */ + { 2, 2, 0, 0, 14 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1545,9 +1542,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */ - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */ + { 0, 2, 0, 0, 14 }, /* Y */ + { 1, 2, 0, 0, 14 }, /* U */ + { 2, 2, 0, 0, 14 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1557,9 +1554,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1569,9 +1566,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1581,9 +1578,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1593,9 +1590,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */ - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 2, 0, 0, 16 }, /* U */ + { 2, 2, 0, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1605,9 +1602,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1617,9 +1614,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */ - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 2, 0, 0, 10 }, /* U */ + { 2, 2, 0, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1629,9 +1626,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1641,9 +1638,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */ - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */ + { 0, 2, 0, 0, 9 }, /* Y */ + { 1, 2, 0, 0, 9 }, /* U */ + { 2, 2, 0, 0, 9 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1653,9 +1650,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1665,9 +1662,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1677,9 +1674,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */ - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */ + { 0, 2, 0, 0, 14 }, /* Y */ + { 1, 2, 0, 0, 14 }, /* U */ + { 2, 2, 0, 0, 14 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -1689,9 +1686,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */ - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */ + { 0, 2, 0, 0, 14 }, /* Y */ + { 1, 2, 0, 0, 14 }, /* U */ + { 2, 2, 0, 0, 14 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, }, @@ -1711,8 +1708,8 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .name = "ya8", .nb_components = 2, .comp = { - { 0, 2, 0, 0, 8, 1, 7, 1 }, /* Y */ - { 0, 2, 1, 0, 8, 1, 7, 2 }, /* A */ + { 0, 2, 0, 0, 8 }, /* Y */ + { 0, 2, 1, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_ALPHA, .alias = "gray8a", @@ -1721,8 +1718,8 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .name = "ya16le", .nb_components = 2, .comp = { - { 0, 4, 0, 0, 16, 3, 15, 1 }, /* Y */ - { 0, 4, 2, 0, 16, 3, 15, 3 }, /* A */ + { 0, 4, 0, 0, 16 }, /* Y */ + { 0, 4, 2, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_ALPHA, }, @@ -1730,8 +1727,8 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .name = "ya16be", .nb_components = 2, .comp = { - { 0, 4, 0, 0, 16, 3, 15, 1 }, /* Y */ - { 0, 4, 2, 0, 16, 3, 15, 3 }, /* A */ + { 0, 4, 0, 0, 16 }, /* Y */ + { 0, 4, 2, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA, }, @@ -1745,9 +1742,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* R */ - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* G */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* B */ + { 2, 1, 0, 0, 8 }, /* R */ + { 0, 1, 0, 0, 8 }, /* G */ + { 1, 1, 0, 0, 8 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1757,9 +1754,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* R */ - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* G */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* B */ + { 2, 2, 0, 0, 9 }, /* R */ + { 0, 2, 0, 0, 9 }, /* G */ + { 1, 2, 0, 0, 9 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1769,9 +1766,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 9, 1, 8, 1 }, /* R */ - { 0, 2, 0, 0, 9, 1, 8, 1 }, /* G */ - { 1, 2, 0, 0, 9, 1, 8, 1 }, /* B */ + { 2, 2, 0, 0, 9 }, /* R */ + { 0, 2, 0, 0, 9 }, /* G */ + { 1, 2, 0, 0, 9 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1781,9 +1778,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */ - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */ + { 2, 2, 0, 0, 10 }, /* R */ + { 0, 2, 0, 0, 10 }, /* G */ + { 1, 2, 0, 0, 10 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1793,9 +1790,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */ - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */ + { 2, 2, 0, 0, 10 }, /* R */ + { 0, 2, 0, 0, 10 }, /* G */ + { 1, 2, 0, 0, 10 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1805,9 +1802,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */ - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */ + { 2, 2, 0, 0, 12 }, /* R */ + { 0, 2, 0, 0, 12 }, /* G */ + { 1, 2, 0, 0, 12 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1817,9 +1814,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */ - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */ + { 2, 2, 0, 0, 12 }, /* R */ + { 0, 2, 0, 0, 12 }, /* G */ + { 1, 2, 0, 0, 12 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1829,9 +1826,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* R */ - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* G */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* B */ + { 2, 2, 0, 0, 14 }, /* R */ + { 0, 2, 0, 0, 14 }, /* G */ + { 1, 2, 0, 0, 14 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1841,9 +1838,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 14, 1, 13, 1 }, /* R */ - { 0, 2, 0, 0, 14, 1, 13, 1 }, /* G */ - { 1, 2, 0, 0, 14, 1, 13, 1 }, /* B */ + { 2, 2, 0, 0, 14 }, /* R */ + { 0, 2, 0, 0, 14 }, /* G */ + { 1, 2, 0, 0, 14 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1853,9 +1850,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */ - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */ + { 2, 2, 0, 0, 16 }, /* R */ + { 0, 2, 0, 0, 16 }, /* G */ + { 1, 2, 0, 0, 16 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1865,9 +1862,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */ - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */ + { 2, 2, 0, 0, 16 }, /* R */ + { 0, 2, 0, 0, 16 }, /* G */ + { 1, 2, 0, 0, 16 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, }, @@ -1877,10 +1874,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 1, 0, 0, 8, 0, 7, 1 }, /* R */ - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* G */ - { 1, 1, 0, 0, 8, 0, 7, 1 }, /* B */ - { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */ + { 2, 1, 0, 0, 8 }, /* R */ + { 0, 1, 0, 0, 8 }, /* G */ + { 1, 1, 0, 0, 8 }, /* B */ + { 3, 1, 0, 0, 8 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, @@ -1891,10 +1888,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */ - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 2, 2, 0, 0, 16 }, /* R */ + { 0, 2, 0, 0, 16 }, /* G */ + { 1, 2, 0, 0, 16 }, /* B */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, @@ -1905,10 +1902,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */ - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */ - { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */ - { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */ + { 2, 2, 0, 0, 16 }, /* R */ + { 0, 2, 0, 0, 16 }, /* G */ + { 1, 2, 0, 0, 16 }, /* B */ + { 3, 2, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, @@ -1925,9 +1922,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 6, 0, 4, 12, 5, 11, 1 }, /* X */ - { 0, 6, 2, 4, 12, 5, 11, 3 }, /* Y */ - { 0, 6, 4, 4, 12, 5, 11, 5 }, /* Z */ + { 0, 6, 0, 4, 12 }, /* X */ + { 0, 6, 2, 4, 12 }, /* Y */ + { 0, 6, 4, 4, 12 }, /* Z */ }, /*.flags = -- not used*/ }, @@ -1937,9 +1934,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 6, 0, 4, 12, 5, 11, 1 }, /* X */ - { 0, 6, 2, 4, 12, 5, 11, 3 }, /* Y */ - { 0, 6, 4, 4, 12, 5, 11, 5 }, /* Z */ + { 0, 6, 0, 4, 12 }, /* X */ + { 0, 6, 2, 4, 12 }, /* Y */ + { 0, 6, 4, 4, 12 }, /* Z */ }, .flags = AV_PIX_FMT_FLAG_BE, }, @@ -1949,9 +1946,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, \ .log2_chroma_h= 0, \ .comp = { \ - {0,1,0,0,2,0,1,1},\ - {0,1,0,0,4,0,3,1},\ - {0,1,0,0,2,0,1,1},\ + { 0, 1, 0, 0, 2 }, \ + { 0, 1, 0, 0, 4 }, \ + { 0, 1, 0, 0, 2 }, \ }, \ #define BAYER16_DESC_COMMON \ @@ -1959,9 +1956,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w= 0, \ .log2_chroma_h= 0, \ .comp = { \ - {0,2,0,0,4,1,3,1},\ - {0,2,0,0,8,1,7,1},\ - {0,2,0,0,4,1,3,1},\ + { 0, 2, 0, 0, 4 }, \ + { 0, 2, 0, 0, 8 }, \ + { 0, 2, 0, 0, 4 }, \ }, \ [AV_PIX_FMT_BAYER_BGGR8] = { @@ -2030,9 +2027,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 2, 0, 0, 8, 1, 7, 1 }, /* U */ - { 1, 2, 1, 0, 8, 1, 7, 2 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 2, 0, 0, 8 }, /* U */ + { 1, 2, 1, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -2042,9 +2039,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 4, 0, 0, 10, 3, 9, 1 }, /* U */ - { 1, 4, 2, 0, 10, 3, 9, 3 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 4, 0, 0, 10 }, /* U */ + { 1, 4, 2, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -2054,9 +2051,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */ - { 1, 4, 0, 0, 10, 3, 9, 1 }, /* U */ - { 1, 4, 2, 0, 10, 3, 9, 3 }, /* V */ + { 0, 2, 0, 0, 10 }, /* Y */ + { 1, 4, 0, 0, 10 }, /* U */ + { 1, 4, 2, 0, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, }, @@ -2082,10 +2079,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 8, 2, 0, 16, 7, 15, 3 }, /* Y */ - { 0, 8, 4, 0, 16, 7, 15, 5 }, /* U */ - { 0, 8, 6, 0, 16, 7, 15, 7 }, /* V */ - { 0, 8, 0, 0, 16, 7, 15, 1 }, /* A */ + { 0, 8, 2, 0, 16 }, /* Y */ + { 0, 8, 4, 0, 16 }, /* U */ + { 0, 8, 6, 0, 16 }, /* V */ + { 0, 8, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_ALPHA, }, @@ -2095,10 +2092,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 8, 2, 0, 16, 7, 15, 3 }, /* Y */ - { 0, 8, 4, 0, 16, 7, 15, 5 }, /* U */ - { 0, 8, 6, 0, 16, 7, 15, 7 }, /* V */ - { 0, 8, 0, 0, 16, 7, 15, 1 }, /* A */ + { 0, 8, 2, 0, 16 }, /* Y */ + { 0, 8, 4, 0, 16 }, /* U */ + { 0, 8, 6, 0, 16 }, /* V */ + { 0, 8, 0, 0, 16 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA, }, @@ -2108,9 +2105,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 6, 10, 1, 9, 1 }, /* Y */ - { 1, 4, 0, 6, 10, 3, 9, 1 }, /* U */ - { 1, 4, 2, 6, 10, 3, 9, 3 }, /* V */ + { 0, 2, 0, 6, 10 }, /* Y */ + { 1, 4, 0, 6, 10 }, /* U */ + { 1, 4, 2, 6, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -2120,9 +2117,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 6, 10, 1, 9, 1 }, /* Y */ - { 1, 4, 0, 6, 10, 3, 9, 1 }, /* U */ - { 1, 4, 2, 6, 10, 3, 9, 3 }, /* V */ + { 0, 2, 0, 6, 10 }, /* Y */ + { 1, 4, 0, 6, 10 }, /* U */ + { 1, 4, 2, 6, 10 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, }, @@ -2132,9 +2129,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 4, 0, 0, 16, 3, 15, 1 }, /* U */ - { 1, 4, 2, 0, 16, 3, 15, 3 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 4, 0, 0, 16 }, /* U */ + { 1, 4, 2, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -2144,9 +2141,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 1, .comp = { - { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */ - { 1, 4, 0, 0, 16, 3, 15, 1 }, /* U */ - { 1, 4, 2, 0, 16, 3, 15, 3 }, /* V */ + { 0, 2, 0, 0, 16 }, /* Y */ + { 1, 4, 0, 0, 16 }, /* U */ + { 1, 4, 2, 0, 16 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, }, @@ -2156,10 +2153,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */ - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */ - { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */ + { 2, 2, 0, 0, 12 }, /* R */ + { 0, 2, 0, 0, 12 }, /* G */ + { 1, 2, 0, 0, 12 }, /* B */ + { 3, 2, 0, 0, 12 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, @@ -2170,10 +2167,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */ - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */ - { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */ + { 2, 2, 0, 0, 12 }, /* R */ + { 0, 2, 0, 0, 12 }, /* G */ + { 1, 2, 0, 0, 12 }, /* B */ + { 3, 2, 0, 0, 12 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, @@ -2184,10 +2181,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */ - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 2, 2, 0, 0, 10 }, /* R */ + { 0, 2, 0, 0, 10 }, /* G */ + { 1, 2, 0, 0, 10 }, /* B */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, @@ -2198,10 +2195,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */ - { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */ - { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */ - { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */ + { 2, 2, 0, 0, 10 }, /* R */ + { 0, 2, 0, 0, 10 }, /* G */ + { 1, 2, 0, 0, 10 }, /* B */ + { 3, 2, 0, 0, 10 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, @@ -2216,9 +2213,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */ - { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */ - { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */ + { 2, 4, 0, 0, 32 }, /* R */ + { 0, 4, 0, 0, 32 }, /* G */ + { 1, 4, 0, 0, 32 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, @@ -2229,9 +2226,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */ - { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */ - { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */ + { 2, 4, 0, 0, 32 }, /* R */ + { 0, 4, 0, 0, 32 }, /* G */ + { 1, 4, 0, 0, 32 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_RGB, }, @@ -2241,10 +2238,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */ - { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */ - { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */ - { 3, 4, 0, 0, 32, 3, 31, 1 }, /* A */ + { 2, 4, 0, 0, 32 }, /* R */ + { 0, 4, 0, 0, 32 }, /* G */ + { 1, 4, 0, 0, 32 }, /* B */ + { 3, 4, 0, 0, 32 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_RGB | @@ -2256,10 +2253,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */ - { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */ - { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */ - { 3, 4, 0, 0, 32, 3, 31, 1 }, /* A */ + { 2, 4, 0, 0, 32 }, /* R */ + { 0, 4, 0, 0, 32 }, /* G */ + { 1, 4, 0, 0, 32 }, /* B */ + { 3, 4, 0, 0, 32 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, @@ -2278,7 +2275,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 0, 0, 32, 3, 31, 1 }, /* Y */ + { 0, 4, 0, 0, 32 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT, .alias = "yf32be", @@ -2289,7 +2286,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 4, 0, 0, 32, 3, 31, 1 }, /* Y */ + { 0, 4, 0, 0, 32 }, /* Y */ }, .flags = AV_PIX_FMT_FLAG_FLOAT, .alias = "yf32le", @@ -2300,10 +2297,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ - { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ + { 3, 2, 0, 0, 12 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -2313,10 +2310,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 1, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ - { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ + { 3, 2, 0, 0, 12 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -2326,10 +2323,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ - { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ + { 3, 2, 0, 0, 12 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -2339,10 +2336,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */ - { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */ - { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */ - { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */ + { 0, 2, 0, 0, 12 }, /* Y */ + { 1, 2, 0, 0, 12 }, /* U */ + { 2, 2, 0, 0, 12 }, /* V */ + { 3, 2, 0, 0, 12 }, /* A */ }, .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, }, @@ -2352,9 +2349,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 2, 0, 0, 8, 1, 7, 1 }, /* U */ - { 1, 2, 1, 0, 8, 1, 7, 2 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 2, 0, 0, 8 }, /* U */ + { 1, 2, 1, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -2364,9 +2361,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */ - { 1, 2, 1, 0, 8, 1, 7, 2 }, /* U */ - { 1, 2, 0, 0, 8, 1, 7, 1 }, /* V */ + { 0, 1, 0, 0, 8 }, /* Y */ + { 1, 2, 1, 0, 8 }, /* U */ + { 1, 2, 0, 0, 8 }, /* V */ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, @@ -2375,9 +2372,6 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .flags = AV_PIX_FMT_FLAG_HWACCEL, }, }; -#if FF_API_PLUS1_MINUS1 -FF_ENABLE_DEPRECATION_WARNINGS -#endif static const char * const color_range_names[] = { [AVCOL_RANGE_UNSPECIFIED] = "unknown", diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index 9b9d386ae9..81b51b767f 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -56,17 +56,6 @@ typedef struct AVComponentDescriptor { * Number of bits in the component. */ int depth; - -#if FF_API_PLUS1_MINUS1 - /** deprecated, use step instead */ - attribute_deprecated int step_minus1; - - /** deprecated, use depth instead */ - attribute_deprecated int depth_minus1; - - /** deprecated, use offset instead */ - attribute_deprecated int offset_plus1; -#endif } AVComponentDescriptor; /** diff --git a/libavutil/version.h b/libavutil/version.h index 2aa67060d2..2eb3d3c756 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_PLUS1_MINUS1 -#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_ERROR_FRAME #define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 57) #endif From patchwork Mon Apr 19 14:10:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27062 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp563449iob; Mon, 19 Apr 2021 07:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMpIpaz+ijGTSlv1QE/zs0h4f0qOIxmczIpjDTifDOdWnA64z7lE7OjyXLaJjIDcpCVn8m X-Received: by 2002:a17:906:f42:: with SMTP id h2mr22896917ejj.317.1618842048518; Mon, 19 Apr 2021 07:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842048; cv=none; d=google.com; s=arc-20160816; b=Jj3nvZQpvVU6/BGbimw4wkN4HwxNIlnpwLxnbw4Yf1rt8qALUh98Blmcv9EGPOl+L9 AK+ZCxkdlUfXwl3AP1Ye+H2DzhynpDsHUYgs44y9DA11JnAQ4c2yGfNmazbSHsVujOE+ ZDzr29smOxX4U6BRZN/KnO0Pn+ErJ7g7U8Z9n2Fk5B4bx4Tqm9YzI/r9vcp/CK+kWpkc 3sfvp6IQQ0fMbtnOwUwN9/kNMO+Z/beoBH5D9tTMr5vZxsruaWowqfqGT0+ndYIA40Js JchuA5idWs7tNDwvHMd6vVIrGOX9gObn8cBYyJuz8ycUgkW2IvBEtR4EA33AZzf8r3cE KCOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=bWUgjp3awO/JReDbjzeKugFwe1zoQqzYmmOdQThTl1g=; b=wkSsmpyY/U2c2lbV3Z6/plE6FZbbEN/VY4R/DfSAcO+w1uSUx8/3vjC4cjL3Sy63T8 /jujAAk27EtNXP83rTOCFwPzd02OvB38I2KWk2zDm7s3gRDz/aL8rp7Otvtvda38BgCG +QlO5UYUR4muwWY5YSiWQjMmQyAZAoV0qJI43RJ32a6weyT3AOkzUmn0tGIPKTC1uVdM OGTE5QvrGL1mbCaCku0NLBne2E2JWjz0tZD4vxTWL4yaUmPmGEoigIxo4Yz5oW3svxAn ryHEvaLIT3pGBOyYxqUYoSOjzXSIW0Z3xkr+d3OLTk9ebpglQUEjDlR9v3M/PDYlzw+t fffA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="t//NW4uG"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y25si9439391ejb.256.2021.04.19.07.20.48; Mon, 19 Apr 2021 07:20:48 -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=@gmail.com header.s=20161025 header.b="t//NW4uG"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1DEE2689BD5; Mon, 19 Apr 2021 17:12:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1F98E689AFD for ; Mon, 19 Apr 2021 17:12:22 +0300 (EEST) Received: by mail-qk1-f176.google.com with SMTP id t17so7382660qkg.4 for ; Mon, 19 Apr 2021 07:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dggSBS0HyjE6URkknUZU2/n8BRTT+UEAtdnWQrFmL5Y=; b=t//NW4uGggCNGOJF2hi22CLiAeomzkXpGbo7NRSBkCsO/VeQqAZ5X+tZa25fygx7oS wgq3G/0R/ok1LoYke6mIaqn/NOZy6O8MBa1WucAxJudZsIhTD9k3Wu+di9MVN94sRUtP gBuxY5VM2jfWWRYISOBKp3MRCbML6zVTaxYAb1xLI4J20JRKsIuVvANbEBAJdpn7JB7j POlAMOotr1lbrG2YdRoMN8SU7zCh1C2s3RclgqLgqfbTyXohBbR5/cP08WK9B2CuinbF aDY0nprFqvULQYjuszTsBViatwf7GsxJ9LnD16t+6p0y8+kN+W4D9vhKnITvI3KmjISq XV3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dggSBS0HyjE6URkknUZU2/n8BRTT+UEAtdnWQrFmL5Y=; b=fwi1SHtNr0jQlFWs2DUthPTcCXpsyAZ7Vfq2a20Arn6xbv+UkBPPyEQc5yBxjH3J4X qrC0ZhCUuz8KYtZSTVqyRD9gIqvMNAgqxY64fxqKRStNFygzfPoICnPxlya5pvBsKHfQ tDAV/6CsFu5sy+LDWZeJiPpJ88EEs8oY8sVs3rjGbvz93xS4KfxsoC1FduT5obAKq79p 0W6zPQb232YT2gfs21SM6Ww6AmAEI0Oc4ESjaHJJQILoths4KmNTez2IkL2qV1iQqhuR 0PJSRExqzi6IKRk4RjRJgiBEci6m7hRb8Adv/p52iDUC7N2IG5vU605SPSYNKp51mEc+ DcnQ== X-Gm-Message-State: AOAM531BaDSFb/aWdymQHH7Xhx1HxqZoHeTNnN35+vpc2Zdgdo2QGntZ erIkRW8+RT3ZnZOn2T6C6NWNtXy9MvQ= X-Received: by 2002:a37:a98e:: with SMTP id s136mr3484054qke.16.1618841540694; Mon, 19 Apr 2021 07:12:20 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:20 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:02 -0300 Message-Id: <20210419141024.8174-66-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 65/87] avutil/frame: Remove deprecated AVFrame.error 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pBtWcm9Q3uxZ From: Andreas Rheinhardt Deprecated in 1aa24df74c052a73175c43e57d35b4835e537ec8. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 7 ------- libavcodec/snowenc.c | 6 ------ libavfilter/vf_swapuv.c | 6 ------ libavutil/frame.c | 6 ------ libavutil/frame.h | 8 -------- libavutil/version.h | 3 --- 6 files changed, 36 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 0aa94dc7d8..f50f6cdeff 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1604,13 +1604,6 @@ static void frame_end(MpegEncContext *s) s->last_lambda_for [s->pict_type] = s->current_picture_ptr->f->quality; if (s->pict_type!= AV_PICTURE_TYPE_B) s->last_non_b_pict_type = s->pict_type; - -#if FF_API_ERROR_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - memcpy(s->current_picture.f->error, s->current_picture.encoding_error, - sizeof(s->current_picture.encoding_error)); -FF_ENABLE_DEPRECATION_WARNINGS -#endif } static void update_noise_reduction(MpegEncContext *s) diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 255968341a..e694d51a67 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1865,12 +1865,6 @@ redo_frame: (s->avctx->flags&AV_CODEC_FLAG_PSNR) ? 4 : 0, s->current_picture->pict_type); -#if FF_API_ERROR_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - memcpy(s->current_picture->error, s->encoding_error, sizeof(s->encoding_error)); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - pkt->size = ff_rac_terminate(c, 0); if (s->current_picture->key_frame) pkt->flags |= AV_PKT_FLAG_KEY; diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c index 8d62c48c4f..720e699c4a 100644 --- a/libavfilter/vf_swapuv.c +++ b/libavfilter/vf_swapuv.c @@ -46,12 +46,6 @@ static void do_swap(AVFrame *frame) FFSWAP(uint8_t*, frame->data[1], frame->data[2]); FFSWAP(int, frame->linesize[1], frame->linesize[2]); FFSWAP(AVBufferRef*, frame->buf[1], frame->buf[2]); - -#if FF_API_ERROR_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - FFSWAP(uint64_t, frame->error[1], frame->error[2]); -FF_ENABLE_DEPRECATION_WARNINGS -#endif } static AVFrame *get_video_buffer(AVFilterLink *link, int w, int h) diff --git a/libavutil/frame.c b/libavutil/frame.c index df826fbfb7..d69dd38dc4 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -316,12 +316,6 @@ FF_ENABLE_DEPRECATION_WARNINGS av_dict_copy(&dst->metadata, src->metadata, 0); -#if FF_API_ERROR_FRAME -FF_DISABLE_DEPRECATION_WARNINGS - memcpy(dst->error, src->error, sizeof(dst->error)); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - for (i = 0; i < src->nb_side_data; i++) { const AVFrameSideData *sd_src = src->side_data[i]; AVFrameSideData *sd_dst; diff --git a/libavutil/frame.h b/libavutil/frame.h index fbecebbd70..23396189d9 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -434,14 +434,6 @@ typedef struct AVFrame { */ void *opaque; -#if FF_API_ERROR_FRAME - /** - * @deprecated unused - */ - attribute_deprecated - uint64_t error[AV_NUM_DATA_POINTERS]; -#endif - /** * When decoding, this signals how much the picture must be delayed. * extra_delay = repeat_pict / (2*fps) diff --git a/libavutil/version.h b/libavutil/version.h index 2eb3d3c756..a72788d8e4 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_ERROR_FRAME -#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_PKT_PTS #define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 57) #endif From patchwork Mon Apr 19 14:10:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27065 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp563938iob; Mon, 19 Apr 2021 07:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIygdLuuHHCH2UCkvzfPvDvBuY6q1fk2FyeF6OhDCEmjZ9uSkUCIDZtFipnuqYapWsw1H/ X-Received: by 2002:a17:906:6544:: with SMTP id u4mr3855138ejn.455.1618842079012; Mon, 19 Apr 2021 07:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842079; cv=none; d=google.com; s=arc-20160816; b=iGofV1AMakbUOddtdBsQzcWji4fHWdJXQdw0ZJZEwGwsjnetXWaI2M87qmasyau2vj XQh9+VEM0YlJGP6gD6CCiQjzazMSEPHIg3iK6D9oZ36WRze1a4eFyKa9PYA6USQWH8pA kZ0LLhWy0ajVJgQkHE0y3E15m+X411HTzYA3j8wkP1XVxTJlP+lcE4iNW9l074mulszJ HY/wxrLsHG65CDoi/42EAsBk4L1UZ9nPo3ePJC/HPAH/hqbVLJM1uLLHc6W08dpyy5CW tgEO5kuaXFGuCuxPmPnaFdGrDLq2DeuC239/tXP51brqhfoLBQGBM1CW1fEfZFUCnPhr 6jiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=QoGVT6iGLPRA/xOVCxHLNZ5RkHtEOzBwL2+En9OKuxc=; b=DSFwvyFO/hUAtftxr7KyZbWVOd9v3QoCsG3ljlKBlCB9Ed6RmV2jP6Pqb+5wW5I2FF OGRxALIf+Sr6zIEuPRI68IxZm1vM7cyJfw/r1IfB8Pi7KGYNYFI+uw93ZJTh9JJq9a0N VS/KPvjTN6yeYMRrm6naC2cDWTqewmgbNkNrc7hifqi4+h72qYYFlJzgNkisJYGpYXcU tdXBB/qbOMg7nFoYPZw8g8zNtpnnqc0I3n1yMSwqlPlHjKQ6x9OIl7kjYLXdSoDx54iV uW8BDiueWkFvOeOTz47DZJYEP5xxFI23zwEY/mWbGjSFDJ70lvZ44MmaRRfeWPHSIrKg za6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=mD4bkmBV; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id kq15si12404434ejb.556.2021.04.19.07.21.18; Mon, 19 Apr 2021 07:21: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=@gmail.com header.s=20161025 header.b=mD4bkmBV; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BDCA689C28; Mon, 19 Apr 2021 17:12:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7A05D689AF5 for ; Mon, 19 Apr 2021 17:12:23 +0300 (EEST) Received: by mail-qk1-f175.google.com with SMTP id 8so2103905qkv.8 for ; Mon, 19 Apr 2021 07:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=jildpsJWtFW523L3zU4UAXEbNtzMNJBjSdlkvDgeufA=; b=mD4bkmBVtvncR3c58Dx8nyMBeKsdhf+/vC37jERJ688MxGnlzSYgZscULKMODOttdj 9S0qeyLP4kICiDaRp0OsCqC0X8mJm16BNzJ8FzknP1oWlw7adheRFBpeQ0htG6YC1A1c wfr7gouihIYSt9wmp+SqGgcH8f9Y0hFUulgfN9cqiwywPHkLw1XfHYWFP8NoDOkHxqry BYdBqzmrKDgnt7TzHHIQ3dbOF0FbUQlKGLAqdSjIHIzyNNpblYU4qXAQQhPowdLqPTta 3ywEP+NwpMoHh7ipBfelaIGHBPERfESYFi5GOYb9kuxQfK6SM2ti9o+1yq+HsOt7pPFD jj/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jildpsJWtFW523L3zU4UAXEbNtzMNJBjSdlkvDgeufA=; b=ghyxs8koT/NMp9mmEiHSio0AuVbgcZWSyqyVCKxnigJj84zJMa4ba/BKLF5Yc1Y0Lr 9Q1il0LGRfcz9cwumWDm/U4x3JTtBe13s7jaMM8osfiOzKprqRuehGJ+NSinSNUXxLnI a49mk58+XdLFwyw0kw3zhse3xbYfLpevg8GPXQvpaDsI2b5MrodpPaohUlATcp8ww4C+ DZRbFNujjPtm51dt3XCHjiemj13/WR1EGUNOvhH+NO2t0+gPDb+pGzBjTioYo7/IhlS8 03saRgfQxcw6E6EpDAjIRe4+vw3q4TCmicQF4jmpP8R7aP23D4/NucSi450HuYcZ15ma IlWQ== X-Gm-Message-State: AOAM531VzEANx5PULP7wUoupO/tXpQNSXeCQPhCt3FYnYdde7Vs7Kzea VMhOox8if6uDCwrboLFjWlhsqpNZnpA= X-Received: by 2002:a37:e412:: with SMTP id y18mr6055817qkf.40.1618841541944; Mon, 19 Apr 2021 07:12:21 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:21 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:03 -0300 Message-Id: <20210419141024.8174-67-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 66/87] avutil/frame: Remove deprecated AVFrame.pkt_pts field 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: dIF7223qyWbl From: Andreas Rheinhardt Deprecated in 32c8359093d1ff4f45ed19518b449b3ac3769d27. Signed-off-by: Andreas Rheinhardt --- libavcodec/audiotoolboxdec.c | 5 ----- libavcodec/crystalhd.c | 5 ----- libavcodec/cuviddec.c | 5 ----- libavcodec/decode.c | 11 ----------- libavcodec/gifdec.c | 5 ----- libavcodec/libdav1d.c | 5 ----- libavcodec/libopenh264dec.c | 5 ----- libavcodec/mediacodecdec_common.c | 10 ---------- libavcodec/mmaldec.c | 5 ----- libavcodec/qsvdec.c | 5 ----- libavcodec/vp9.c | 5 ----- libavutil/frame.c | 10 ---------- libavutil/frame.h | 9 --------- libavutil/version.h | 3 --- 14 files changed, 88 deletions(-) diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c index bf3e00959f..fa55f58988 100644 --- a/libavcodec/audiotoolboxdec.c +++ b/libavcodec/audiotoolboxdec.c @@ -540,11 +540,6 @@ static int ffat_decode(AVCodecContext *avctx, void *data, *got_frame_ptr = 1; if (at->last_pts != AV_NOPTS_VALUE) { frame->pts = at->last_pts; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = at->last_pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif at->last_pts = avpkt->pts; } } else if (ret && ret != 1) { diff --git a/libavcodec/crystalhd.c b/libavcodec/crystalhd.c index 228803183a..fbfe5e8f62 100644 --- a/libavcodec/crystalhd.c +++ b/libavcodec/crystalhd.c @@ -537,11 +537,6 @@ static inline CopyRet copy_frame(AVCodecContext *avctx, frame->top_field_first = !bottom_first; frame->pts = pkt_pts; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = pkt_pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pkt_pos = -1; frame->pkt_duration = 0; diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index ec57afdefe..1e5e3ea9a6 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -614,11 +614,6 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame) /* CUVIDs opaque reordering breaks the internal pkt logic. * So set pkt_pts and clear all the other pkt_ fields. */ -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = frame->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pkt_pos = -1; frame->pkt_duration = 0; frame->pkt_size = -1; diff --git a/libavcodec/decode.c b/libavcodec/decode.c index dbc3f0110b..1a7c37043e 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -394,12 +394,6 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, avctx->pkt_timebase); if(frame->pts!=AV_NOPTS_VALUE) frame->pts += diff_ts; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - if(frame->pkt_pts!=AV_NOPTS_VALUE) - frame->pkt_pts += diff_ts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if(frame->pkt_dts!=AV_NOPTS_VALUE) frame->pkt_dts += diff_ts; if (frame->pkt_duration >= diff_ts) @@ -1504,11 +1498,6 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) pkt, sizeof(*pkt), NULL); frame->pts = pkt->pts; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = pkt->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pkt_pos = pkt->pos; frame->pkt_duration = pkt->duration; frame->pkt_size = pkt->size; diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index 1906a4c738..dffc860bbc 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -472,11 +472,6 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, A bytestream2_init(&s->gb, avpkt->data, avpkt->size); s->frame->pts = avpkt->pts; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - s->frame->pkt_pts = avpkt->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif s->frame->pkt_dts = avpkt->dts; s->frame->pkt_duration = avpkt->duration; diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 3c2a68b7e0..90c531fb91 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -314,11 +314,6 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) // match timestamps and packet size frame->pts = p->m.timestamp; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = p->m.timestamp; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pkt_dts = p->m.timestamp; frame->pkt_pos = p->m.offset; frame->pkt_size = p->m.size; diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c index c7aa7fa19c..832bfc49ef 100644 --- a/libavcodec/libopenh264dec.c +++ b/libavcodec/libopenh264dec.c @@ -144,11 +144,6 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data, avframe->pts = info.uiOutYuvTimeStamp; avframe->pkt_dts = AV_NOPTS_VALUE; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - avframe->pkt_pts = avpkt->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif #if OPENH264_VER_AT_LEAST(1, 7) (*s->decoder)->GetOption(s->decoder, DECODER_OPTION_PROFILE, &opt); avctx->profile = opt; diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index 404ed28227..cb18aed401 100644 --- a/libavcodec/mediacodecdec_common.c +++ b/libavcodec/mediacodecdec_common.c @@ -293,11 +293,6 @@ static int mediacodec_wrap_hw_buffer(AVCodecContext *avctx, } else { frame->pts = info->presentationTimeUs; } -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = frame->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pkt_dts = AV_NOPTS_VALUE; frame->color_range = avctx->color_range; frame->color_primaries = avctx->color_primaries; @@ -386,11 +381,6 @@ static int mediacodec_wrap_sw_buffer(AVCodecContext *avctx, } else { frame->pts = info->presentationTimeUs; } -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = frame->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pkt_dts = AV_NOPTS_VALUE; av_log(avctx, AV_LOG_TRACE, diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index cb15ac072a..db9e4f9589 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -656,11 +656,6 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, } frame->pts = buffer->pts == MMAL_TIME_UNKNOWN ? AV_NOPTS_VALUE : buffer->pts; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = frame->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pkt_dts = AV_NOPTS_VALUE; done: diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 5f2e641373..bf843c8ca2 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -544,11 +544,6 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, outsurf = &out_frame->surface; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = outsurf->Data.TimeStamp; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->pts = outsurf->Data.TimeStamp; frame->repeat_pict = diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 4659f94ee8..b4b644d509 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -1572,11 +1572,6 @@ static int vp9_decode_frame(AVCodecContext *avctx, void *frame, if ((ret = av_frame_ref(frame, s->s.refs[ref].f)) < 0) return ret; ((AVFrame *)frame)->pts = pkt->pts; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - ((AVFrame *)frame)->pkt_pts = pkt->pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif ((AVFrame *)frame)->pkt_dts = pkt->dts; for (i = 0; i < 8; i++) { if (s->next_refs[i].f->buf[0]) diff --git a/libavutil/frame.c b/libavutil/frame.c index d69dd38dc4..e29008752c 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -72,11 +72,6 @@ static void get_frame_defaults(AVFrame *frame) frame->pts = frame->pkt_dts = AV_NOPTS_VALUE; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - frame->pkt_pts = AV_NOPTS_VALUE; -FF_ENABLE_DEPRECATION_WARNINGS -#endif frame->best_effort_timestamp = AV_NOPTS_VALUE; frame->pkt_duration = 0; frame->pkt_pos = -1; @@ -292,11 +287,6 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) dst->palette_has_changed = src->palette_has_changed; dst->sample_rate = src->sample_rate; dst->opaque = src->opaque; -#if FF_API_PKT_PTS -FF_DISABLE_DEPRECATION_WARNINGS - dst->pkt_pts = src->pkt_pts; -FF_ENABLE_DEPRECATION_WARNINGS -#endif dst->pkt_dts = src->pkt_dts; dst->pkt_pos = src->pkt_pos; dst->pkt_size = src->pkt_size; diff --git a/libavutil/frame.h b/libavutil/frame.h index 23396189d9..43345bcdee 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -399,15 +399,6 @@ typedef struct AVFrame { */ int64_t pts; -#if FF_API_PKT_PTS - /** - * PTS copied from the AVPacket that was decoded to produce this frame. - * @deprecated use the pts field instead - */ - attribute_deprecated - int64_t pkt_pts; -#endif - /** * DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used) * This is also the Presentation time of this AVFrame calculated from diff --git a/libavutil/version.h b/libavutil/version.h index a72788d8e4..dbeb7ffe23 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_PKT_PTS -#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_CRYPTO_SIZE_T #define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57) #endif From patchwork Mon Apr 19 14:10:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27056 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp564116iob; Mon, 19 Apr 2021 07:21:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0y4fJbwPP2w3SeE/ceznK1Wk7pfJaJMBJ9F6MIb1CaSJuQOYYyT5KfdtQjgwiZ1vqWABG X-Received: by 2002:a50:82e5:: with SMTP id 92mr26003352edg.141.1618842093360; Mon, 19 Apr 2021 07:21:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842093; cv=none; d=google.com; s=arc-20160816; b=wFy+qpId0cQ79NwkwZ0eYtc9+FUzI+J7s5OH4IwAE0k9+GREJz1XL3m2dNbbP6DhQF 5t79xhCbi3h/Zfh5f2ZTBO6C97UpsjbMw4be1EPxho1J6fw9341k8iOUvsvvz0icuSkU cDqkA/zBtCjtcJdduT1aTkDxWiLqs7whXmAvVYqxQE2wI3K6qUnbICDLoIS+MZKFrgtp sy1X0dmDfhspVmXnGOnbODuBCMoTBnVTx1CYD6o4m8m3cQ7qSeNVUJavAwb2JALRPj/a 3SpRgdcAC3fiYu6q93i8FjW7aFUIiRqarzhTYuqmeekaGslOEUMZH8zwzSW7ez9e8mSS z1VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=RmbQl3Ucgf/485fz4OJeJNnx8/h7/Wtghal2KkFQ0ww=; b=rUVAWuOFfaXSkWmyYgjrCKAXAr2p1HFBbSLurDaS8bQVE56vYpXGVODLpxzrdso5fh g6/RGyLqQT3DRxlmUoFTwAE7+QZmgaNaTRoYh1+bHm91AXErRkmi26hXm2YvaTX9Zb+/ buNvf2TSeW6q7uy6A1nKWAMBNnVdOHwjY6UBOW4EPP+Y0Pvgfg+Z0pxUXcpgRwfyqE2B PFLzuD2Y/33wm6b8ey//0PwbTaEtBvKhDPieTVRoqNbfU9Zu3ud38MqmJ1zt/lIsJryc pmBXOSFoLEui80N4q30tBN8L/z1XumJJVHvBAv4hONoGVM7NthcAOAxNrnaooL3C6Oge 45ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=qnGSO9hI; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o9si12581134edc.429.2021.04.19.07.21.32; Mon, 19 Apr 2021 07:21: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=@gmail.com header.s=20161025 header.b=qnGSO9hI; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 09D39689CDB; Mon, 19 Apr 2021 17:12:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 576DA689BFF for ; Mon, 19 Apr 2021 17:12:25 +0300 (EEST) Received: by mail-qv1-f43.google.com with SMTP id i3so11376447qvj.7 for ; Mon, 19 Apr 2021 07:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=LZiBx3Wb/0VVRdX7al6ij+lvcs328ZxA2rCF0G40uVk=; b=qnGSO9hIAsVN0oGzB78/QwJl2RUFqhtGTvhlO8PvRDlYnzk4t2+Qn1eeiN8XEcoE6m YXfVVhpMES6V7qutbRwvvQUsH3dA6xAMIr95OmRs07Iu3+qIyATm6TjBg7FjifbvffG0 6kK1B2qtodYeWcV2rDm1fz6SSMChX2JIWZ6jonnNbvvfRH5b92184NdNEuS8utA8HeJa /PWZZjMsAKx7DK19lNWRKh54b45NqGXLDfOS1eq42ACD9Hgil2vlOUU7t3sLKGobRndE ropidK4T+GCfRUNjsJRYtMIOJWW1IbWy7OymmzIHYGhXkTKs8HaK/jz/P7ZKQKK0qI9b sK7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LZiBx3Wb/0VVRdX7al6ij+lvcs328ZxA2rCF0G40uVk=; b=cAru7d4HcktDFgTRwJ/uJGLSBkiKYb95GsE1Ka+m7hPV6Y1V+lUKKEz2as3/3/quPK g1XrxaEPCUDEc1YETUEzfEHiTF4H6KlaSkp7cVKUNgTpzF6IX/QzLRzs6H6QM0toxz6x cZYESWZMQglOgyrCOBrfkOvvk/GjdOlvXDFsge2ursMUK2GbBDg5AD5cCXFDgTI0fvYy yZ/CMpv7N4IFlJ8EPNMAnre8fH76kt2yH4u/Mht0NBpHwRxTqD+wqTAQ2EI08bRsPoov x5cpQxb/9cr1HF7N8vURfc61Iahs4CIol9kCnEjxlBWnw2ieUeNb0kNUrFAIFEoc8TAm vA1Q== X-Gm-Message-State: AOAM5309KEvLY4tgmCiFTMKR56g5ekVQM+uJmy81SJkSSTrs18UAfs+S cKFfTwtq8py8P4SPjV2LWQ64qro6GV0= X-Received: by 2002:ad4:576e:: with SMTP id r14mr21942593qvx.13.1618841543516; Mon, 19 Apr 2021 07:12:23 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:22 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:04 -0300 Message-Id: <20210419141024.8174-68-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 67/87] avutil: Switch crypto APIs to size_t 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Yzi0QPkPu7UE From: Andreas Rheinhardt Announced in e435beb1ea5380a90774dbf51fdc8c941e486551. Signed-off-by: Andreas Rheinhardt --- libavutil/adler32.c | 5 ----- libavutil/adler32.h | 9 --------- libavutil/hash.c | 4 ---- libavutil/hash.h | 4 ---- libavutil/hmac.c | 4 ---- libavutil/md5.c | 15 +++------------ libavutil/md5.h | 8 -------- libavutil/murmur3.c | 4 ---- libavutil/murmur3.h | 4 ---- libavutil/ripemd.c | 23 ++++++++++++----------- libavutil/ripemd.h | 4 ---- libavutil/sha.c | 23 ++++++++++++----------- libavutil/sha.h | 4 ---- libavutil/sha512.c | 23 ++++++++++++----------- libavutil/sha512.h | 4 ---- libavutil/version.h | 3 --- 16 files changed, 39 insertions(+), 102 deletions(-) diff --git a/libavutil/adler32.c b/libavutil/adler32.c index 5ed5ff55a3..f7d3062265 100644 --- a/libavutil/adler32.c +++ b/libavutil/adler32.c @@ -41,12 +41,7 @@ #define DO4(buf) DO1(buf); DO1(buf); DO1(buf); DO1(buf); #define DO16(buf) DO4(buf); DO4(buf); DO4(buf); DO4(buf); -#if FF_API_CRYPTO_SIZE_T -unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf, - unsigned int len) -#else AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf, size_t len) -#endif { unsigned long s1 = adler & 0xffff; unsigned long s2 = adler >> 16; diff --git a/libavutil/adler32.h b/libavutil/adler32.h index e7a8f83729..232d07f5fe 100644 --- a/libavutil/adler32.h +++ b/libavutil/adler32.h @@ -30,7 +30,6 @@ #include #include #include "attributes.h" -#include "version.h" /** * @defgroup lavu_adler32 Adler-32 @@ -40,11 +39,7 @@ * @{ */ -#if FF_API_CRYPTO_SIZE_T -typedef unsigned long AVAdler; -#else typedef uint32_t AVAdler; -#endif /** * Calculate the Adler32 checksum of a buffer. @@ -59,11 +54,7 @@ typedef uint32_t AVAdler; * @return updated checksum */ AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf, -#if FF_API_CRYPTO_SIZE_T - unsigned int len) av_pure; -#else size_t len) av_pure; -#endif /** * @} diff --git a/libavutil/hash.c b/libavutil/hash.c index d626c31181..9a49748189 100644 --- a/libavutil/hash.c +++ b/libavutil/hash.c @@ -157,11 +157,7 @@ void av_hash_init(AVHashContext *ctx) } } -#if FF_API_CRYPTO_SIZE_T -void av_hash_update(AVHashContext *ctx, const uint8_t *src, int len) -#else void av_hash_update(AVHashContext *ctx, const uint8_t *src, size_t len) -#endif { switch (ctx->type) { case MD5: av_md5_update(ctx->ctx, src, len); break; diff --git a/libavutil/hash.h b/libavutil/hash.h index af4719e423..930d2d6cde 100644 --- a/libavutil/hash.h +++ b/libavutil/hash.h @@ -182,11 +182,7 @@ void av_hash_init(struct AVHashContext *ctx); * @param[in] src Data to be added to the hash context * @param[in] len Size of the additional data */ -#if FF_API_CRYPTO_SIZE_T -void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, int len); -#else void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, size_t len); -#endif /** * Finalize a hash context and compute the actual hash value. diff --git a/libavutil/hmac.c b/libavutil/hmac.c index d064a105f4..e277fd7701 100644 --- a/libavutil/hmac.c +++ b/libavutil/hmac.c @@ -34,11 +34,7 @@ #define MAX_BLOCKLEN 128 typedef void (*hmac_final)(void *ctx, uint8_t *dst); -#if FF_API_CRYPTO_SIZE_T -typedef void (*hmac_update)(void *ctx, const uint8_t *src, int len); -#else typedef void (*hmac_update)(void *ctx, const uint8_t *src, size_t len); -#endif typedef void (*hmac_init)(void *ctx); struct AVHMAC { diff --git a/libavutil/md5.c b/libavutil/md5.c index 31e69925ae..88596203c1 100644 --- a/libavutil/md5.c +++ b/libavutil/md5.c @@ -98,14 +98,13 @@ static const uint32_t T[64] = { // T[i]= fabs(sin(i+1)<<32) a = b + (a << t | a >> (32 - t)); \ } while (0) -static void body(uint32_t ABCD[4], const uint8_t *src, int nblocks) +static void body(uint32_t ABCD[4], const uint8_t *src, size_t nblocks) { int i av_unused; - int n; const uint32_t *X; uint32_t a, b, c, d, t; - for (n = 0; n < nblocks; n++) { + for (size_t n = 0; n < nblocks; n++) { a = ABCD[3]; b = ABCD[2]; c = ABCD[1]; @@ -150,11 +149,7 @@ void av_md5_init(AVMD5 *ctx) ctx->ABCD[3] = 0x67452301; } -#if FF_API_CRYPTO_SIZE_T -void av_md5_update(AVMD5 *ctx, const uint8_t *src, int len) -#else void av_md5_update(AVMD5 *ctx, const uint8_t *src, size_t len) -#endif { const uint8_t *end; int j; @@ -180,7 +175,7 @@ void av_md5_update(AVMD5 *ctx, const uint8_t *src, size_t len) src += 64; } } else { - int nblocks = len / 64; + size_t nblocks = len / 64; body(ctx->ABCD, src, nblocks); src = end; } @@ -204,11 +199,7 @@ void av_md5_final(AVMD5 *ctx, uint8_t *dst) AV_WL32(dst + 4 * i, ctx->ABCD[3 - i]); } -#if FF_API_CRYPTO_SIZE_T -void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len) -#else void av_md5_sum(uint8_t *dst, const uint8_t *src, size_t len) -#endif { AVMD5 ctx; diff --git a/libavutil/md5.h b/libavutil/md5.h index ca72ccbf83..eee6af44df 100644 --- a/libavutil/md5.h +++ b/libavutil/md5.h @@ -64,11 +64,7 @@ void av_md5_init(struct AVMD5 *ctx); * @param src input data to update hash with * @param len input data length */ -#if FF_API_CRYPTO_SIZE_T -void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, int len); -#else void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, size_t len); -#endif /** * Finish hashing and output digest value. @@ -85,11 +81,7 @@ void av_md5_final(struct AVMD5 *ctx, uint8_t *dst); * @param src The data to hash * @param len The length of the data, in bytes */ -#if FF_API_CRYPTO_SIZE_T -void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len); -#else void av_md5_sum(uint8_t *dst, const uint8_t *src, size_t len); -#endif /** * @} diff --git a/libavutil/murmur3.c b/libavutil/murmur3.c index 3e85c3c94f..f2e2a9ea6c 100644 --- a/libavutil/murmur3.c +++ b/libavutil/murmur3.c @@ -91,11 +91,7 @@ static inline uint64_t update_h2(uint64_t k, uint64_t h1, uint64_t h2) return k; } -#if FF_API_CRYPTO_SIZE_T -void av_murmur3_update(AVMurMur3 *c, const uint8_t *src, int len) -#else void av_murmur3_update(AVMurMur3 *c, const uint8_t *src, size_t len) -#endif { const uint8_t *end; uint64_t h1 = c->h1, h2 = c->h2; diff --git a/libavutil/murmur3.h b/libavutil/murmur3.h index b3b3a07de2..c5cd7e49e0 100644 --- a/libavutil/murmur3.h +++ b/libavutil/murmur3.h @@ -100,11 +100,7 @@ void av_murmur3_init(struct AVMurMur3 *c); * @param[in] src Input data to update hash with * @param[in] len Number of bytes to read from `src` */ -#if FF_API_CRYPTO_SIZE_T -void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len); -#else void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, size_t len); -#endif /** * Finish hashing and output digest value. diff --git a/libavutil/ripemd.c b/libavutil/ripemd.c index 89d69cc23d..b8e9761a24 100644 --- a/libavutil/ripemd.c +++ b/libavutil/ripemd.c @@ -511,13 +511,10 @@ av_cold int av_ripemd_init(AVRIPEMD *ctx, int bits) return 0; } -#if FF_API_CRYPTO_SIZE_T -void av_ripemd_update(AVRIPEMD* ctx, const uint8_t* data, unsigned int len) -#else void av_ripemd_update(AVRIPEMD* ctx, const uint8_t* data, size_t len) -#endif { - unsigned int i, j; + unsigned int j; + size_t i; j = ctx->count & 63; ctx->count += len; @@ -530,15 +527,19 @@ void av_ripemd_update(AVRIPEMD* ctx, const uint8_t* data, size_t len) } } #else - if ((j + len) > 63) { + if (len >= 64 - j) { + const uint8_t *end; memcpy(&ctx->buffer[j], data, (i = 64 - j)); ctx->transform(ctx->state, ctx->buffer); - for (; i + 63 < len; i += 64) - ctx->transform(ctx->state, &data[i]); + data += i; + len -= i; + end = data + (len & ~63); + len = len % 64; + for (; data < end; data += 64) + ctx->transform(ctx->state, data); j = 0; - } else - i = 0; - memcpy(&ctx->buffer[j], &data[i], len - i); + } + memcpy(&ctx->buffer[j], data, len); #endif } diff --git a/libavutil/ripemd.h b/libavutil/ripemd.h index 921aa66684..8c24b72855 100644 --- a/libavutil/ripemd.h +++ b/libavutil/ripemd.h @@ -67,11 +67,7 @@ int av_ripemd_init(struct AVRIPEMD* context, int bits); * @param data input data to update hash with * @param len input data length */ -#if FF_API_CRYPTO_SIZE_T -void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len); -#else void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, size_t len); -#endif /** * Finish hashing and output digest value. diff --git a/libavutil/sha.c b/libavutil/sha.c index ef6fa44227..ab42869c7b 100644 --- a/libavutil/sha.c +++ b/libavutil/sha.c @@ -311,13 +311,10 @@ av_cold int av_sha_init(AVSHA *ctx, int bits) return 0; } -#if FF_API_CRYPTO_SIZE_T -void av_sha_update(struct AVSHA *ctx, const uint8_t *data, unsigned int len) -#else void av_sha_update(struct AVSHA *ctx, const uint8_t *data, size_t len) -#endif { - unsigned int i, j; + unsigned int j; + size_t i; j = ctx->count & 63; ctx->count += len; @@ -330,15 +327,19 @@ void av_sha_update(struct AVSHA *ctx, const uint8_t *data, size_t len) } } #else - if ((j + len) > 63) { + if (len >= 64 - j) { + const uint8_t *end; memcpy(&ctx->buffer[j], data, (i = 64 - j)); ctx->transform(ctx->state, ctx->buffer); - for (; i + 63 < len; i += 64) - ctx->transform(ctx->state, &data[i]); + data += i; + len -= i; + end = data + (len & ~63); + len = len % 64; + for (; data < end; data += 64) + ctx->transform(ctx->state, data); j = 0; - } else - i = 0; - memcpy(&ctx->buffer[j], &data[i], len - i); + } + memcpy(&ctx->buffer[j], data, len); #endif } diff --git a/libavutil/sha.h b/libavutil/sha.h index c0180e5729..85356218b9 100644 --- a/libavutil/sha.h +++ b/libavutil/sha.h @@ -74,11 +74,7 @@ int av_sha_init(struct AVSHA* context, int bits); * @param data input data to update hash with * @param len input data length */ -#if FF_API_CRYPTO_SIZE_T -void av_sha_update(struct AVSHA *ctx, const uint8_t *data, unsigned int len); -#else void av_sha_update(struct AVSHA *ctx, const uint8_t *data, size_t len); -#endif /** * Finish hashing and output digest value. diff --git a/libavutil/sha512.c b/libavutil/sha512.c index 6d092a7c5c..97aaaa865c 100644 --- a/libavutil/sha512.c +++ b/libavutil/sha512.c @@ -239,13 +239,10 @@ av_cold int av_sha512_init(AVSHA512 *ctx, int bits) return 0; } -#if FF_API_CRYPTO_SIZE_T -void av_sha512_update(AVSHA512* ctx, const uint8_t* data, unsigned int len) -#else void av_sha512_update(AVSHA512* ctx, const uint8_t* data, size_t len) -#endif { - unsigned int i, j; + unsigned int j; + size_t i; j = ctx->count & 127; ctx->count += len; @@ -258,15 +255,19 @@ void av_sha512_update(AVSHA512* ctx, const uint8_t* data, size_t len) } } #else - if ((j + len) > 127) { + if (len >= 128 - j) { + const uint8_t *end; memcpy(&ctx->buffer[j], data, (i = 128 - j)); sha512_transform(ctx->state, ctx->buffer); - for (; i + 127 < len; i += 128) - sha512_transform(ctx->state, &data[i]); + data += i; + len -= i; + end = data + (len & ~127); + len = len % 128; + for (; data < end; data += 128) + sha512_transform(ctx->state, data); j = 0; - } else - i = 0; - memcpy(&ctx->buffer[j], &data[i], len - i); + } + memcpy(&ctx->buffer[j], data, len); #endif } diff --git a/libavutil/sha512.h b/libavutil/sha512.h index bef714b41c..30dd8744f8 100644 --- a/libavutil/sha512.h +++ b/libavutil/sha512.h @@ -76,11 +76,7 @@ int av_sha512_init(struct AVSHA512* context, int bits); * @param data input data to update hash with * @param len input data length */ -#if FF_API_CRYPTO_SIZE_T -void av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len); -#else void av_sha512_update(struct AVSHA512* context, const uint8_t* data, size_t len); -#endif /** * Finish hashing and output digest value. diff --git a/libavutil/version.h b/libavutil/version.h index dbeb7ffe23..54b09534a2 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_CRYPTO_SIZE_T -#define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_FRAME_GET_SET #define FF_API_FRAME_GET_SET (LIBAVUTIL_VERSION_MAJOR < 57) #endif From patchwork Mon Apr 19 14:10:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27066 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp564307iob; Mon, 19 Apr 2021 07:21:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo6OLnldWPF5czzxtq4ruhgVgTzmDkScDkcMnhNUxjFEdRapp69o24psT2BAyUmvwAwWtJ X-Received: by 2002:a17:906:944c:: with SMTP id z12mr21890533ejx.398.1618842107087; Mon, 19 Apr 2021 07:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842107; cv=none; d=google.com; s=arc-20160816; b=c+gq5RcmbDSLapVNA2ITRhuPiXx4RV40GC02gFpC2PGSHA1tDv2ZTReEpw9QKkwq60 2yYmI+XQbdxNS9kD+CUMyhN6aZcksmHzM6SmgbYO97wODqwIZBIBSMYjNiFYGexaAc+D 2F0u09VY5WBzHMeLvdjGIrJOOnHGifP+grSN9nReBxFaZWh+RzKwgbndyQGoEDru1S2B BYMzjjLDrI/5Pp6J/1vyIjY6WM9zOkplmrd0e3idWIRCgBgRkIrffpF5oO/hgdMPV/EW /Ka/Sp9F5tjHTQ/saCG5c1mOMvC802ZZrA04FjQISP0cn8vLBjPKEDshP2fhXjw/u+n1 AAlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=j+p756jPEJO5k+21m9hDuEBuzP9mzqI3SCwIR2QYDr4=; b=bUVDCtp408vwgVcdT67/MCSA+I+2UIJfN0h5ZalTpoytPo/7cVTC9nhQhRa93alrgL cLzBPzdhIDCRpdqEoi70SQrUv5+Seej6nsLc6yHrGVan6BnbkM4UfUI4q50EjI7KU4nI RiAl6x8GgtBH0UXgPTS5xhb29TETbsvExV17TT2o/T15qqUcc1km3aAw0ogistNn4O2Q +PYA9LOvCR1jpDHcNMZQg53T3vawMEEQ0oog7/9lMVw85byo++AhGnxh+aqKcLf6XulO 0iPk4BcAD6XL9lQ4yDPYoCYCy+K0GwfInC3DCd0569BZrJ5PrLEYH+LdjaKU253MQjZ2 4Slg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ln0q6LYF; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b13si8203946ede.310.2021.04.19.07.21.46; Mon, 19 Apr 2021 07:21:47 -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=@gmail.com header.s=20161025 header.b=ln0q6LYF; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D2167689CC5; Mon, 19 Apr 2021 17:12:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3B90689C28 for ; Mon, 19 Apr 2021 17:12:25 +0300 (EEST) Received: by mail-qv1-f50.google.com with SMTP id 30so16899477qva.9 for ; Mon, 19 Apr 2021 07:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2eUhbDEPJPvxfpsMWhFFFC+VhOO+xBjvZHhxYOYaGJI=; b=ln0q6LYFzld3zCcix/kjsuGQ1he9pc+02fbaAbIWGWewE2mN6zFTpSMPgUUMkTcCHz POkT5jlwl6qbxGzJFDnn2cQkbZeeK+6AJAoStzOUrTqtwFNgteUta7wbwQNac8MSsDww 1s0Fx8jPQu9r4m0pT93NQs3qvxISu2+neufj9NubveD3IIRS0V9I7ZB8TRjbdtsZ2PnY XoPWq3BUt8XpXHTwj2f/oDxAQwAxviD9HnxQePhvaHeKYwuTRVRWSDHSFyB1JLPXNQ/y EmUZafaLcMUIMZGQR6zdDYXVwV6LicOqfviNkA7WgVPxy+qIFI/S1ZM5s0773ZUKN03f gdfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2eUhbDEPJPvxfpsMWhFFFC+VhOO+xBjvZHhxYOYaGJI=; b=TqaM+Y99eMd5C5UhK5z6d+Uef2agwHAKGzDKpyqbMX0jTc9kpCxo8rgmPvRvCWAIXS Ert52flKHzmsP6phvaz7QRB4dJO9CEUzGHhxUxv4WqfS4vEGSG//9DXS8feXEbXPNi2P 9NMPt7k5xmUpTl3Vu6deVwI6V03SCFFv2FNLjOISFpil/CoTpgeO6Wc184xEZXvac/js nd9I8gmclt3wjfP1j2JttZXLZiLKMPcYUQb+9dTJx04l+NUxkQriF6HMZ6zxdU2uBYVr DrhaXe1xolEP30asFbg1AYpiSDBfna66Vj6/nvPLNX0bsy1uSiZN8LzyZ4aB8GHbnJZ9 DrmA== X-Gm-Message-State: AOAM532cSrFFhFpL+CiLqjNjmwMhwk8K6mmVYzE6IttR43SAXGqubSdM pLBJBB5ld9O9LcUNTPh3a4tTo7y60Ik= X-Received: by 2002:ad4:458b:: with SMTP id x11mr21505943qvu.36.1618841544603; Mon, 19 Apr 2021 07:12:24 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:24 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:05 -0300 Message-Id: <20210419141024.8174-69-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 68/87] avutil/frame: Remove deprecated getters and setters 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Zh5o6E0UyOow From: Andreas Rheinhardt Deprecated in 7df37dd319f2d9d3e1becd5d433884e3ccfa1ee2. Signed-off-by: Andreas Rheinhardt --- libavutil/frame.c | 14 ------------- libavutil/frame.h | 50 --------------------------------------------- libavutil/version.h | 3 --- 3 files changed, 67 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index e29008752c..7d5a36b2f1 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -27,20 +27,6 @@ #include "samplefmt.h" #include "hwcontext.h" -#if FF_API_FRAME_GET_SET -MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp) -MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_duration) -MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos) -MAKE_ACCESSORS(AVFrame, frame, int64_t, channel_layout) -MAKE_ACCESSORS(AVFrame, frame, int, channels) -MAKE_ACCESSORS(AVFrame, frame, int, sample_rate) -MAKE_ACCESSORS(AVFrame, frame, AVDictionary *, metadata) -MAKE_ACCESSORS(AVFrame, frame, int, decode_error_flags) -MAKE_ACCESSORS(AVFrame, frame, int, pkt_size) -MAKE_ACCESSORS(AVFrame, frame, enum AVColorSpace, colorspace) -MAKE_ACCESSORS(AVFrame, frame, enum AVColorRange, color_range) -#endif - #define CHECK_CHANNELS_CONSISTENCY(frame) \ av_assert2(!(frame)->channel_layout || \ (frame)->channels == \ diff --git a/libavutil/frame.h b/libavutil/frame.h index 43345bcdee..853d4cabec 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -651,56 +651,6 @@ typedef struct AVFrame { AVBufferRef *private_ref; } AVFrame; -#if FF_API_FRAME_GET_SET -/** - * Accessors for some AVFrame fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -attribute_deprecated -int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame); -attribute_deprecated -void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val); -attribute_deprecated -int64_t av_frame_get_pkt_duration (const AVFrame *frame); -attribute_deprecated -void av_frame_set_pkt_duration (AVFrame *frame, int64_t val); -attribute_deprecated -int64_t av_frame_get_pkt_pos (const AVFrame *frame); -attribute_deprecated -void av_frame_set_pkt_pos (AVFrame *frame, int64_t val); -attribute_deprecated -int64_t av_frame_get_channel_layout (const AVFrame *frame); -attribute_deprecated -void av_frame_set_channel_layout (AVFrame *frame, int64_t val); -attribute_deprecated -int av_frame_get_channels (const AVFrame *frame); -attribute_deprecated -void av_frame_set_channels (AVFrame *frame, int val); -attribute_deprecated -int av_frame_get_sample_rate (const AVFrame *frame); -attribute_deprecated -void av_frame_set_sample_rate (AVFrame *frame, int val); -attribute_deprecated -AVDictionary *av_frame_get_metadata (const AVFrame *frame); -attribute_deprecated -void av_frame_set_metadata (AVFrame *frame, AVDictionary *val); -attribute_deprecated -int av_frame_get_decode_error_flags (const AVFrame *frame); -attribute_deprecated -void av_frame_set_decode_error_flags (AVFrame *frame, int val); -attribute_deprecated -int av_frame_get_pkt_size(const AVFrame *frame); -attribute_deprecated -void av_frame_set_pkt_size(AVFrame *frame, int val); -attribute_deprecated -enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame); -attribute_deprecated -void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val); -attribute_deprecated -enum AVColorRange av_frame_get_color_range(const AVFrame *frame); -attribute_deprecated -void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val); -#endif #if FF_API_COLORSPACE_NAME /** diff --git a/libavutil/version.h b/libavutil/version.h index 54b09534a2..81f8690e01 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_FRAME_GET_SET -#define FF_API_FRAME_GET_SET (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_PSEUDOPAL #define FF_API_PSEUDOPAL (LIBAVUTIL_VERSION_MAJOR < 57) #endif From patchwork Mon Apr 19 14:10:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27054 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp564474iob; Mon, 19 Apr 2021 07:21:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1XgKAn7N1DzcBD81Fpw+BYKE4haOEt5y1TuM0qFMI0jgUTRjm5ZCGFEz2dQBIFwxWcttc X-Received: by 2002:a50:fd07:: with SMTP id i7mr14824915eds.92.1618842119608; Mon, 19 Apr 2021 07:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842119; cv=none; d=google.com; s=arc-20160816; b=CvBXLM/Twf4HQ648Y/H8W6HLMnunIE/InHLBMedX5LWDIackNoodTNBBAMIFH+EbaD u6NOEEpJBgVn/tlVIQUwzzvV3rBUURukNTVcolAX44f1iWrU0il0zZb+k9r6ZmGPqVGH d/cdtBwIxrGaSZtPj8MHgpzsCYecjhhL7wx7ZnsbRl/1rHWjyn3fshyIS6iquDJS29rC uXQLGmdHfQAv36F5R3scDuXZ7kYKJIyGNtCPJpfcjvk25ol5ztmxPG5mmsx5MFsCFdoK e25R2nsWHSnYo+Tk+lVrRVmdEzOadBWjTGmLEBN+m/5MBXlgZOHMzUETMr+h4N9rPS5S Z9/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=AfGbvW6EC+pMUUQlOsxVSf/NC5wUHMN5o80yqqWAi5I=; b=bJpuwKuIsbTB1EzQFyx8vOJe6mSkaPdSl5v4vmaYRbMRtgbmTS7dY1g/Ap/yxr3Ne9 9GhjgueBxiyLYaBQ4Gs/F/2RFOpuI8c4WiWhmYKY72N55X9ORvvoCmeI02mFiJcr3iqr Aw1BaI/hdTzUqmUutCW7RiNv8c2RVVTh2l1F1d184/rPeIkzNMr/A3LQgmYz/ftBQrKk CDh3/3Doqx3ztz4JKWu1pA32fkGDFwsMUGge4hUP2E19SiLUiDrWWNAf+uWfXhG/3QMG 1uWWGYZ1sXRrK10Hx9CuE/p4EwLqMbJeWxLzW9TBSiRQ2moS7DJR7l24ZW/lF2D615wC Nz6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=HpO6ywjD; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id pj1si11950443ejb.586.2021.04.19.07.21.59; Mon, 19 Apr 2021 07:21:59 -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=@gmail.com header.s=20161025 header.b=HpO6ywjD; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A7CF8689D24; Mon, 19 Apr 2021 17:12:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 57E60689CB4 for ; Mon, 19 Apr 2021 17:12:27 +0300 (EEST) Received: by mail-qk1-f178.google.com with SMTP id v7so7773591qkj.13 for ; Mon, 19 Apr 2021 07:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=hruFEyjUp1d/3BmV4iZxQF/2ibdJNmuM8Ih35TUCM3I=; b=HpO6ywjDbTy8XIIijLhTomk6fg2Z3cuFwIqjwY40gZq5osQvepj75WucUixQQSOzmI duG3+qVL3IC4hEPNl8gQsXH37er/WD3AAXRZJ5NRXsDDsavTHUcODjBbvMS+41UJx3AA 4UKpVNaVfztxdKEBXp8UULrvHysePpcilkKV9Iem1MJP2cVLHm9CyoCzOu/QX1wHxA1F uh3quqpXXhOXbERdAN1wof+AiZJP/8QTZC7rKYZOYFoPKxfyqP7oOvBTxXP2KMXBDOFz UofQ40y3yoJdqmqjpvcq2CuKbpNMysV0BFxPKle2ITj89hUdsx3XItT7NYfKeEkLxvHS waJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hruFEyjUp1d/3BmV4iZxQF/2ibdJNmuM8Ih35TUCM3I=; b=ZqYfUaCSA51PhmRJhNOWo0wFMsNpkVtlIK1D72zUJtQGXDNajbEPp9w7xo2mckp7o8 WczSt8WBeDE5atWCZPY4Z8YQ599wvLLDgzoI9IjYz7IHUGVh3xnt8YxUAGsJQhiC5q9L BIrEZ2/3GIOwncPz1gvMWkl2Tby+QGXIYErVqogmylF6O58ZauOw6VkH/wKqEMPttyao 8FnA7nOuVSc6tIjqawcCvA1wtq2GJJD43Pj2ZPABG5bTIVwEXPOj7LqwqyeiND33VvkJ OUcs9vnMeUcYRE8AhVpY0wZXKU8VoN60K5ErlsBblyXyU7upU2WiXNLhVY0Z2LrkKh7j kOqw== X-Gm-Message-State: AOAM533JxHw5PpAMS4/DXhxI4Os23L5N2IH7nf/xi+TkB9iN/aeZ2j93 N/tC/yuGKuFkcVOJif6iDESR9hJMZs8= X-Received: by 2002:a37:b103:: with SMTP id a3mr12616166qkf.261.1618841545717; Mon, 19 Apr 2021 07:12:25 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:25 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:06 -0300 Message-Id: <20210419141024.8174-70-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 69/87] avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPAL 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1AjbY7CubTIx From: Andreas Rheinhardt Deprecated in d6fc031caf64eed921bbdef86d79d56bfc2633b0. Signed-off-by: Andreas Rheinhardt --- libavcodec/decode.c | 5 +---- libavcodec/ffv1dec.c | 3 +-- libavcodec/rawdec.c | 17 +++++------------ libavfilter/drawutils.c | 2 +- libavfilter/framepool.c | 6 ++---- libavfilter/vf_crop.c | 2 +- libavfilter/vf_pixdesctest.c | 3 +-- libavfilter/vf_scale.c | 3 +-- libavfilter/vf_untile.c | 2 +- libavutil/frame.c | 2 +- libavutil/imgutils.c | 15 ++++----------- libavutil/internal.h | 9 --------- libavutil/pixdesc.c | 9 ++++----- libavutil/pixdesc.h | 20 -------------------- libavutil/version.h | 3 --- tests/ref/fate/imgutils | 10 +++++----- 16 files changed, 28 insertions(+), 83 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 1a7c37043e..9e5230ae1d 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1425,8 +1425,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) pic->data[i] = NULL; pic->linesize[i] = 0; } - if (desc->flags & AV_PIX_FMT_FLAG_PAL || - ((desc->flags & FF_PSEUDOPAL) && pic->data[1])) + if (desc->flags & AV_PIX_FMT_FLAG_PAL) avpriv_set_systematic_pal2((uint32_t *)pic->data[1], pic->format); if (s->debug & FF_DEBUG_BUFFERS) @@ -1589,8 +1588,6 @@ static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame) int flags = desc ? desc->flags : 0; if (num_planes == 1 && (flags & AV_PIX_FMT_FLAG_PAL)) num_planes = 2; - if ((flags & FF_PSEUDOPAL) && frame->data[1]) - num_planes = 2; for (i = 0; i < num_planes; i++) { av_assert0(frame->data[i]); } diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 8516fef5d7..14879779fa 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -952,8 +952,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac (fs->slice_y >> sv) + ((fs->slice_x >> sh) << pixshift); } - if (desc->flags & AV_PIX_FMT_FLAG_PAL || - desc->flags & FF_PSEUDOPAL) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL) { dst[1] = p->data[1]; src[1] = f->last_picture.f->data[1]; } diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index d3756328ba..a13f88b148 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -93,19 +93,13 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) return AVERROR(EINVAL); } - if (desc->flags & (AV_PIX_FMT_FLAG_PAL | FF_PSEUDOPAL)) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL) { context->palette = av_buffer_alloc(AVPALETTE_SIZE); if (!context->palette) return AVERROR(ENOMEM); -#if FF_API_PSEUDOPAL - if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) - avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt); -#endif - else { - memset(context->palette->data, 0, AVPALETTE_SIZE); - if (avctx->bits_per_coded_sample == 1) - memset(context->palette->data, 0xff, 4); - } + memset(context->palette->data, 0, AVPALETTE_SIZE); + if (avctx->bits_per_coded_sample == 1) + memset(context->palette->data, 0xff, 4); } if ((avctx->extradata_size >= 9 && @@ -416,8 +410,7 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, frame->linesize[1] = FFALIGN(frame->linesize[1], linesize_align); } - if ((avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) || - (desc->flags & FF_PSEUDOPAL)) { + if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) { frame->buf[1] = av_buffer_ref(context->palette); if (!frame->buf[1]) { av_buffer_unref(&frame->buf[0]); diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c index 0a59ff9987..f95e12091b 100644 --- a/libavfilter/drawutils.c +++ b/libavfilter/drawutils.c @@ -91,7 +91,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) if (!desc || !desc->name) return AVERROR(EINVAL); - if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL | AV_PIX_FMT_FLAG_ALPHA)) + if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA)) return AVERROR(ENOSYS); if (format == AV_PIX_FMT_P010LE || format == AV_PIX_FMT_P010BE || format == AV_PIX_FMT_P016LE || format == AV_PIX_FMT_P016BE) return AVERROR(ENOSYS); diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c index dab8891524..5f67fa170a 100644 --- a/libavfilter/framepool.c +++ b/libavfilter/framepool.c @@ -102,8 +102,7 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(buffer_size_t size), goto fail; } - if (desc->flags & AV_PIX_FMT_FLAG_PAL || - desc->flags & FF_PSEUDOPAL) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL) { pool->pools[1] = av_buffer_pool_init(AVPALETTE_SIZE, alloc); if (!pool->pools[1]) goto fail; @@ -226,8 +225,7 @@ AVFrame *ff_frame_pool_get(FFFramePool *pool) frame->data[i] = frame->buf[i]->data; } - if (desc->flags & AV_PIX_FMT_FLAG_PAL || - desc->flags & FF_PSEUDOPAL) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL) { enum AVPixelFormat format = pool->format == AV_PIX_FMT_PAL8 ? AV_PIX_FMT_BGR8 : pool->format; diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 3d5cb95f78..dffb6dab5e 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -300,7 +300,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) frame->data[0] += s->y * frame->linesize[0]; frame->data[0] += s->x * s->max_step[0]; - if (!(desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & FF_PSEUDOPAL)) { + if (!(desc->flags & AV_PIX_FMT_FLAG_PAL)) { for (i = 1; i < 3; i ++) { if (frame->data[i]) { frame->data[i] += (s->y >> s->vsub) * frame->linesize[i]; diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c index 680d1a772a..066b8a0290 100644 --- a/libavfilter/vf_pixdesctest.c +++ b/libavfilter/vf_pixdesctest.c @@ -80,8 +80,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } /* copy palette */ - if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL || - ((priv->pix_desc->flags & FF_PSEUDOPAL) && out->data[1] && in->data[1])) + if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL) memcpy(out->data[1], in->data[1], AVPALETTE_SIZE); for (c = 0; c < priv->pix_desc->nb_components; c++) { diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 5ad9334d02..3add31bace 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -510,8 +510,7 @@ static int config_props(AVFilterLink *outlink) scale->input_is_pal = desc->flags & AV_PIX_FMT_FLAG_PAL; if (outfmt == AV_PIX_FMT_PAL8) outfmt = AV_PIX_FMT_BGR8; - scale->output_is_pal = av_pix_fmt_desc_get(outfmt)->flags & AV_PIX_FMT_FLAG_PAL || - av_pix_fmt_desc_get(outfmt)->flags & FF_PSEUDOPAL; + scale->output_is_pal = av_pix_fmt_desc_get(outfmt)->flags & AV_PIX_FMT_FLAG_PAL; if (scale->sws) sws_freeContext(scale->sws); diff --git a/libavfilter/vf_untile.c b/libavfilter/vf_untile.c index 9a2eb24901..154b92d08c 100644 --- a/libavfilter/vf_untile.c +++ b/libavfilter/vf_untile.c @@ -136,7 +136,7 @@ static int activate(AVFilterContext *ctx) out->height = outlink->h; out->data[0] += y * out->linesize[0]; out->data[0] += x * s->max_step[0]; - if (!(s->desc->flags & AV_PIX_FMT_FLAG_PAL || s->desc->flags & FF_PSEUDOPAL)) { + if (!(s->desc->flags & AV_PIX_FMT_FLAG_PAL)) { for (i = 1; i < 3; i ++) { if (out->data[i]) { out->data[i] += (y >> s->desc->log2_chroma_w) * out->linesize[i]; diff --git a/libavutil/frame.c b/libavutil/frame.c index 7d5a36b2f1..5bc8ab36df 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -741,7 +741,7 @@ static int calc_cropping_offsets(size_t offsets[4], const AVFrame *frame, int shift_x = (i == 1 || i == 2) ? desc->log2_chroma_w : 0; int shift_y = (i == 1 || i == 2) ? desc->log2_chroma_h : 0; - if (desc->flags & (AV_PIX_FMT_FLAG_PAL | FF_PSEUDOPAL) && i == 1) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL && i == 1) { offsets[i] = 0; break; } diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index bd1333170a..53faad889a 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -123,8 +123,7 @@ int av_image_fill_plane_sizes(size_t sizes[4], enum AVPixelFormat pix_fmt, return AVERROR(EINVAL); sizes[0] = linesizes[0] * (size_t)height; - if (desc->flags & AV_PIX_FMT_FLAG_PAL || - desc->flags & FF_PSEUDOPAL) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL) { sizes[1] = 256 * 4; /* palette is stored here as 256 32 bits words */ return 0; } @@ -250,7 +249,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4], av_free(buf); return ret; } - if (desc->flags & AV_PIX_FMT_FLAG_PAL || (desc->flags & FF_PSEUDOPAL && pointers[1])) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL) { avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt); if (align < 4) { av_log(NULL, AV_LOG_ERROR, "Formats with a palette require a minimum alignment of 4\n"); @@ -259,8 +258,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4], } } - if ((desc->flags & AV_PIX_FMT_FLAG_PAL || - desc->flags & FF_PSEUDOPAL) && pointers[1] && + if (desc->flags & AV_PIX_FMT_FLAG_PAL && pointers[1] && pointers[1] - pointers[0] > linesizes[0] * h) { /* zero-initialize the padding before the palette */ memset(pointers[0] + linesizes[0] * h, 0, @@ -388,8 +386,7 @@ static void image_copy(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4], if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL) return; - if (desc->flags & AV_PIX_FMT_FLAG_PAL || - desc->flags & FF_PSEUDOPAL) { + if (desc->flags & AV_PIX_FMT_FLAG_PAL) { copy_plane(dst_data[0], dst_linesizes[0], src_data[0], src_linesizes[0], width, height); @@ -478,10 +475,6 @@ int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, if (ret < 0) return ret; - // do not include palette for these pseudo-paletted formats - if (desc->flags & FF_PSEUDOPAL) - return FFALIGN(width, align) * height; - ret = av_image_fill_linesizes(linesize, pix_fmt, width); if (ret < 0) return ret; diff --git a/libavutil/internal.h b/libavutil/internal.h index 2ed1c2abb1..854e9cbed2 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -292,15 +292,6 @@ void ff_check_pixfmt_descriptors(void); */ int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp); -// Helper macro for AV_PIX_FMT_FLAG_PSEUDOPAL deprecation. Code inside FFmpeg -// should always use FF_PSEUDOPAL. Once the public API flag gets removed, all -// code using it is dead code. -#if FF_API_PSEUDOPAL -#define FF_PSEUDOPAL AV_PIX_FMT_FLAG_PSEUDOPAL -#else -#define FF_PSEUDOPAL 0 -#endif - // Temporary typedef to simplify porting all AVBufferRef users to size_t #if FF_API_BUFFER_SIZE_T typedef int buffer_size_t; diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index e701005bc0..751843e991 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -341,7 +341,6 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .comp = { { 0, 1, 0, 0, 8 }, /* Y */ }, - .flags = FF_PSEUDOPAL, .alias = "gray8,y8", }, [AV_PIX_FMT_MONOWHITE] = { @@ -446,7 +445,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { { 0, 1, 0, 3, 3 }, /* G */ { 0, 1, 0, 6, 2 }, /* B */ }, - .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, + .flags = AV_PIX_FMT_FLAG_RGB, }, [AV_PIX_FMT_BGR4] = { .name = "bgr4", @@ -470,7 +469,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { { 0, 1, 0, 1, 2 }, /* G */ { 0, 1, 0, 3, 1 }, /* B */ }, - .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, + .flags = AV_PIX_FMT_FLAG_RGB, }, [AV_PIX_FMT_RGB8] = { .name = "rgb8", @@ -482,7 +481,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { { 0, 1, 0, 3, 3 }, /* G */ { 0, 1, 0, 0, 3 }, /* B */ }, - .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, + .flags = AV_PIX_FMT_FLAG_RGB, }, [AV_PIX_FMT_RGB4] = { .name = "rgb4", @@ -506,7 +505,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { { 0, 1, 0, 1, 2 }, /* G */ { 0, 1, 0, 0, 1 }, /* B */ }, - .flags = AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL, + .flags = AV_PIX_FMT_FLAG_RGB, }, [AV_PIX_FMT_NV12] = { .name = "nv12", diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index 81b51b767f..9e7cfad983 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -136,26 +136,6 @@ typedef struct AVPixFmtDescriptor { */ #define AV_PIX_FMT_FLAG_RGB (1 << 5) -#if FF_API_PSEUDOPAL -/** - * The pixel format is "pseudo-paletted". This means that it contains a - * fixed palette in the 2nd plane but the palette is fixed/constant for each - * PIX_FMT. This allows interpreting the data as if it was PAL8, which can - * in some cases be simpler. Or the data can be interpreted purely based on - * the pixel format without using the palette. - * An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8 - * - * @deprecated This flag is deprecated, and will be removed. When it is removed, - * the extra palette allocation in AVFrame.data[1] is removed as well. Only - * actual paletted formats (as indicated by AV_PIX_FMT_FLAG_PAL) will have a - * palette. Starting with FFmpeg versions which have this flag deprecated, the - * extra "pseudo" palette is already ignored, and API users are not required to - * allocate a palette for AV_PIX_FMT_FLAG_PSEUDOPAL formats (it was required - * before the deprecation, though). - */ -#define AV_PIX_FMT_FLAG_PSEUDOPAL (1 << 6) -#endif - /** * The pixel format has an alpha channel. This is set on all formats that * support alpha in some way, including AV_PIX_FMT_PAL8. The alpha is always diff --git a/libavutil/version.h b/libavutil/version.h index 81f8690e01..0d015335c3 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_PSEUDOPAL -#define FF_API_PSEUDOPAL (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_CHILD_CLASS_NEXT #define FF_API_CHILD_CLASS_NEXT (LIBAVUTIL_VERSION_MAJOR < 57) #endif diff --git a/tests/ref/fate/imgutils b/tests/ref/fate/imgutils index c968ea0e85..f510150ea1 100644 --- a/tests/ref/fate/imgutils +++ b/tests/ref/fate/imgutils @@ -62,7 +62,7 @@ yuv422p planes: 3, linesizes: 64 32 32 0, plane_sizes: 3072 1536 yuv444p planes: 3, linesizes: 64 64 64 0, plane_sizes: 3072 3072 3072 0, plane_offsets: 3072 3072 0, total_size: 9216 yuv410p planes: 3, linesizes: 64 16 16 0, plane_sizes: 3072 192 192 0, plane_offsets: 3072 192 0, total_size: 3456 yuv411p planes: 3, linesizes: 64 16 16 0, plane_sizes: 3072 768 768 0, plane_offsets: 3072 768 0, total_size: 4608 -gray planes: 2, linesizes: 64 0 0 0, plane_sizes: 3072 1024 0 0, plane_offsets: 3072 0 0, total_size: 4096 +gray planes: 1, linesizes: 64 0 0 0, plane_sizes: 3072 0 0 0, plane_offsets: 0 0 0, total_size: 3072 monow planes: 1, linesizes: 8 0 0 0, plane_sizes: 384 0 0 0, plane_offsets: 0 0 0, total_size: 384 monob planes: 1, linesizes: 8 0 0 0, plane_sizes: 384 0 0 0, plane_offsets: 0 0 0, total_size: 384 pal8 planes: 2, linesizes: 64 0 0 0, plane_sizes: 3072 1024 0 0, plane_offsets: 3072 0 0, total_size: 4096 @@ -71,12 +71,12 @@ yuvj422p planes: 3, linesizes: 64 32 32 0, plane_sizes: 3072 1536 yuvj444p planes: 3, linesizes: 64 64 64 0, plane_sizes: 3072 3072 3072 0, plane_offsets: 3072 3072 0, total_size: 9216 uyvy422 planes: 1, linesizes: 128 0 0 0, plane_sizes: 6144 0 0 0, plane_offsets: 0 0 0, total_size: 6144 uyyvyy411 planes: 1, linesizes: 96 0 0 0, plane_sizes: 4608 0 0 0, plane_offsets: 0 0 0, total_size: 4608 -bgr8 planes: 2, linesizes: 64 0 0 0, plane_sizes: 3072 1024 0 0, plane_offsets: 3072 0 0, total_size: 4096 +bgr8 planes: 1, linesizes: 64 0 0 0, plane_sizes: 3072 0 0 0, plane_offsets: 0 0 0, total_size: 3072 bgr4 planes: 1, linesizes: 32 0 0 0, plane_sizes: 1536 0 0 0, plane_offsets: 0 0 0, total_size: 1536 -bgr4_byte planes: 2, linesizes: 64 0 0 0, plane_sizes: 3072 1024 0 0, plane_offsets: 3072 0 0, total_size: 4096 -rgb8 planes: 2, linesizes: 64 0 0 0, plane_sizes: 3072 1024 0 0, plane_offsets: 3072 0 0, total_size: 4096 +bgr4_byte planes: 1, linesizes: 64 0 0 0, plane_sizes: 3072 0 0 0, plane_offsets: 0 0 0, total_size: 3072 +rgb8 planes: 1, linesizes: 64 0 0 0, plane_sizes: 3072 0 0 0, plane_offsets: 0 0 0, total_size: 3072 rgb4 planes: 1, linesizes: 32 0 0 0, plane_sizes: 1536 0 0 0, plane_offsets: 0 0 0, total_size: 1536 -rgb4_byte planes: 2, linesizes: 64 0 0 0, plane_sizes: 3072 1024 0 0, plane_offsets: 3072 0 0, total_size: 4096 +rgb4_byte planes: 1, linesizes: 64 0 0 0, plane_sizes: 3072 0 0 0, plane_offsets: 0 0 0, total_size: 3072 nv12 planes: 2, linesizes: 64 64 0 0, plane_sizes: 3072 1536 0 0, plane_offsets: 3072 0 0, total_size: 4608 nv21 planes: 2, linesizes: 64 64 0 0, plane_sizes: 3072 1536 0 0, plane_offsets: 3072 0 0, total_size: 4608 argb planes: 1, linesizes: 256 0 0 0, plane_sizes: 12288 0 0 0, plane_offsets: 0 0 0, total_size: 12288 From patchwork Mon Apr 19 14:10:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27060 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp564810iob; Mon, 19 Apr 2021 07:22:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcVs8LFeXTOeVk0FcEsRlfUJudOhunhQZo20HbxhOQF/T/TFzmIlehneNTu9/ETZiPkh2t X-Received: by 2002:a17:906:6a49:: with SMTP id n9mr22313424ejs.397.1618842145288; Mon, 19 Apr 2021 07:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842145; cv=none; d=google.com; s=arc-20160816; b=zxeazsF3tNYoZ+QDtyZWcW4CqfV289hrPbtEqEMOgAhSnySGSxkt6bVBXNGTnLyz0p yc3q36GjmnnUKmtbYTnb9G25F20NX+k/w+7+xHuhvYq3LmawUe3lQwRQuaaeN5gGha5H Me82XxnMVuk7cKIK5I5N6Np9Q9jSDDmTit9smiUVERAM7cjdo9GpE9+GZ8JvjRMtFllp jha7Nm4l86uxZLFLbkxr4taxoFCfHKQIh431kzyA+B6EnawvmYlXNTT39yqyeXsx0M/R kN6vbbaX5dHPf1Utf/32vatgRAsHSi5w+Rn9fVV5UtoX3loA9FOOUDcSUC/XW/HAqlaE p25g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=eapDdpKyzrVHAr9G055m4+IEHITyxVzbKoSzZc5ZR5A=; b=hqPhWLYmM5fMduuZqX3ZXJzXhHIpUZb1Q5RlIqFjovmKkX7fabdc3vobNkX6kWpuM3 lhsZE9obnn08SrtKZhjrBLqt1wpq7dILnLx7E3eBkHlqqkIMvJQfXsJzG73U8X3vo4sB dSCyjCfZx/WJBR2lrHBQA8q8sFu4YGXp50rDfHlrdmPrzFEhXys5Gy+M+qp9dg5k4jcn kU06q84MjHMNtWewDTmBPf30lBwl0Zj9PVrg4ar59NgdvWYjsRpkKbfi3pkIQ2uTXpLP LNpCUMz9jWsYboyFjaIg2yh3vPYTcsBaqyRgpHFclrThv7xMV2c/2n1MAksMnQdY7XYB AFQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=qIgz7dDO; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ce20si11176897ejc.328.2021.04.19.07.22.24; Mon, 19 Apr 2021 07:22:25 -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=@gmail.com header.s=20161025 header.b=qIgz7dDO; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 524B8689D21; Mon, 19 Apr 2021 17:12:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E4F0689D21 for ; Mon, 19 Apr 2021 17:12:29 +0300 (EEST) Received: by mail-qt1-f176.google.com with SMTP id a18so2372327qtj.10 for ; Mon, 19 Apr 2021 07:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=iLxoPmGOW87uoSBZ3b8GBm/B1mS5ahTuNfKgFByz54s=; b=qIgz7dDOOf+N1KI6vrNC4/+isHWcYeow5NPv2AgolxsRr1XuMOgr01h0sj2OEeRTE9 f47b2yGbx6XpLEREwkcaggTVt+laiYhGnRkXnNXBwJZIhca8cXSus21rsQ8YKJ0l8xTX VfZ0kfkJnvjvtXNJiTIYRYPFL44utMIbO+V1h573HSnaiE/bD7ng7z2hZS7JacUdGcsO TphXPcV+MwA6SOa2Nz8MeR3ogrFuyPSFnI31m4CFpbDsNKI5UUibogbX5600mdIcKIl8 GRPfUYwnZx+P5AnSDt1Cl8rqFStWn6537unSQR8xOxw7plXsArCnsXQSc6hs1p5Y19tP TUeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iLxoPmGOW87uoSBZ3b8GBm/B1mS5ahTuNfKgFByz54s=; b=H3r0kD2/rnO86JWi92VGl4ethENvpHiSusgUz89m1zydeaU8jbbsmHYWOYz8i/YiYM HkBC7+OXOlUPiUwn84QJkYy6C8W/hZy3eUiyBoXhtybZQ5qoZUzYseCkA9aq8t0+BKHv bD2FL4DEagQu1+txGPxb65mViwfg1SfekgxLd6VmTE1QZ/7nSoq/sn7lre2kvrmZvGnV wpOptIUnjVT4wMS5+5/6Ld1R2flrNKAzh2OZ14rGjpYiKSOitWL3pMfWO0m2S+LqRqHu k1uDbbkBjTbQZphpqekNM3GQM1sBuONdPGt9sQkJj3M4MwlimBVhU5E8euEGyStLVOkN 6rgg== X-Gm-Message-State: AOAM530bJXFao4vQIdEiX2M59O4N7HhmG+gneshXOgjIuWarrNpY3uQ5 gnwF752tbUpQWt38zFcden3QNA7DepY= X-Received: by 2002:a05:622a:11cd:: with SMTP id n13mr12089236qtk.52.1618841547157; Mon, 19 Apr 2021 07:12:27 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:26 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:07 -0300 Message-Id: <20210419141024.8174-71-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 70/87] avutil/buffer: Switch AVBuffer API to size_t 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: llmrs0Zfo8JD From: Andreas Rheinhardt Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt --- fftools/ffprobe.c | 2 +- libavcodec/aacdec_template.c | 4 ++-- libavcodec/adxdec.c | 2 +- libavcodec/audiotoolboxdec.c | 2 +- libavcodec/avpacket.c | 28 ++++++---------------------- libavcodec/cbs_bsf.c | 2 +- libavcodec/decode.c | 13 +++++++------ libavcodec/h264_metadata_bsf.c | 2 +- libavcodec/h264dec.c | 2 +- libavcodec/hevcdec.c | 2 +- libavcodec/libvpxdec.c | 2 +- libavcodec/mpeg12enc.c | 4 ++-- libavcodec/mscc.c | 5 +++-- libavcodec/nvdec.c | 4 ++-- libavcodec/packet.h | 24 ------------------------ libavcodec/srtdec.c | 2 +- libavcodec/vaapi_encode.c | 2 +- libavdevice/decklink_dec.cpp | 4 ++-- libavdevice/decklink_enc.cpp | 2 +- libavdevice/lavfi.c | 2 +- libavdevice/xcbgrab.c | 2 +- libavfilter/af_ashowinfo.c | 3 ++- libavfilter/framepool.c | 4 ++-- libavfilter/framepool.h | 4 ++-- libavfilter/vf_showinfo.c | 10 ++++++---- libavformat/adtsenc.c | 2 +- libavformat/apngenc.c | 2 +- libavformat/avformat.h | 8 -------- libavformat/concatdec.c | 2 +- libavformat/dashenc.c | 4 ++-- libavformat/dump.c | 4 ++-- libavformat/flacenc.c | 2 +- libavformat/flvenc.c | 2 +- libavformat/framecrcenc.c | 6 ++++-- libavformat/hashenc.c | 7 ++++--- libavformat/img2dec.c | 2 +- libavformat/latmenc.c | 2 +- libavformat/matroskaenc.c | 6 +++--- libavformat/mov.c | 3 +-- libavformat/movenc.c | 10 +++++----- libavformat/mp3enc.c | 4 ++-- libavformat/mpegtsenc.c | 4 ++-- libavformat/oggdec.h | 2 +- libavformat/rtpenc.c | 2 +- libavformat/segment.c | 2 +- libavformat/srtenc.c | 2 +- libavformat/utils.c | 6 +++--- libavformat/webvttdec.c | 2 +- libavformat/webvttenc.c | 2 +- libavutil/buffer.c | 14 +++++++------- libavutil/buffer.h | 29 ----------------------------- libavutil/buffer_internal.h | 8 ++++---- libavutil/detection_bbox.c | 4 ---- libavutil/frame.c | 2 +- libavutil/frame.h | 8 -------- libavutil/hwcontext_cuda.c | 2 +- libavutil/hwcontext_d3d11va.c | 2 +- libavutil/hwcontext_dxva2.c | 2 +- libavutil/hwcontext_opencl.c | 2 +- libavutil/hwcontext_qsv.c | 2 +- libavutil/hwcontext_vaapi.c | 2 +- libavutil/hwcontext_vdpau.c | 2 +- libavutil/hwcontext_vulkan.c | 2 +- libavutil/internal.h | 7 ------- libavutil/version.h | 3 --- libavutil/video_enc_params.c | 4 ---- 66 files changed, 110 insertions(+), 206 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 13ed16431d..7b28f6b3ce 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2158,7 +2158,7 @@ static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_'); if (pkt->side_data_elems) { - int size; + size_t size; const uint8_t *side_metadata; side_metadata = av_packet_get_side_data(pkt, AV_PKT_DATA_STRINGS_METADATA, &size); diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 98f77a3ad7..d78e60ec2e 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -3437,11 +3437,11 @@ static int aac_decode_frame(AVCodecContext *avctx, void *data, int buf_consumed; int buf_offset; int err; - buffer_size_t new_extradata_size; + size_t new_extradata_size; const uint8_t *new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, &new_extradata_size); - buffer_size_t jp_dualmono_size; + size_t jp_dualmono_size; const uint8_t *jp_dualmono = av_packet_get_side_data(avpkt, AV_PKT_DATA_JP_DUALMONO, &jp_dualmono_size); diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c index 94de3eee19..eb05145da9 100644 --- a/libavcodec/adxdec.c +++ b/libavcodec/adxdec.c @@ -103,7 +103,7 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data, const uint8_t *buf = avpkt->data; const uint8_t *buf_end = buf + avpkt->size; int num_blocks, ch, ret; - buffer_size_t new_extradata_size; + size_t new_extradata_size; uint8_t *new_extradata; new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c index fa55f58988..a4fb8c9120 100644 --- a/libavcodec/audiotoolboxdec.c +++ b/libavcodec/audiotoolboxdec.c @@ -484,7 +484,7 @@ static int ffat_decode(AVCodecContext *avctx, void *data, if (avctx->codec_id == AV_CODEC_ID_AAC) { if (!at->extradata_size) { uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; side_data = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, &side_data_size); diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 622b50d5eb..e32c467586 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -218,16 +218,12 @@ int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - buffer_size_t size) + size_t size) { int ret; uint8_t *data; -#if FF_API_BUFFER_SIZE_T - if ((unsigned)size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) -#else if (size > SIZE_MAX - AV_INPUT_BUFFER_PADDING_SIZE) -#endif return NULL; data = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE); if (!data) @@ -243,7 +239,7 @@ uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, } uint8_t *av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, - buffer_size_t *size) + size_t *size) { int i; @@ -297,11 +293,7 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type) return NULL; } -#if FF_API_BUFFER_SIZE_T -uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size) -#else uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size) -#endif { uint8_t *data = NULL; *size = 0; @@ -320,11 +312,7 @@ uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size) if (pass) memcpy(data + total_length, str, len); -#if FF_API_BUFFER_SIZE_T - else if (len > INT_MAX - total_length) -#else else if (len > SIZE_MAX - total_length) -#endif return NULL; total_length += len; } @@ -340,12 +328,8 @@ uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size) return data; } -#if FF_API_BUFFER_SIZE_T -int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict) -#else int av_packet_unpack_dictionary(const uint8_t *data, size_t size, AVDictionary **dict) -#endif { const uint8_t *end; int ret; @@ -372,7 +356,7 @@ int av_packet_unpack_dictionary(const uint8_t *data, size_t size, } int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - buffer_size_t size) + size_t size) { int i; @@ -402,7 +386,7 @@ int av_packet_copy_props(AVPacket *dst, const AVPacket *src) dst->side_data_elems = 0; for (i = 0; i < src->side_data_elems; i++) { enum AVPacketSideDataType type = src->side_data[i].type; - buffer_size_t size = src->side_data[i].size; + size_t size = src->side_data[i].size; uint8_t *src_data = src->side_data[i].data; uint8_t *dst_data = av_packet_new_side_data(dst, type, size); @@ -599,7 +583,7 @@ void avpriv_packet_list_free(PacketList **pkt_buf, PacketList **pkt_buf_end) int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type) { uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; int i; side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, &side_data_size); @@ -625,7 +609,7 @@ int ff_side_data_set_prft(AVPacket *pkt, int64_t timestamp) { AVProducerReferenceTime *prft; uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_PRFT, &side_data_size); if (!side_data) { diff --git a/libavcodec/cbs_bsf.c b/libavcodec/cbs_bsf.c index f0f7dd79b5..0977d431f7 100644 --- a/libavcodec/cbs_bsf.c +++ b/libavcodec/cbs_bsf.c @@ -24,7 +24,7 @@ static int cbs_bsf_update_side_data(AVBSFContext *bsf, AVPacket *pkt) CBSBSFContext *ctx = bsf->priv_data; CodedBitstreamFragment *frag = &ctx->fragment; uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; int err; side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 9e5230ae1d..cd98c98a97 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -67,7 +67,7 @@ typedef struct FramePool { static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt) { int ret; - buffer_size_t size; + size_t size; const uint8_t *data; uint32_t flags; int64_t val; @@ -344,7 +344,7 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, got_frame = 0; } else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) { uint8_t *side; - buffer_size_t side_size; + size_t side_size; uint32_t discard_padding = 0; uint8_t skip_reason = 0; uint8_t discard_reason = 0; @@ -1463,7 +1463,7 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags static int add_metadata_from_side_data(const AVPacket *avpkt, AVFrame *frame) { - buffer_size_t size; + size_t size; const uint8_t *side_metadata; AVDictionary **frame_md = &frame->metadata; @@ -1502,7 +1502,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) frame->pkt_size = pkt->size; for (int i = 0; i < FF_ARRAY_ELEMS(sd); i++) { - buffer_size_t size; + size_t size; uint8_t *packet_sd = av_packet_get_side_data(pkt, sd[i].packet, &size); if (packet_sd) { AVFrameSideData *frame_sd = av_frame_new_side_data(frame, @@ -1841,14 +1841,15 @@ FF_ENABLE_DEPRECATION_WARNINGS int ff_copy_palette(void *dst, const AVPacket *src, void *logctx) { - buffer_size_t size; + size_t size; const void *pal = av_packet_get_side_data(src, AV_PKT_DATA_PALETTE, &size); if (pal && size == AVPALETTE_SIZE) { memcpy(dst, pal, AVPALETTE_SIZE); return 1; } else if (pal) { - av_log(logctx, AV_LOG_ERROR, "Palette size %d is wrong\n", size); + av_log(logctx, AV_LOG_ERROR, + "Palette size %"SIZE_SPECIFIER" is wrong\n", size); } return 0; } diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index 06d23e3142..ef74cba560 100644 --- a/libavcodec/h264_metadata_bsf.c +++ b/libavcodec/h264_metadata_bsf.c @@ -371,7 +371,7 @@ static int h264_metadata_handle_display_orientation(AVBSFContext *bsf, H264RawSEIDisplayOrientation *disp = &ctx->display_orientation_payload; uint8_t *data; - buffer_size_t size; + size_t size; int write = 0; data = av_packet_get_side_data(pkt, AV_PKT_DATA_DISPLAYMATRIX, &size); diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index e5b77abc6a..536020095c 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -975,7 +975,7 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data, return send_next_delayed_frame(h, pict, got_frame, 0); if (av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, NULL)) { - buffer_size_t side_size; + size_t side_size; uint8_t *side = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size); ff_h264_decode_extradata(side, side_size, &h->ps, &h->is_avc, &h->nal_length_size, diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 2231aed259..ad38f37187 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -3303,7 +3303,7 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output, AVPacket *avpkt) { int ret; - buffer_size_t new_extradata_size; + size_t new_extradata_size; uint8_t *new_extradata; HEVCContext *s = avctx->priv_data; diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c index 9b5728fba4..67d56fb05e 100644 --- a/libavcodec/libvpxdec.c +++ b/libavcodec/libvpxdec.c @@ -221,7 +221,7 @@ static int vpx_decode(AVCodecContext *avctx, struct vpx_image *img, *img_alpha; int ret; uint8_t *side_data = NULL; - buffer_size_t side_data_size; + size_t side_data_size; ret = decode_frame(avctx, &ctx->decoder, avpkt->data, avpkt->size); if (ret) diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index fd3e7de94a..432d27e1f6 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -575,8 +575,8 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) put_bits(&s->pb, 8, 0xff); // marker_bits } else { av_log(s->avctx, AV_LOG_WARNING, - "Warning Closed Caption size (%d) can not exceed 93 bytes " - "and must be a multiple of 3\n", side_data->size); + "Closed Caption size (%"SIZE_SPECIFIER") can not exceed " + "93 bytes and must be a multiple of 3\n", side_data->size); } } } diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c index fe02649623..e685b2a32b 100644 --- a/libavcodec/mscc.c +++ b/libavcodec/mscc.c @@ -152,7 +152,7 @@ static int decode_frame(AVCodecContext *avctx, } if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { - buffer_size_t size; + size_t size; const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size); if (pal && size == AVPALETTE_SIZE) { @@ -160,7 +160,8 @@ static int decode_frame(AVCodecContext *avctx, for (j = 0; j < 256; j++) s->pal[j] = 0xFF000000 | AV_RL32(pal + j * 4); } else if (pal) { - av_log(avctx, AV_LOG_ERROR, "Palette size %d is wrong\n", size); + av_log(avctx, AV_LOG_ERROR, + "Palette size %"SIZE_SPECIFIER" is wrong\n", size); } memcpy(frame->data[1], s->pal, AVPALETTE_SIZE); } diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c index d6b6608866..251be039a8 100644 --- a/libavcodec/nvdec.c +++ b/libavcodec/nvdec.c @@ -242,7 +242,7 @@ fail: return ret; } -static AVBufferRef *nvdec_decoder_frame_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *nvdec_decoder_frame_alloc(void *opaque, size_t size) { NVDECFramePool *pool = opaque; AVBufferRef *ret; @@ -283,7 +283,7 @@ static void nvdec_free_dummy(struct AVHWFramesContext *ctx) av_buffer_pool_uninit(&ctx->pool); } -static AVBufferRef *nvdec_alloc_dummy(buffer_size_t size) +static AVBufferRef *nvdec_alloc_dummy(size_t size) { return av_buffer_create(NULL, 0, NULL, NULL, 0); } diff --git a/libavcodec/packet.h b/libavcodec/packet.h index 6e6d9c58c9..fad8341c12 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -305,11 +305,7 @@ enum AVPacketSideDataType { typedef struct AVPacketSideData { uint8_t *data; -#if FF_API_BUFFER_SIZE_T - int size; -#else size_t size; -#endif enum AVPacketSideDataType type; } AVPacketSideData; @@ -528,11 +524,7 @@ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size); * @return pointer to fresh allocated data or NULL otherwise */ uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, -#if FF_API_BUFFER_SIZE_T - int size); -#else size_t size); -#endif /** * Wrap an existing array as a packet side data. @@ -559,11 +551,7 @@ int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, * @return 0 on success, < 0 on failure */ int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, -#if FF_API_BUFFER_SIZE_T - int size); -#else size_t size); -#endif /** * Get side information from packet. @@ -575,11 +563,7 @@ int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, * @return pointer to data if present or NULL otherwise */ uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, -#if FF_API_BUFFER_SIZE_T - int *size); -#else size_t *size); -#endif const char *av_packet_side_data_name(enum AVPacketSideDataType type); @@ -590,11 +574,7 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type); * @param size pointer to store the size of the returned data * @return pointer to data if successful, NULL otherwise */ -#if FF_API_BUFFER_SIZE_T -uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size); -#else uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size); -#endif /** * Unpack a dictionary from side_data. * @@ -603,12 +583,8 @@ uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size); * @param dict the metadata storage dictionary * @return 0 on success, < 0 on failure */ -#if FF_API_BUFFER_SIZE_T -int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict); -#else int av_packet_unpack_dictionary(const uint8_t *data, size_t size, AVDictionary **dict); -#endif /** * Convenience function to free all the side data stored. diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c index 98f84ac673..e77b94f74e 100644 --- a/libavcodec/srtdec.c +++ b/libavcodec/srtdec.c @@ -59,7 +59,7 @@ static int srt_decode_frame(AVCodecContext *avctx, AVBPrint buffer; int x1 = -1, y1 = -1, x2 = -1, y2 = -1; int ret; - buffer_size_t size; + size_t size; const uint8_t *p = av_packet_get_side_data(avpkt, AV_PKT_DATA_SUBTITLE_POSITION, &size); FFASSDecoderContext *s = avctx->priv_data; diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index 607858435f..7510816ec1 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -2235,7 +2235,7 @@ static void vaapi_encode_free_output_buffer(void *opaque, } static AVBufferRef *vaapi_encode_alloc_output_buffer(void *opaque, - buffer_size_t size) + size_t size) { AVCodecContext *avctx = opaque; VAAPIEncodeContext *ctx = avctx->priv_data; diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 79d96cd620..491fe4be3d 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -936,7 +936,7 @@ HRESULT decklink_input_callback::VideoInputFrameArrived( } if (av_dict_set(&metadata_dict, "timecode", tc, 0) >= 0) { - buffer_size_t metadata_len; + size_t metadata_len; packed_metadata = av_packet_pack_dictionary(metadata_dict, &metadata_len); av_dict_free(&metadata_dict); if (packed_metadata) { @@ -1435,7 +1435,7 @@ int ff_decklink_read_packet(AVFormatContext *avctx, AVPacket *pkt) avpacket_queue_get(&ctx->queue, pkt, 1); if (ctx->tc_format && !(av_dict_get(ctx->video_st->metadata, "timecode", NULL, 0))) { - buffer_size_t size; + size_t size; const uint8_t *side_metadata = av_packet_get_side_data(pkt, AV_PKT_DATA_STRINGS_METADATA, &size); if (side_metadata) { if (av_packet_unpack_dictionary(side_metadata, size, &ctx->video_st->metadata) < 0) diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 114c3e1a8c..4c1eb05be4 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -313,7 +313,7 @@ static void construct_cc(AVFormatContext *avctx, struct decklink_ctx *ctx, uint16_t *cdp_words; uint16_t len; uint8_t cc_count; - buffer_size_t size; + size_t size; int ret, i; const uint8_t *data = av_packet_get_side_data(pkt, AV_PKT_DATA_A53_CC, &size); diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index fdadff3f7f..b26d8b739d 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -446,7 +446,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt) frame_metadata = frame->metadata; if (frame_metadata) { - buffer_size_t size; + size_t size; uint8_t *metadata = av_packet_pack_dictionary(frame_metadata, &size); if (!metadata) { diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c index 8e3292e577..fbe89d472d 100644 --- a/libavdevice/xcbgrab.c +++ b/libavdevice/xcbgrab.c @@ -236,7 +236,7 @@ static void free_shm_buffer(void *opaque, uint8_t *data) shmdt(data); } -static AVBufferRef *allocate_shm_buffer(void *opaque, buffer_size_t size) +static AVBufferRef *allocate_shm_buffer(void *opaque, size_t size) { xcb_connection_t *conn = opaque; xcb_shm_seg_t segment; diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c index 9046e8d84a..e817ecea37 100644 --- a/libavfilter/af_ashowinfo.c +++ b/libavfilter/af_ashowinfo.c @@ -170,7 +170,8 @@ static void dump_audio_service_type(AVFilterContext *ctx, AVFrameSideData *sd) static void dump_unknown(AVFilterContext *ctx, AVFrameSideData *sd) { - av_log(ctx, AV_LOG_INFO, "unknown side data type: %d, size %d bytes", sd->type, sd->size); + av_log(ctx, AV_LOG_INFO, "unknown side data type: %d, size " + "%"SIZE_SPECIFIER" bytes", sd->type, sd->size); } static int filter_frame(AVFilterLink *inlink, AVFrame *buf) diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c index 5f67fa170a..9123403c40 100644 --- a/libavfilter/framepool.c +++ b/libavfilter/framepool.c @@ -48,7 +48,7 @@ struct FFFramePool { }; -FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(buffer_size_t size), +FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(size_t size), int width, int height, enum AVPixelFormat format, @@ -115,7 +115,7 @@ fail: return NULL; } -FFFramePool *ff_frame_pool_audio_init(AVBufferRef* (*alloc)(buffer_size_t size), +FFFramePool *ff_frame_pool_audio_init(AVBufferRef* (*alloc)(size_t size), int channels, int nb_samples, enum AVSampleFormat format, diff --git a/libavfilter/framepool.h b/libavfilter/framepool.h index 28857a4a16..daab88e4a5 100644 --- a/libavfilter/framepool.h +++ b/libavfilter/framepool.h @@ -44,7 +44,7 @@ typedef struct FFFramePool FFFramePool; * @param align buffers alignement of each frame in this pool * @return newly created video frame pool on success, NULL on error. */ -FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(buffer_size_t size), +FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(size_t size), int width, int height, enum AVPixelFormat format, @@ -62,7 +62,7 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(buffer_size_t size), * @param align buffers alignement of each frame in this pool * @return newly created audio frame pool on success, NULL on error. */ -FFFramePool *ff_frame_pool_audio_init(AVBufferRef* (*alloc)(buffer_size_t size), +FFFramePool *ff_frame_pool_audio_init(AVBufferRef* (*alloc)(size_t size), int channels, int samples, enum AVSampleFormat format, diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index ae6f6bb7b1..2529cb2851 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -340,7 +340,8 @@ static void dump_sei_unregistered_metadata(AVFilterContext *ctx, const AVFrameSi int i; if (sd->size < uuid_size) { - av_log(ctx, AV_LOG_ERROR, "invalid data(%d < UUID(%d-bytes))\n", sd->size, uuid_size); + av_log(ctx, AV_LOG_ERROR, "invalid data(%"SIZE_SPECIFIER" < " + "UUID(%d-bytes))\n", sd->size, uuid_size); return; } @@ -498,7 +499,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) av_log(ctx, AV_LOG_INFO, "pan/scan"); break; case AV_FRAME_DATA_A53_CC: - av_log(ctx, AV_LOG_INFO, "A/53 closed captions (%d bytes)", sd->size); + av_log(ctx, AV_LOG_INFO, "A/53 closed captions " + "(%"SIZE_SPECIFIER" bytes)", sd->size); break; case AV_FRAME_DATA_SPHERICAL: dump_spherical(ctx, frame, sd); @@ -545,8 +547,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) dump_sei_unregistered_metadata(ctx, sd); break; default: - av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)\n", - sd->type, sd->size); + av_log(ctx, AV_LOG_WARNING, "unknown side data type %d " + "(%"SIZE_SPECIFIER" bytes)\n", sd->type, sd->size); break; } diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c index 3595cb3bb2..14214eb0b9 100644 --- a/libavformat/adtsenc.c +++ b/libavformat/adtsenc.c @@ -170,7 +170,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt) return 0; if (!par->extradata_size) { uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; int ret; side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c index 7e86f45143..643bf73300 100644 --- a/libavformat/apngenc.c +++ b/libavformat/apngenc.c @@ -119,7 +119,7 @@ static int flush_packet(AVFormatContext *format_context, AVPacket *packet) AVIOContext *io_context = format_context->pb; AVStream *codec_stream = format_context->streams[0]; uint8_t *side_data = NULL; - buffer_size_t side_data_size; + size_t side_data_size; av_assert0(apng->prev_packet); diff --git a/libavformat/avformat.h b/libavformat/avformat.h index bb8ddef88d..3834c9869f 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1873,11 +1873,7 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, * @return pointer to fresh allocated data or NULL otherwise */ uint8_t *av_stream_new_side_data(AVStream *stream, -#if FF_API_BUFFER_SIZE_T - enum AVPacketSideDataType type, int size); -#else enum AVPacketSideDataType type, size_t size); -#endif /** * Get side information from stream. * @@ -1888,11 +1884,7 @@ uint8_t *av_stream_new_side_data(AVStream *stream, * @return pointer to data if present or NULL otherwise */ uint8_t *av_stream_get_side_data(const AVStream *stream, -#if FF_API_BUFFER_SIZE_T - enum AVPacketSideDataType type, int *size); -#else enum AVPacketSideDataType type, size_t *size); -#endif AVProgram *av_new_program(AVFormatContext *s, int id); diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 32d4a99010..fb70c21dc2 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -626,7 +626,7 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt) av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base), av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base)); if (cat->cur_file->metadata) { - buffer_size_t metadata_len; + size_t metadata_len; char* packed_metadata = av_packet_pack_dictionary(cat->cur_file->metadata, &metadata_len); if (!packed_metadata) return AVERROR(ENOMEM); diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index a73fa60d2a..0ceaa5fdfd 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -1806,7 +1806,7 @@ static int update_stream_extradata(AVFormatContext *s, OutputStream *os, { AVCodecParameters *par = os->ctx->streams[0]->codecpar; uint8_t *extradata; - buffer_size_t extradata_size; + size_t extradata_size; int ret; if (par->extradata_size) @@ -2022,7 +2022,7 @@ static int dash_parse_prft(DASHContext *c, AVPacket *pkt) { OutputStream *os = &c->streams[pkt->stream_index]; AVProducerReferenceTime *prft; - buffer_size_t side_data_size; + size_t side_data_size; prft = (AVProducerReferenceTime *)av_packet_get_side_data(pkt, AV_PKT_DATA_PRFT, &side_data_size); if (!prft || side_data_size != sizeof(AVProducerReferenceTime) || (prft->flags && prft->flags != 24)) { diff --git a/libavformat/dump.c b/libavformat/dump.c index 2b6ed1ed1f..a520b01e2d 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -491,8 +491,8 @@ static void dump_sidedata(void *ctx, const AVStream *st, const char *indent) dump_s12m_timecode(ctx, st, sd); break; default: - av_log(ctx, AV_LOG_INFO, - "unknown side data type %d (%d bytes)", sd->type, sd->size); + av_log(ctx, AV_LOG_INFO, "unknown side data type %d " + "(%"SIZE_SPECIFIER" bytes)", sd->type, sd->size); break; } diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index 57f5c012f7..cdd25b817f 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -280,7 +280,7 @@ static int flac_write_audio_packet(struct AVFormatContext *s, AVPacket *pkt) { FlacMuxerContext *c = s->priv_data; uint8_t *streaminfo; - buffer_size_t streaminfo_size; + size_t streaminfo_size; /* check for updated streaminfo */ streaminfo = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 35bf7ace5e..711b94c5bc 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -902,7 +902,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) if (par->codec_id == AV_CODEC_ID_AAC || par->codec_id == AV_CODEC_ID_H264 || par->codec_id == AV_CODEC_ID_MPEG4) { - buffer_size_t side_size; + size_t side_size; uint8_t *side = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size); if (side && side_size > 0 && (side_size != par->extradata_size || memcmp(side, par->extradata, side_size))) { ret = ff_alloc_extradata(par, side_size); diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c index 1fbe4aa4ee..4e62049305 100644 --- a/libavformat/framecrcenc.c +++ b/libavformat/framecrcenc.c @@ -88,7 +88,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt) case AV_PKT_DATA_SPHERICAL: case AV_PKT_DATA_CONTENT_LIGHT_LEVEL: case AV_PKT_DATA_S12M_TIMECODE: - for (int j = 0; j < sd->size / 4; j++) { + for (size_t j = 0; j < sd->size / 4; j++) { uint8_t buf[4]; AV_WL32(buf, AV_RB32(sd->data + 4 * j)); side_data_crc = av_adler32_update(side_data_crc, buf, 4); @@ -119,7 +119,9 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt) default: side_data_crc = av_adler32_update(0, data, sd->size); } - av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08"PRIx32, pkt->side_data[i].size, side_data_crc); + + av_strlcatf(buf, sizeof(buf), ", %8"SIZE_SPECIFIER", 0x%08"PRIx32, + pkt->side_data[i].size, side_data_crc); } } av_strlcatf(buf, sizeof(buf), "\n"); diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c index 1e9faf372a..ec4e44ef12 100644 --- a/libavformat/hashenc.c +++ b/libavformat/hashenc.c @@ -298,18 +298,19 @@ static int framehash_write_packet(struct AVFormatContext *s, AVPacket *pkt) avio_write(s->pb, buf, strlen(buf)); if (c->format_version > 1 && pkt->side_data_elems) { - int i, j; + int i; avio_printf(s->pb, ", S=%d", pkt->side_data_elems); for (i = 0; i < pkt->side_data_elems; i++) { av_hash_init(c->hashes[0]); if (HAVE_BIGENDIAN && pkt->side_data[i].type == AV_PKT_DATA_PALETTE) { - for (j = 0; j < pkt->side_data[i].size; j += sizeof(uint32_t)) { + for (size_t j = 0; j < pkt->side_data[i].size; j += sizeof(uint32_t)) { uint32_t data = AV_RL32(pkt->side_data[i].data + j); av_hash_update(c->hashes[0], (uint8_t *)&data, sizeof(uint32_t)); } } else av_hash_update(c->hashes[0], pkt->side_data[i].data, pkt->side_data[i].size); - snprintf(buf, sizeof(buf) - (AV_HASH_MAX_SIZE * 2 + 1), ", %8d, ", pkt->side_data[i].size); + snprintf(buf, sizeof(buf) - (AV_HASH_MAX_SIZE * 2 + 1), + ", %8"SIZE_SPECIFIER", ", pkt->side_data[i].size); len = strlen(buf); av_hash_final_hex(c->hashes[0], buf + len, sizeof(buf) - len); avio_write(s->pb, buf, strlen(buf)); diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 7b03cb2af1..84ce9ea093 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -383,7 +383,7 @@ int ff_img_read_header(AVFormatContext *s1) static int add_filename_as_pkt_side_data(char *filename, AVPacket *pkt) { AVDictionary *d = NULL; char *packed_metadata = NULL; - buffer_size_t metadata_len; + size_t metadata_len; int ret; av_dict_set(&d, "lavf.image2dec.source_path", filename, 0); diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c index 5488361bde..80fd2dfe27 100644 --- a/libavformat/latmenc.c +++ b/libavformat/latmenc.c @@ -176,7 +176,7 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt) return ff_raw_write_packet(s, pkt); else { uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; int ret; side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index c3d895f931..5ac4db458b 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2030,7 +2030,7 @@ static int mkv_write_block(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar; mkv_track *track = &mkv->tracks[pkt->stream_index]; uint8_t *data = NULL, *side_data = NULL; - buffer_size_t side_data_size; + size_t side_data_size; int err = 0, offset = 0, size = pkt->size; int64_t ts = track->write_dts ? pkt->dts : pkt->pts; uint64_t additional_id; @@ -2141,7 +2141,7 @@ static int mkv_write_vtt_blocks(AVFormatContext *s, AVIOContext *pb, const AVPac MatroskaMuxContext *mkv = s->priv_data; mkv_track *track = &mkv->tracks[pkt->stream_index]; ebml_master blockgroup; - buffer_size_t id_size, settings_size; + size_t id_size, settings_size; int size, id_size_int, settings_size_int; const char *id, *settings; int64_t ts = track->write_dts ? pkt->dts : pkt->pts; @@ -2214,7 +2214,7 @@ static int mkv_check_new_extra_data(AVFormatContext *s, const AVPacket *pkt) mkv_track *track = &mkv->tracks[pkt->stream_index]; AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar; uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; int ret; side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, diff --git a/libavformat/mov.c b/libavformat/mov.c index 8b3371abe6..77ab45aa61 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6362,8 +6362,7 @@ static int mov_read_pssh(MOVContext *c, AVIOContext *pb, MOVAtom atom) uint8_t **key_ids; AVStream *st; uint8_t *side_data, *extra_data, *old_side_data; - size_t side_data_size; - buffer_size_t old_side_data_size; + size_t side_data_size, old_side_data_size; int ret = 0; unsigned int version, kid_count, extra_data_size, alloc_size = 0; diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b15ecbe713..a315377ef6 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1992,7 +1992,7 @@ static int mov_write_colr_tag(AVIOContext *pb, MOVTrack *track, int prefer_icc) // Ref (MP4): ISO/IEC 14496-12:2012 const uint8_t *icc_profile; - buffer_size_t icc_profile_size; + size_t icc_profile_size; if (prefer_icc) { icc_profile = av_stream_get_side_data(track->st, AV_PKT_DATA_ICC_PROFILE, &icc_profile_size); @@ -3046,7 +3046,7 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov, int group = 0; uint32_t *display_matrix = NULL; - buffer_size_t display_matrix_size; + size_t display_matrix_size; int i; if (st) { @@ -4173,7 +4173,7 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, track->tref_tag = MKTAG('h','i','n','t'); track->tref_id = mov->tracks[track->src_track].track_id; } else if (track->par->codec_type == AVMEDIA_TYPE_AUDIO) { - buffer_size_t size; + size_t size; int *fallback; fallback = (int*)av_stream_get_side_data(track->st, AV_PKT_DATA_FALLBACK_TRACK, @@ -5557,7 +5557,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) AVProducerReferenceTime *prft; unsigned int samples_in_chunk = 0; int size = pkt->size, ret = 0, offset = 0; - buffer_size_t prft_size; + size_t prft_size; uint8_t *reformatted_data = NULL; ret = check_pkt(s, pkt); @@ -5910,7 +5910,7 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt) trk->par->codec_id == AV_CODEC_ID_AAC || trk->par->codec_id == AV_CODEC_ID_AV1 || trk->par->codec_id == AV_CODEC_ID_FLAC) { - buffer_size_t side_size; + size_t side_size; uint8_t *side = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size); if (side && side_size > 0 && (side_size != par->extradata_size || memcmp(side, par->extradata, side_size))) { void *newextra = av_mallocz(side_size + AV_INPUT_BUFFER_PADDING_SIZE); diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 803148f0c8..6607560086 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -355,7 +355,7 @@ static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt) if (mp3->xing_offset) { uint8_t *side_data = NULL; - buffer_size_t side_data_size; + size_t side_data_size; mp3_xing_add_frame(mp3, pkt); mp3->audio_size += pkt->size; @@ -402,7 +402,7 @@ static void mp3_update_xing(AVFormatContext *s) AVReplayGain *rg; uint16_t tag_crc; uint8_t *toc; - buffer_size_t rg_size; + size_t rg_size; int i; int64_t old_pos = avio_tell(s->pb); diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index a357f3a6aa..51da325e90 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1681,7 +1681,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) const int64_t max_audio_delay = av_rescale(s->max_delay, 90000, AV_TIME_BASE) / 2; int64_t dts = pkt->dts, pts = pkt->pts; int opus_samples = 0; - buffer_size_t side_data_size; + size_t side_data_size; uint8_t *side_data = NULL; int stream_id = -1; @@ -1818,7 +1818,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) /* Add Opus control header */ if ((AV_RB16(pkt->data) >> 5) != 0x3ff) { uint8_t *side_data; - buffer_size_t side_data_size; + size_t side_data_size; int i, n; int ctrl_header_size; int trim_start = 0, trim_end = 0; diff --git a/libavformat/oggdec.h b/libavformat/oggdec.h index bf982bfe1c..4cce53de41 100644 --- a/libavformat/oggdec.h +++ b/libavformat/oggdec.h @@ -87,7 +87,7 @@ struct ogg_stream { int start_trimming; ///< set the number of packets to drop from the start int end_trimming; ///< set the number of packets to drop from the end uint8_t *new_metadata; - buffer_size_t new_metadata_size; + size_t new_metadata_size; void *private; }; diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 38e4c65c4e..557128ce53 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -589,7 +589,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) break; case AV_CODEC_ID_H263: if (s->flags & FF_RTP_FLAG_RFC2190) { - buffer_size_t mb_info_size; + size_t mb_info_size; const uint8_t *mb_info = av_packet_get_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, &mb_info_size); diff --git a/libavformat/segment.c b/libavformat/segment.c index 13954b8f99..faa8eb8f92 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -856,7 +856,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR(EINVAL); if (!st->codecpar->extradata_size) { - buffer_size_t pkt_extradata_size; + size_t pkt_extradata_size; uint8_t *pkt_extradata = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, &pkt_extradata_size); if (pkt_extradata && pkt_extradata_size > 0) { ret = ff_alloc_extradata(st->codecpar, pkt_extradata_size); diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index 9bb0ff94c1..93d5ed7ac8 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -61,7 +61,7 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt) SRTContext *srt = avf->priv_data; int64_t s = pkt->pts, e, d = pkt->duration; - buffer_size_t size; + size_t size; int x1 = -1, y1 = -1, x2 = -1, y2 = -1; const uint8_t *p; diff --git a/libavformat/utils.c b/libavformat/utils.c index e36b75081f..7078891dc0 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -5462,7 +5462,7 @@ int ff_generate_avci_extradata(AVStream *st) } uint8_t *av_stream_get_side_data(const AVStream *st, - enum AVPacketSideDataType type, buffer_size_t *size) + enum AVPacketSideDataType type, size_t *size) { int i; @@ -5515,7 +5515,7 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, } uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type, - buffer_size_t size) + size_t size) { int ret; uint8_t *data = av_malloc(size); @@ -5631,7 +5631,7 @@ int ff_standardize_creation_time(AVFormatContext *s) int ff_get_packet_palette(AVFormatContext *s, AVPacket *pkt, int ret, uint32_t *palette) { uint8_t *side_data; - buffer_size_t size; + size_t size; side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_PALETTE, &size); if (side_data) { diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c index 8d2fdfed37..cf060bd011 100644 --- a/libavformat/webvttdec.c +++ b/libavformat/webvttdec.c @@ -78,7 +78,7 @@ static int webvtt_read_header(AVFormatContext *s) int64_t pos; AVPacket *sub; const char *p, *identifier, *settings; - int identifier_len, settings_len; + size_t identifier_len, settings_len; int64_t ts_start, ts_end; ff_subtitles_read_chunk(s->pb, &cue); diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c index 2bc86041a7..95f58e2942 100644 --- a/libavformat/webvttenc.c +++ b/libavformat/webvttenc.c @@ -64,7 +64,7 @@ static int webvtt_write_header(AVFormatContext *ctx) static int webvtt_write_packet(AVFormatContext *ctx, AVPacket *pkt) { AVIOContext *pb = ctx->pb; - buffer_size_t id_size, settings_size; + size_t id_size, settings_size; int id_size_int, settings_size_int; uint8_t *id, *settings; diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 858633e8c7..b13eeadffb 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -26,7 +26,7 @@ #include "mem.h" #include "thread.h" -AVBufferRef *av_buffer_create(uint8_t *data, buffer_size_t size, +AVBufferRef *av_buffer_create(uint8_t *data, size_t size, void (*free)(void *opaque, uint8_t *data), void *opaque, int flags) { @@ -64,7 +64,7 @@ void av_buffer_default_free(void *opaque, uint8_t *data) av_free(data); } -AVBufferRef *av_buffer_alloc(buffer_size_t size) +AVBufferRef *av_buffer_alloc(size_t size) { AVBufferRef *ret = NULL; uint8_t *data = NULL; @@ -80,7 +80,7 @@ AVBufferRef *av_buffer_alloc(buffer_size_t size) return ret; } -AVBufferRef *av_buffer_allocz(buffer_size_t size) +AVBufferRef *av_buffer_allocz(size_t size) { AVBufferRef *ret = av_buffer_alloc(size); if (!ret) @@ -166,7 +166,7 @@ int av_buffer_make_writable(AVBufferRef **pbuf) return 0; } -int av_buffer_realloc(AVBufferRef **pbuf, buffer_size_t size) +int av_buffer_realloc(AVBufferRef **pbuf, size_t size) { AVBufferRef *buf = *pbuf; uint8_t *tmp; @@ -242,8 +242,8 @@ int av_buffer_replace(AVBufferRef **pdst, AVBufferRef *src) return 0; } -AVBufferPool *av_buffer_pool_init2(buffer_size_t size, void *opaque, - AVBufferRef* (*alloc)(void *opaque, buffer_size_t size), +AVBufferPool *av_buffer_pool_init2(size_t size, void *opaque, + AVBufferRef* (*alloc)(void *opaque, size_t size), void (*pool_free)(void *opaque)) { AVBufferPool *pool = av_mallocz(sizeof(*pool)); @@ -263,7 +263,7 @@ AVBufferPool *av_buffer_pool_init2(buffer_size_t size, void *opaque, return pool; } -AVBufferPool *av_buffer_pool_init(buffer_size_t size, AVBufferRef* (*alloc)(buffer_size_t size)) +AVBufferPool *av_buffer_pool_init(size_t size, AVBufferRef* (*alloc)(size_t size)) { AVBufferPool *pool = av_mallocz(sizeof(*pool)); if (!pool) diff --git a/libavutil/buffer.h b/libavutil/buffer.h index 241a80ed67..63ab87eb72 100644 --- a/libavutil/buffer.h +++ b/libavutil/buffer.h @@ -93,11 +93,7 @@ typedef struct AVBufferRef { /** * Size of data in bytes. */ -#if FF_API_BUFFER_SIZE_T - int size; -#else size_t size; -#endif } AVBufferRef; /** @@ -105,21 +101,13 @@ typedef struct AVBufferRef { * * @return an AVBufferRef of given size or NULL when out of memory */ -#if FF_API_BUFFER_SIZE_T -AVBufferRef *av_buffer_alloc(int size); -#else AVBufferRef *av_buffer_alloc(size_t size); -#endif /** * Same as av_buffer_alloc(), except the returned buffer will be initialized * to zero. */ -#if FF_API_BUFFER_SIZE_T -AVBufferRef *av_buffer_allocz(int size); -#else AVBufferRef *av_buffer_allocz(size_t size); -#endif /** * Always treat the buffer as read-only, even when it has only one @@ -142,11 +130,7 @@ AVBufferRef *av_buffer_allocz(size_t size); * * @return an AVBufferRef referring to data on success, NULL on failure. */ -#if FF_API_BUFFER_SIZE_T -AVBufferRef *av_buffer_create(uint8_t *data, int size, -#else AVBufferRef *av_buffer_create(uint8_t *data, size_t size, -#endif void (*free)(void *opaque, uint8_t *data), void *opaque, int flags); @@ -214,11 +198,7 @@ int av_buffer_make_writable(AVBufferRef **buf); * reference to it (i.e. the one passed to this function). In all other cases * a new buffer is allocated and the data is copied. */ -#if FF_API_BUFFER_SIZE_T -int av_buffer_realloc(AVBufferRef **buf, int size); -#else int av_buffer_realloc(AVBufferRef **buf, size_t size); -#endif /** * Ensure dst refers to the same data as src. @@ -285,11 +265,7 @@ typedef struct AVBufferPool AVBufferPool; * (av_buffer_alloc()). * @return newly created buffer pool on success, NULL on error. */ -#if FF_API_BUFFER_SIZE_T -AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size)); -#else AVBufferPool *av_buffer_pool_init(size_t size, AVBufferRef* (*alloc)(size_t size)); -#endif /** * Allocate and initialize a buffer pool with a more complex allocator. @@ -306,13 +282,8 @@ AVBufferPool *av_buffer_pool_init(size_t size, AVBufferRef* (*alloc)(size_t size * data. May be NULL. * @return newly created buffer pool on success, NULL on error. */ -#if FF_API_BUFFER_SIZE_T -AVBufferPool *av_buffer_pool_init2(int size, void *opaque, - AVBufferRef* (*alloc)(void *opaque, int size), -#else AVBufferPool *av_buffer_pool_init2(size_t size, void *opaque, AVBufferRef* (*alloc)(void *opaque, size_t size), -#endif void (*pool_free)(void *opaque)); /** diff --git a/libavutil/buffer_internal.h b/libavutil/buffer_internal.h index d902772ed3..839dc05f8f 100644 --- a/libavutil/buffer_internal.h +++ b/libavutil/buffer_internal.h @@ -33,7 +33,7 @@ struct AVBuffer { uint8_t *data; /**< data described by this buffer */ - buffer_size_t size; /**< size of data in bytes */ + size_t size; /**< size of data in bytes */ /** * number of existing AVBufferRef instances referring to this buffer @@ -90,10 +90,10 @@ struct AVBufferPool { */ atomic_uint refcount; - buffer_size_t size; + size_t size; void *opaque; - AVBufferRef* (*alloc)(buffer_size_t size); - AVBufferRef* (*alloc2)(void *opaque, buffer_size_t size); + AVBufferRef* (*alloc)(size_t size); + AVBufferRef* (*alloc2)(void *opaque, size_t size); void (*pool_free)(void *opaque); }; diff --git a/libavutil/detection_bbox.c b/libavutil/detection_bbox.c index 0750ffac6a..40711e6aa9 100644 --- a/libavutil/detection_bbox.c +++ b/libavutil/detection_bbox.c @@ -54,10 +54,6 @@ AVDetectionBBoxHeader *av_detection_bbox_create_side_data(AVFrame *frame, uint32 header = av_detection_bbox_alloc(nb_bboxes, &size); if (!header) return NULL; - if (size > INT_MAX) { - av_freep(&header); - return NULL; - } buf = av_buffer_create((uint8_t *)header, size, NULL, NULL, 0); if (!buf) { av_freep(&header); diff --git a/libavutil/frame.c b/libavutil/frame.c index 5bc8ab36df..2ec59b44b1 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -603,7 +603,7 @@ AVFrameSideData *av_frame_new_side_data_from_buf(AVFrame *frame, AVFrameSideData *av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, - buffer_size_t size) + size_t size) { AVFrameSideData *ret; AVBufferRef *buf = av_buffer_alloc(size); diff --git a/libavutil/frame.h b/libavutil/frame.h index 853d4cabec..ff2540a20f 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -209,11 +209,7 @@ enum AVActiveFormatDescription { typedef struct AVFrameSideData { enum AVFrameSideDataType type; uint8_t *data; -#if FF_API_BUFFER_SIZE_T - int size; -#else size_t size; -#endif AVDictionary *metadata; AVBufferRef *buf; } AVFrameSideData; @@ -818,11 +814,7 @@ AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane); */ AVFrameSideData *av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, -#if FF_API_BUFFER_SIZE_T - int size); -#else size_t size); -#endif /** * Add a new side data to a frame from an existing AVBufferRef diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c index 3773cd9eb8..cfdf2d7fd4 100644 --- a/libavutil/hwcontext_cuda.c +++ b/libavutil/hwcontext_cuda.c @@ -93,7 +93,7 @@ static void cuda_buffer_free(void *opaque, uint8_t *data) CHECK_CU(cu->cuCtxPopCurrent(&dummy)); } -static AVBufferRef *cuda_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *cuda_pool_alloc(void *opaque, size_t size) { AVHWFramesContext *ctx = opaque; AVHWDeviceContext *device_ctx = ctx->device_ctx; diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 2a3549ebd8..27274ee3fa 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -202,7 +202,7 @@ static AVBufferRef *d3d11va_alloc_single(AVHWFramesContext *ctx) return wrap_texture_buf(tex, 0); } -static AVBufferRef *d3d11va_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *d3d11va_pool_alloc(void *opaque, size_t size) { AVHWFramesContext *ctx = (AVHWFramesContext*)opaque; D3D11VAFramesContext *s = ctx->internal->priv; diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index 33b3dc80ff..63b037da4a 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -124,7 +124,7 @@ static void dxva2_pool_release_dummy(void *opaque, uint8_t *data) // released in dxva2_frames_uninit() } -static AVBufferRef *dxva2_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *dxva2_pool_alloc(void *opaque, size_t size) { AVHWFramesContext *ctx = (AVHWFramesContext*)opaque; DXVA2FramesContext *s = ctx->internal->priv; diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index ee814602b2..41fac43229 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -1617,7 +1617,7 @@ static void opencl_pool_free(void *opaque, uint8_t *data) av_free(desc); } -static AVBufferRef *opencl_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *opencl_pool_alloc(void *opaque, size_t size) { AVHWFramesContext *hwfc = opaque; AVOpenCLDeviceContext *hwctx = hwfc->device_ctx->hwctx; diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 30b0d81f84..08a6e0ee1c 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -194,7 +194,7 @@ static void qsv_pool_release_dummy(void *opaque, uint8_t *data) { } -static AVBufferRef *qsv_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *qsv_pool_alloc(void *opaque, size_t size) { AVHWFramesContext *ctx = (AVHWFramesContext*)opaque; QSVFramesContext *s = ctx->internal->priv; diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 4b81bd1f67..83e542876d 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -464,7 +464,7 @@ static void vaapi_buffer_free(void *opaque, uint8_t *data) } } -static AVBufferRef *vaapi_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *vaapi_pool_alloc(void *opaque, size_t size) { AVHWFramesContext *hwfc = opaque; VAAPIFramesContext *ctx = hwfc->internal->priv; diff --git a/libavutil/hwcontext_vdpau.c b/libavutil/hwcontext_vdpau.c index a6fd7126f3..5b78e95529 100644 --- a/libavutil/hwcontext_vdpau.c +++ b/libavutil/hwcontext_vdpau.c @@ -225,7 +225,7 @@ static void vdpau_buffer_free(void *opaque, uint8_t *data) device_priv->surf_destroy(surf); } -static AVBufferRef *vdpau_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *vdpau_pool_alloc(void *opaque, size_t size) { AVHWFramesContext *ctx = opaque; VDPAUFramesContext *priv = ctx->internal->priv; diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 2e3faaaa1a..48327ad98f 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1693,7 +1693,7 @@ static void try_export_flags(AVHWFramesContext *hwfc, } } -static AVBufferRef *vulkan_pool_alloc(void *opaque, buffer_size_t size) +static AVBufferRef *vulkan_pool_alloc(void *opaque, size_t size) { int err; AVVkFrame *f; diff --git a/libavutil/internal.h b/libavutil/internal.h index 854e9cbed2..7cd36ff742 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -292,11 +292,4 @@ void ff_check_pixfmt_descriptors(void); */ int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp); -// Temporary typedef to simplify porting all AVBufferRef users to size_t -#if FF_API_BUFFER_SIZE_T -typedef int buffer_size_t; -#else -typedef size_t buffer_size_t; -#endif - #endif /* AVUTIL_INTERNAL_H */ diff --git a/libavutil/version.h b/libavutil/version.h index 0d015335c3..310145e350 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -108,9 +108,6 @@ #ifndef FF_API_CHILD_CLASS_NEXT #define FF_API_CHILD_CLASS_NEXT (LIBAVUTIL_VERSION_MAJOR < 57) #endif -#ifndef FF_API_BUFFER_SIZE_T -#define FF_API_BUFFER_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_CPU_FLAGS #define FF_API_CPU_FLAGS (LIBAVUTIL_VERSION_MAJOR < 57) #endif diff --git a/libavutil/video_enc_params.c b/libavutil/video_enc_params.c index 635176ab91..b9cdafddbb 100644 --- a/libavutil/video_enc_params.c +++ b/libavutil/video_enc_params.c @@ -63,10 +63,6 @@ av_video_enc_params_create_side_data(AVFrame *frame, enum AVVideoEncParamsType t par = av_video_enc_params_alloc(type, nb_blocks, &size); if (!par) return NULL; - if (size > INT_MAX) { - av_free(par); - return NULL; - } buf = av_buffer_create((uint8_t *)par, size, NULL, NULL, 0); if (!buf) { av_freep(&par); From patchwork Mon Apr 19 14:10:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27064 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp564663iob; Mon, 19 Apr 2021 07:22:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymSBrtsGvs3TbuHnVr0pkbqjjLUgbTUa5pr3obtB8MKfPML04ZQI4ovYOu863eHNfklxb3 X-Received: by 2002:aa7:da01:: with SMTP id r1mr17555047eds.197.1618842132215; Mon, 19 Apr 2021 07:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842132; cv=none; d=google.com; s=arc-20160816; b=fc/aZ4sAvpGcQEnKRTXxZeC8byh4T3KkS+dohlEU+Ncrp+aeOuv823HCRd1X1V47/f 2AlYOfZYo+vQ6E0718FvhefW9L4+5FENmhfMKEXUoQL5F6RBaeWKIzKHoAN5CQR/0ouX 4KXpUDGbggfyD5k9UeCT6SObZyEzkMe3G1fzQG8ejGoug9+OSIbW4yPaNG8ihcGAt07b ppFekfQXQSRVs8iqrMIsW/YMRAWR3trG7bVqCP8E5F8ld6MNsLsuBGPe6T4YIKXxVtig ++8F11tKw0NiFW7/lehkx1iTBvToMhy56qIdjVLdjkYbcRPZhBlIgKiS/8Vl3wG5iP9h 4dhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=3ylz5AvGBqNSv3zTvNN12ihlTKZUyZ4jxSDEguDkT+4=; b=hpqz4tyFAyuqVZG8KhlN0cm7ME75bkcgAwE5KeULSWzpN3dpt0nCLoXzZE3zECuNTb YY4golhrI+dKnC8BuDovKm21OX115JSFClJOU/YA1viTL5lHJ1QdSssGhAiHw9sUcYoy QiTe6O7NAqqrBUydEtjqOIhxGPKik06t8GnXCP+siuJHA4RqzJouu8vaH9rMRUlJZYZ9 8yrTJxUcUOuZL1VN1pkPKm+D+/H5el3S7lps5wc1Nnp1D+F4Et+0IZRBVJoLNpnR7fnc cIf4uKb4xTXVeyD7SOeGSGQlZ8OifjbUxV44H3NnG/pvyRQEDUcdo+WRRa2wkEZwB3LF Xhsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=SthVjDFy; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w19si12659083edt.351.2021.04.19.07.22.11; Mon, 19 Apr 2021 07:22:12 -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=@gmail.com header.s=20161025 header.b=SthVjDFy; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A2D1689D92; Mon, 19 Apr 2021 17:12:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B1F88689D2F for ; Mon, 19 Apr 2021 17:12:29 +0300 (EEST) Received: by mail-qk1-f175.google.com with SMTP id 8so2104270qkv.8 for ; Mon, 19 Apr 2021 07:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=JI/XetkB6XVwQKayRZhKc5QUYXAM19svEJ7HbYJxPSE=; b=SthVjDFya4JDb6Z6pcHv48etFyIqNoqwYiMencc4JPjZryutcJxhQHnDvsZyxrokSg UWuFvmRhRsgyRLxMZsHRb7W62ytnaQ0yuup0h2bEpcg+R81eiMhloO4z/23+NPhOhT8k FC6AqfGhl+shHwDF13SPPb3kv61pZqcfGCo+Gpn9Ifq1Rq4KfSDk/9r6HA7M6HeAqcdd GCzvI4gB+bo/4/vPJdJMeAK9OFSWvmEeiY5/EMs2sVT/K85CRah5R59HfF5Ye+t3QbZq 4BYGL7effDF2nNGmvR5sy26CAPaPlfIV8RW+m3+Dq6Q3pBE4qWpN92/NApJk8Zj6QgNC rgWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JI/XetkB6XVwQKayRZhKc5QUYXAM19svEJ7HbYJxPSE=; b=cs7Xntd7Df/2f2mPbvVY//K3NFHkjlXUXgCYl/HdYmmmnt8wbqnmtjeCGDLFTf4evK Rn4yqwtt4X5KkcOXOKkmqMVeRCVJ/fzOybYw4b/wPU2qebdJNWojlXv5IPyuOIH7KB6a xfXDRr5uKjTDxDueZIzg/K4i4t7hz1sYW7poy2Z8s5Y4hA9FGtqqYo9TRShvrJsgWJGG K4MGvIIMnz5y8BzBgmmiZoTk0aVz9/3OoRb1Wl3vNK7GQJQlVvkyQib0opfrHcF0SwDv 5pni3JA1kTWMG8DieN0AMoQJPhXV7KFp4pb2Pz2TJisFRcBbi0Wc432GrtUPmqimW3nC Mwiw== X-Gm-Message-State: AOAM530Q+cHLYSGCWvYuLuQ51Su9me7CGIMPVBEcjdknZ9Drzk8de9Q/ d66x3fT9qBR0WhtXiv5MGhlV9D+icgw= X-Received: by 2002:a37:8a01:: with SMTP id m1mr12459858qkd.85.1618841548279; Mon, 19 Apr 2021 07:12:28 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:28 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:08 -0300 Message-Id: <20210419141024.8174-72-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 71/87] avutil/cpu: Remove deprecated functions 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: s/qkahnCXnMQ From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- libavutil/cpu.c | 92 --------------------------------------------- libavutil/cpu.h | 24 ------------ libavutil/version.h | 3 -- 3 files changed, 119 deletions(-) diff --git a/libavutil/cpu.c b/libavutil/cpu.c index 1215394620..8960415d00 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -102,98 +102,6 @@ int av_get_cpu_flags(void) return flags; } -#if FF_API_CPU_FLAGS -void av_set_cpu_flags_mask(int mask) -{ - atomic_store_explicit(&cpu_flags, get_cpu_flags() & mask, - memory_order_relaxed); -} - -int av_parse_cpu_flags(const char *s) -{ -#define CPUFLAG_MMXEXT (AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT | AV_CPU_FLAG_CMOV) -#define CPUFLAG_3DNOW (AV_CPU_FLAG_3DNOW | AV_CPU_FLAG_MMX) -#define CPUFLAG_3DNOWEXT (AV_CPU_FLAG_3DNOWEXT | CPUFLAG_3DNOW) -#define CPUFLAG_SSE (AV_CPU_FLAG_SSE | CPUFLAG_MMXEXT) -#define CPUFLAG_SSE2 (AV_CPU_FLAG_SSE2 | CPUFLAG_SSE) -#define CPUFLAG_SSE2SLOW (AV_CPU_FLAG_SSE2SLOW | CPUFLAG_SSE2) -#define CPUFLAG_SSE3 (AV_CPU_FLAG_SSE3 | CPUFLAG_SSE2) -#define CPUFLAG_SSE3SLOW (AV_CPU_FLAG_SSE3SLOW | CPUFLAG_SSE3) -#define CPUFLAG_SSSE3 (AV_CPU_FLAG_SSSE3 | CPUFLAG_SSE3) -#define CPUFLAG_SSE4 (AV_CPU_FLAG_SSE4 | CPUFLAG_SSSE3) -#define CPUFLAG_SSE42 (AV_CPU_FLAG_SSE42 | CPUFLAG_SSE4) -#define CPUFLAG_AVX (AV_CPU_FLAG_AVX | CPUFLAG_SSE42) -#define CPUFLAG_AVXSLOW (AV_CPU_FLAG_AVXSLOW | CPUFLAG_AVX) -#define CPUFLAG_XOP (AV_CPU_FLAG_XOP | CPUFLAG_AVX) -#define CPUFLAG_FMA3 (AV_CPU_FLAG_FMA3 | CPUFLAG_AVX) -#define CPUFLAG_FMA4 (AV_CPU_FLAG_FMA4 | CPUFLAG_AVX) -#define CPUFLAG_AVX2 (AV_CPU_FLAG_AVX2 | CPUFLAG_AVX) -#define CPUFLAG_BMI2 (AV_CPU_FLAG_BMI2 | AV_CPU_FLAG_BMI1) -#define CPUFLAG_AESNI (AV_CPU_FLAG_AESNI | CPUFLAG_SSE42) -#define CPUFLAG_AVX512 (AV_CPU_FLAG_AVX512 | CPUFLAG_AVX2) - static const AVOption cpuflags_opts[] = { - { "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" }, -#if ARCH_PPC - { "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .unit = "flags" }, -#elif ARCH_X86 - { "mmx" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_MMX }, .unit = "flags" }, - { "mmxext" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_MMXEXT }, .unit = "flags" }, - { "sse" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSE }, .unit = "flags" }, - { "sse2" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSE2 }, .unit = "flags" }, - { "sse2slow", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSE2SLOW }, .unit = "flags" }, - { "sse3" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSE3 }, .unit = "flags" }, - { "sse3slow", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSE3SLOW }, .unit = "flags" }, - { "ssse3" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSSE3 }, .unit = "flags" }, - { "atom" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ATOM }, .unit = "flags" }, - { "sse4.1" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSE4 }, .unit = "flags" }, - { "sse4.2" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_SSE42 }, .unit = "flags" }, - { "avx" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_AVX }, .unit = "flags" }, - { "avxslow" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_AVXSLOW }, .unit = "flags" }, - { "xop" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_XOP }, .unit = "flags" }, - { "fma3" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_FMA3 }, .unit = "flags" }, - { "fma4" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_FMA4 }, .unit = "flags" }, - { "avx2" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_AVX2 }, .unit = "flags" }, - { "bmi1" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_BMI1 }, .unit = "flags" }, - { "bmi2" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_BMI2 }, .unit = "flags" }, - { "3dnow" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_3DNOW }, .unit = "flags" }, - { "3dnowext", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_3DNOWEXT }, .unit = "flags" }, - { "cmov", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_CMOV }, .unit = "flags" }, - { "aesni" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_AESNI }, .unit = "flags" }, - { "avx512" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_AVX512 }, .unit = "flags" }, -#elif ARCH_ARM - { "armv5te", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ARMV5TE }, .unit = "flags" }, - { "armv6", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ARMV6 }, .unit = "flags" }, - { "armv6t2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ARMV6T2 }, .unit = "flags" }, - { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" }, - { "vfp_vm", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP_VM }, .unit = "flags" }, - { "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 }, .unit = "flags" }, - { "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" }, -#elif ARCH_AARCH64 - { "armv8", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ARMV8 }, .unit = "flags" }, - { "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" }, - { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" }, -#elif ARCH_MIPS - { "mmi", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_MMI }, .unit = "flags" }, - { "msa", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_MSA }, .unit = "flags" }, -#endif - { NULL }, - }; - static const AVClass class = { - .class_name = "cpuflags", - .item_name = av_default_item_name, - .option = cpuflags_opts, - .version = LIBAVUTIL_VERSION_INT, - }; - - int flags = 0, ret; - const AVClass *pclass = &class; - - if ((ret = av_opt_eval_flags(&pclass, &cpuflags_opts[0], s, &flags)) < 0) - return ret; - - return flags & INT_MAX; -} -#endif int av_parse_cpu_caps(unsigned *flags, const char *s) { static const AVOption cpuflags_opts[] = { diff --git a/libavutil/cpu.h b/libavutil/cpu.h index 18dfa492ef..b555422dae 100644 --- a/libavutil/cpu.h +++ b/libavutil/cpu.h @@ -23,9 +23,6 @@ #include -#include "attributes.h" -#include "version.h" - #define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */ /* lower 16 bits - CPU features */ @@ -89,27 +86,6 @@ int av_get_cpu_flags(void); */ void av_force_cpu_flags(int flags); -#if FF_API_CPU_FLAGS -/** - * Set a mask on flags returned by av_get_cpu_flags(). - * This function is mainly useful for testing. - * Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible - */ -attribute_deprecated void av_set_cpu_flags_mask(int mask); - -/** - * Parse CPU flags from a string. - * - * The returned flags contain the specified flags as well as related unspecified flags. - * - * This function exists only for compatibility with libav. - * Please use av_parse_cpu_caps() when possible. - * @return a combination of AV_CPU_* flags, negative on error. - */ -attribute_deprecated -int av_parse_cpu_flags(const char *s); -#endif - /** * Parse CPU caps from a string and update the given AV_CPU_* flags based on that. * diff --git a/libavutil/version.h b/libavutil/version.h index 310145e350..b61467ed9d 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -108,9 +108,6 @@ #ifndef FF_API_CHILD_CLASS_NEXT #define FF_API_CHILD_CLASS_NEXT (LIBAVUTIL_VERSION_MAJOR < 57) #endif -#ifndef FF_API_CPU_FLAGS -#define FF_API_CPU_FLAGS (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_D2STR #define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58) #endif From patchwork Mon Apr 19 14:10:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27057 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp565207iob; Mon, 19 Apr 2021 07:22:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLsCDmr6Jxe++na0YgjWnbtHwtWtOVX6J7elZaB8BPuA90D7XtVWLVdof/AyyTE/DyMLsh X-Received: by 2002:a05:6402:268c:: with SMTP id w12mr25470526edd.280.1618842174026; Mon, 19 Apr 2021 07:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842174; cv=none; d=google.com; s=arc-20160816; b=QP7pm3ATMOtnNzfJgJIF1WtacepUIZtAa9c6lcF5AsyflL1iV1ipPXs3hO0W7+omaf trEELBKMdd2sHSj8ImfMPadgyrOFWrpKTYBrtFsvTW9rYKWBqDv03UqU4bzMPi/L1F8A Br1ddP6NBjwGVZgmHypwt8BGGhE+6kzPhTSuZDAuiZS05KNnStPdM3U/ZbHrHvZCDomk ZICnj6NSreAU370UQ+liTZCbfF4NON3L/sQeLehgTOpsMC3sBKE9D5Dd+Iw/3yV6mT2L dWJkporqdD/XQ7Qpr+Lb2YtdMlAl2LXVdKsL/+WjLihK5nxYfCIKO6LQLD9lMYuLz7A9 SnfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=tBS/Y2sXNgnEKkyNbsxjiXpIf6ktAHfVr5NJ4m1ytlk=; b=KTetVORkSz24hU2ieOof3IvJ06f2/+VrM6kRp5c8z0YbbekM9f13kqKEAEWz8ye31r VQIK8+zINFV6SbVZMD76Ja8aj+8sQxnVCsEcnXBZQbq+IlYhenYPj/DPt4R3kuzpy5fQ W6dcshvbhju7H1KhwqF3q6Lirbn+rsJ9hJcStTG0X9Qdr3uSP0G9UpPst8vO3RRn+7rW h6oxLidyZbKd9kF4Z4IrFxltK3h0Kq6W2K644RF40mK3+g/ugC8/2XITwpOdwYUD6aMn PD+66Nuw6bQNEaEtFZwuIyqH8SgQ01FnLhnOsJa+VmkD+mHy/e6G5vYc+30qjkwYd3C9 +h2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="X/WPp3V7"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id zh8si13555546ejb.639.2021.04.19.07.22.53; Mon, 19 Apr 2021 07:22: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=@gmail.com header.s=20161025 header.b="X/WPp3V7"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5ECE4689E3B; Mon, 19 Apr 2021 17:12:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 92361680906 for ; Mon, 19 Apr 2021 17:12:35 +0300 (EEST) Received: by mail-qk1-f181.google.com with SMTP id d15so22842784qkc.9 for ; Mon, 19 Apr 2021 07:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7KyU9fwSDaktLAEq2wYN3AqD7iTsbxOw0mCfMjieeeE=; b=X/WPp3V766QwaGBVYelV8GtS6GDAvgDiZmhoCAOVcxkPMqSk7HIgErM3LOHbx+rRDO zhLMTJyWDRYybDg5z7rbj6LdC41Wc/uufGJjNvIyGR9h/fR74YnCbd72eCpI20djWmpk BEZMxu39ULGwxDG+9UGYHNbGhoyyOB3H3mntO/gN/QuLPd2AJ8HUAzlFt7l8niyMVQTB Ez5MzhIeIGXinuagoP8iUwJoVmA9rQoaMGzM1NmXCPKPBlk+NEzQQL59nk34y+4fQQb7 uyW3iw6JHxAXqX6L/EQCjXs5OD0ovS2l0JrFjwixlfpk5Nv0/qtCJ4wUJpeM4UAEbIfR r+nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7KyU9fwSDaktLAEq2wYN3AqD7iTsbxOw0mCfMjieeeE=; b=p5l9TQOQcPRhPKSLYxCZjktHAMAMjqTuSd8s0BkSRRpUyZppWFQRn66VySjN9ociko 0vaDcbluKhgockX7vwlYd5xz2Yy2nn8ZVNlNLwXOJnhv3LNo2p88gv1Gu05wC6de1i1G 4vC7iXO53OnXOvs+IEJVKUEW1DWwRornoQ0xSfcNC8AcILyNz8SwtVVlBrGoLJkRLyr3 v6FMu3QrDiNzUuI5vle9mAnDtRPOcLJbZx4o+e9BVh0ahx/vOtPU4L6wk+sCddt8LIA/ JHUw919QN4zNeaJd9I1nF0e+N+8uKDEl7OVfFIRw/wt8WYA1cOGnbjICDTf0FfYcBzY7 7nnA== X-Gm-Message-State: AOAM530LMdyg3u/LagKA1xc6YKnQUsEpMhe1BW7uMDeoBZzMCvRiA93j xMdYF7LP/WwYF/csmRnSf/UHsPqlZbw= X-Received: by 2002:a37:76c2:: with SMTP id r185mr11817548qkc.204.1618841552016; Mon, 19 Apr 2021 07:12:32 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:30 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:09 -0300 Message-Id: <20210419141024.8174-73-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 72/87] libavresample: Remove deprecated library 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: TPZCzDy/U1VD From: Andreas Rheinhardt Deprecated in c29038f3041a4080342b2e333c1967d136749c0f. The resample filter based upon this library has been removed as well. Signed-off-by: Andreas Rheinhardt --- Makefile | 1 - configure | 16 +- ffbuild/common.mak | 2 +- fftools/cmdutils.c | 12 - fftools/ffmpeg_filter.c | 2 - libavfilter/Makefile | 1 - libavfilter/af_resample.c | 369 ------ libavfilter/allfilters.c | 1 - libavresample/Makefile | 19 - libavresample/aarch64/Makefile | 7 - libavresample/aarch64/asm-offsets.h | 28 - libavresample/aarch64/audio_convert_init.c | 49 - libavresample/aarch64/audio_convert_neon.S | 363 ------ libavresample/aarch64/neontest.c | 31 - libavresample/aarch64/resample_init.c | 71 -- libavresample/aarch64/resample_neon.S | 233 ---- libavresample/arm/Makefile | 7 - libavresample/arm/asm-offsets.h | 29 - libavresample/arm/audio_convert_init.c | 49 - libavresample/arm/audio_convert_neon.S | 363 ------ libavresample/arm/neontest.c | 31 - libavresample/arm/resample_init.c | 74 -- libavresample/arm/resample_neon.S | 358 ------ libavresample/audio_convert.c | 416 ------- libavresample/audio_convert.h | 103 -- libavresample/audio_data.c | 381 ------ libavresample/audio_data.h | 178 --- libavresample/audio_mix.c | 742 ------------ libavresample/audio_mix.h | 94 -- libavresample/audio_mix_matrix.c | 294 ----- libavresample/avresample.h | 595 --------- libavresample/avresampleres.rc | 55 - libavresample/dither.c | 440 ------- libavresample/dither.h | 93 -- libavresample/internal.h | 116 -- libavresample/libavresample.v | 6 - libavresample/options.c | 113 -- libavresample/resample.c | 446 ------- libavresample/resample.h | 96 -- libavresample/resample_template.c | 118 -- libavresample/tests/.gitignore | 1 - libavresample/tests/avresample.c | 342 ------ libavresample/utils.c | 793 ------------ libavresample/version.h | 50 - libavresample/x86/Makefile | 9 - libavresample/x86/audio_convert.asm | 1261 -------------------- libavresample/x86/audio_convert_init.c | 265 ---- libavresample/x86/audio_mix.asm | 511 -------- libavresample/x86/audio_mix_init.c | 215 ---- libavresample/x86/dither.asm | 117 -- libavresample/x86/dither_init.c | 60 - libavresample/x86/util.asm | 41 - libavresample/x86/w64xmmtest.c | 31 - tests/Makefile | 1 - tests/fate.sh | 1 - tests/fate/libavresample.mak | 68 -- tools/gen-rc | 1 - tools/target_dec_fuzzer.c | 2 +- 58 files changed, 5 insertions(+), 10166 deletions(-) delete mode 100644 libavfilter/af_resample.c delete mode 100644 libavresample/Makefile delete mode 100644 libavresample/aarch64/Makefile delete mode 100644 libavresample/aarch64/asm-offsets.h delete mode 100644 libavresample/aarch64/audio_convert_init.c delete mode 100644 libavresample/aarch64/audio_convert_neon.S delete mode 100644 libavresample/aarch64/neontest.c delete mode 100644 libavresample/aarch64/resample_init.c delete mode 100644 libavresample/aarch64/resample_neon.S delete mode 100644 libavresample/arm/Makefile delete mode 100644 libavresample/arm/asm-offsets.h delete mode 100644 libavresample/arm/audio_convert_init.c delete mode 100644 libavresample/arm/audio_convert_neon.S delete mode 100644 libavresample/arm/neontest.c delete mode 100644 libavresample/arm/resample_init.c delete mode 100644 libavresample/arm/resample_neon.S delete mode 100644 libavresample/audio_convert.c delete mode 100644 libavresample/audio_convert.h delete mode 100644 libavresample/audio_data.c delete mode 100644 libavresample/audio_data.h delete mode 100644 libavresample/audio_mix.c delete mode 100644 libavresample/audio_mix.h delete mode 100644 libavresample/audio_mix_matrix.c delete mode 100644 libavresample/avresample.h delete mode 100644 libavresample/avresampleres.rc delete mode 100644 libavresample/dither.c delete mode 100644 libavresample/dither.h delete mode 100644 libavresample/internal.h delete mode 100644 libavresample/libavresample.v delete mode 100644 libavresample/options.c delete mode 100644 libavresample/resample.c delete mode 100644 libavresample/resample.h delete mode 100644 libavresample/resample_template.c delete mode 100644 libavresample/tests/.gitignore delete mode 100644 libavresample/tests/avresample.c delete mode 100644 libavresample/utils.c delete mode 100644 libavresample/version.h delete mode 100644 libavresample/x86/Makefile delete mode 100644 libavresample/x86/audio_convert.asm delete mode 100644 libavresample/x86/audio_convert_init.c delete mode 100644 libavresample/x86/audio_mix.asm delete mode 100644 libavresample/x86/audio_mix_init.c delete mode 100644 libavresample/x86/dither.asm delete mode 100644 libavresample/x86/dither_init.c delete mode 100644 libavresample/x86/util.asm delete mode 100644 libavresample/x86/w64xmmtest.c delete mode 100644 tests/fate/libavresample.mak diff --git a/Makefile b/Makefile index 7e9d8b08c3..1e3da6271b 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,6 @@ FFLIBS-$(CONFIG_AVDEVICE) += avdevice FFLIBS-$(CONFIG_AVFILTER) += avfilter FFLIBS-$(CONFIG_AVFORMAT) += avformat FFLIBS-$(CONFIG_AVCODEC) += avcodec -FFLIBS-$(CONFIG_AVRESAMPLE) += avresample FFLIBS-$(CONFIG_POSTPROC) += postproc FFLIBS-$(CONFIG_SWRESAMPLE) += swresample FFLIBS-$(CONFIG_SWSCALE) += swscale diff --git a/configure b/configure index 30b598dcc6..d14eb552ea 100755 --- a/configure +++ b/configure @@ -132,7 +132,6 @@ Component options: --disable-swscale disable libswscale build --disable-postproc disable libpostproc build --disable-avfilter disable libavfilter build - --enable-avresample enable libavresample build (deprecated) [no] --disable-pthreads disable pthreads [autodetect] --disable-w32threads disable Win32 threads [autodetect] --disable-os2threads disable OS/2 threads [autodetect] @@ -1901,7 +1900,6 @@ LIBRARY_LIST=" avformat avcodec swresample - avresample avutil " @@ -3612,7 +3610,6 @@ program_opencl_filter_deps="opencl" pullup_filter_deps="gpl" removelogo_filter_deps="avcodec avformat swscale" repeatfields_filter_deps="gpl" -resample_filter_deps="avresample" roberts_opencl_filter_deps="opencl" rubberband_filter_deps="librubberband" sab_filter_deps="gpl swscale" @@ -3714,8 +3711,6 @@ avfilter_deps="avutil" avfilter_suggest="libm" avformat_deps="avcodec avutil" avformat_suggest="libm network zlib" -avresample_deps="avutil" -avresample_suggest="libm" avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt" postproc_deps="avutil gpl" postproc_suggest="libm" @@ -3798,7 +3793,7 @@ intrinsics="none" enable $PROGRAM_LIST enable $DOCUMENT_LIST enable $EXAMPLE_LIST -enable $(filter_out avresample $LIBRARY_LIST) +enable $LIBRARY_LIST enable stripping enable asm @@ -6848,7 +6843,7 @@ EOF # add some linker flags check_ldflags -Wl,--warn-common -check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample +check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic @@ -6863,8 +6858,7 @@ enabled neon_clobber_test && -Wl,--wrap,avcodec_receive_packet \ -Wl,--wrap,avcodec_send_frame \ -Wl,--wrap,avcodec_receive_frame \ - -Wl,--wrap,swr_convert \ - -Wl,--wrap,avresample_convert || + -Wl,--wrap,swr_convert || disable neon_clobber_test enabled xmm_clobber_test && @@ -6876,7 +6870,6 @@ enabled xmm_clobber_test && -Wl,--wrap,avcodec_send_frame \ -Wl,--wrap,avcodec_receive_frame \ -Wl,--wrap,swr_convert \ - -Wl,--wrap,avresample_convert \ -Wl,--wrap,sws_scale || disable xmm_clobber_test @@ -7101,7 +7094,6 @@ check_deps $CONFIG_LIST \ $ALL_COMPONENTS \ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" -enabled avresample && warn "Building with deprecated library libavresample" case $target_os in haiku) @@ -7217,7 +7209,6 @@ enabled movie_filter && prepend avfilter_deps "avformat avcodec" enabled pan_filter && prepend avfilter_deps "swresample" enabled pp_filter && prepend avfilter_deps "postproc" enabled removelogo_filter && prepend avfilter_deps "avformat avcodec swscale" -enabled resample_filter && prepend avfilter_deps "avresample" enabled sab_filter && prepend avfilter_deps "swscale" enabled scale_filter && prepend avfilter_deps "swscale" enabled scale2ref_filter && prepend avfilter_deps "swscale" @@ -7710,7 +7701,6 @@ extralibs_avcodec="$avcodec_extralibs" extralibs_avformat="$avformat_extralibs" extralibs_avdevice="$avdevice_extralibs" extralibs_avfilter="$avfilter_extralibs" -extralibs_avresample="$avresample_extralibs" extralibs_postproc="$postproc_extralibs" extralibs_swscale="$swscale_extralibs" extralibs_swresample="$swresample_extralibs" diff --git a/ffbuild/common.mak b/ffbuild/common.mak index e070b6b5e2..32f5b997b5 100644 --- a/ffbuild/common.mak +++ b/ffbuild/common.mak @@ -26,7 +26,7 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) endif -ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample +ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample # NASM requires -I path terminated with / IFLAGS := -I. -I$(SRC_LINK)/ diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index fe424b6a4c..1db5e8cdd9 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -34,7 +34,6 @@ #include "libavformat/avformat.h" #include "libavfilter/avfilter.h" #include "libavdevice/avdevice.h" -#include "libavresample/avresample.h" #include "libswscale/swscale.h" #include "libswresample/swresample.h" #include "libpostproc/postprocess.h" @@ -545,9 +544,6 @@ int opt_default(void *optctx, const char *opt, const char *arg) char opt_stripped[128]; const char *p; const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); -#if CONFIG_AVRESAMPLE - const AVClass *rc = avresample_get_class(); -#endif #if CONFIG_SWSCALE const AVClass *sc = sws_get_class(); #endif @@ -617,13 +613,6 @@ int opt_default(void *optctx, const char *opt, const char *arg) consumed = 1; } #endif -#if CONFIG_AVRESAMPLE - if ((o=opt_find(&rc, opt, NULL, 0, - AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { - av_dict_set(&resample_opts, opt, arg, FLAGS); - consumed = 1; - } -#endif if (consumed) return 0; @@ -1134,7 +1123,6 @@ static void print_all_libs_info(int flags, int level) PRINT_LIB_INFO(avformat, AVFORMAT, flags, level); PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level); PRINT_LIB_INFO(avfilter, AVFILTER, flags, level); - PRINT_LIB_INFO(avresample, AVRESAMPLE, flags, level); PRINT_LIB_INFO(swscale, SWSCALE, flags, level); PRINT_LIB_INFO(swresample, SWRESAMPLE, flags, level); PRINT_LIB_INFO(postproc, POSTPROC, flags, level); diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index e7c05eb3f9..958d74f008 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -26,8 +26,6 @@ #include "libavfilter/buffersink.h" #include "libavfilter/buffersrc.h" -#include "libavresample/avresample.h" - #include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/bprint.h" diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 42efa14a67..5a287364b0 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -135,7 +135,6 @@ OBJS-$(CONFIG_LV2_FILTER) += af_lv2.o OBJS-$(CONFIG_MCOMPAND_FILTER) += af_mcompand.o OBJS-$(CONFIG_PAN_FILTER) += af_pan.o OBJS-$(CONFIG_REPLAYGAIN_FILTER) += af_replaygain.o -OBJS-$(CONFIG_RESAMPLE_FILTER) += af_resample.o OBJS-$(CONFIG_RUBBERBAND_FILTER) += af_rubberband.o OBJS-$(CONFIG_SIDECHAINCOMPRESS_FILTER) += af_sidechaincompress.o OBJS-$(CONFIG_SIDECHAINGATE_FILTER) += af_agate.o diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c deleted file mode 100644 index caa97d8ab0..0000000000 --- a/libavfilter/af_resample.c +++ /dev/null @@ -1,369 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * sample format and channel layout conversion audio filter - */ - -#include "libavutil/avassert.h" -#include "libavutil/avstring.h" -#include "libavutil/common.h" -#include "libavutil/dict.h" -#include "libavutil/mathematics.h" -#include "libavutil/opt.h" - -#include "libavresample/avresample.h" - -#include "audio.h" -#include "avfilter.h" -#include "formats.h" -#include "internal.h" - -typedef struct ResampleContext { - const AVClass *class; - AVAudioResampleContext *avr; - AVDictionary *options; - - int resampling; - int64_t next_pts; - int64_t next_in_pts; - - /* set by filter_frame() to signal an output frame to request_frame() */ - int got_output; -} ResampleContext; - -static av_cold int init(AVFilterContext *ctx, AVDictionary **opts) -{ - ResampleContext *s = ctx->priv; - const AVClass *avr_class = avresample_get_class(); - AVDictionaryEntry *e = NULL; - - while ((e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX))) { - if (av_opt_find(&avr_class, e->key, NULL, 0, - AV_OPT_SEARCH_FAKE_OBJ | AV_OPT_SEARCH_CHILDREN)) - av_dict_set(&s->options, e->key, e->value, 0); - } - - e = NULL; - while ((e = av_dict_get(s->options, "", e, AV_DICT_IGNORE_SUFFIX))) - av_dict_set(opts, e->key, NULL, 0); - - /* do not allow the user to override basic format options */ - av_dict_set(&s->options, "in_channel_layout", NULL, 0); - av_dict_set(&s->options, "out_channel_layout", NULL, 0); - av_dict_set(&s->options, "in_sample_fmt", NULL, 0); - av_dict_set(&s->options, "out_sample_fmt", NULL, 0); - av_dict_set(&s->options, "in_sample_rate", NULL, 0); - av_dict_set(&s->options, "out_sample_rate", NULL, 0); - - return 0; -} - -static av_cold void uninit(AVFilterContext *ctx) -{ - ResampleContext *s = ctx->priv; - - if (s->avr) { - avresample_close(s->avr); - avresample_free(&s->avr); - } - av_dict_free(&s->options); -} - -static int query_formats(AVFilterContext *ctx) -{ - AVFilterLink *inlink = ctx->inputs[0]; - AVFilterLink *outlink = ctx->outputs[0]; - AVFilterFormats *in_formats, *out_formats, *in_samplerates, *out_samplerates; - AVFilterChannelLayouts *in_layouts, *out_layouts; - int ret; - - if (!(in_formats = ff_all_formats (AVMEDIA_TYPE_AUDIO)) || - !(out_formats = ff_all_formats (AVMEDIA_TYPE_AUDIO)) || - !(in_samplerates = ff_all_samplerates ( )) || - !(out_samplerates = ff_all_samplerates ( )) || - !(in_layouts = ff_all_channel_layouts ( )) || - !(out_layouts = ff_all_channel_layouts ( ))) - return AVERROR(ENOMEM); - - if ((ret = ff_formats_ref (in_formats, &inlink->outcfg.formats )) < 0 || - (ret = ff_formats_ref (out_formats, &outlink->incfg.formats )) < 0 || - (ret = ff_formats_ref (in_samplerates, &inlink->outcfg.samplerates )) < 0 || - (ret = ff_formats_ref (out_samplerates, &outlink->incfg.samplerates )) < 0 || - (ret = ff_channel_layouts_ref (in_layouts, &inlink->outcfg.channel_layouts)) < 0 || - (ret = ff_channel_layouts_ref (out_layouts, &outlink->incfg.channel_layouts)) < 0) - return ret; - - return 0; -} - -static int config_output(AVFilterLink *outlink) -{ - AVFilterContext *ctx = outlink->src; - AVFilterLink *inlink = ctx->inputs[0]; - ResampleContext *s = ctx->priv; - char buf1[64], buf2[64]; - int ret; - - int64_t resampling_forced; - - if (s->avr) { - avresample_close(s->avr); - avresample_free(&s->avr); - } - - if (inlink->channel_layout == outlink->channel_layout && - inlink->sample_rate == outlink->sample_rate && - (inlink->format == outlink->format || - (av_get_channel_layout_nb_channels(inlink->channel_layout) == 1 && - av_get_channel_layout_nb_channels(outlink->channel_layout) == 1 && - av_get_planar_sample_fmt(inlink->format) == - av_get_planar_sample_fmt(outlink->format)))) - return 0; - - if (!(s->avr = avresample_alloc_context())) - return AVERROR(ENOMEM); - - if (s->options) { - int ret; - AVDictionaryEntry *e = NULL; - while ((e = av_dict_get(s->options, "", e, AV_DICT_IGNORE_SUFFIX))) - av_log(ctx, AV_LOG_VERBOSE, "lavr option: %s=%s\n", e->key, e->value); - - ret = av_opt_set_dict(s->avr, &s->options); - if (ret < 0) - return ret; - } - - av_opt_set_int(s->avr, "in_channel_layout", inlink ->channel_layout, 0); - av_opt_set_int(s->avr, "out_channel_layout", outlink->channel_layout, 0); - av_opt_set_int(s->avr, "in_sample_fmt", inlink ->format, 0); - av_opt_set_int(s->avr, "out_sample_fmt", outlink->format, 0); - av_opt_set_int(s->avr, "in_sample_rate", inlink ->sample_rate, 0); - av_opt_set_int(s->avr, "out_sample_rate", outlink->sample_rate, 0); - - if ((ret = avresample_open(s->avr)) < 0) - return ret; - - av_opt_get_int(s->avr, "force_resampling", 0, &resampling_forced); - s->resampling = resampling_forced || (inlink->sample_rate != outlink->sample_rate); - - if (s->resampling) { - outlink->time_base = (AVRational){ 1, outlink->sample_rate }; - s->next_pts = AV_NOPTS_VALUE; - s->next_in_pts = AV_NOPTS_VALUE; - } else - outlink->time_base = inlink->time_base; - - av_get_channel_layout_string(buf1, sizeof(buf1), - -1, inlink ->channel_layout); - av_get_channel_layout_string(buf2, sizeof(buf2), - -1, outlink->channel_layout); - av_log(ctx, AV_LOG_VERBOSE, - "fmt:%s srate:%d cl:%s -> fmt:%s srate:%d cl:%s\n", - av_get_sample_fmt_name(inlink ->format), inlink ->sample_rate, buf1, - av_get_sample_fmt_name(outlink->format), outlink->sample_rate, buf2); - - return 0; -} - -static int request_frame(AVFilterLink *outlink) -{ - AVFilterContext *ctx = outlink->src; - ResampleContext *s = ctx->priv; - int ret = 0; - - s->got_output = 0; - while (ret >= 0 && !s->got_output) - ret = ff_request_frame(ctx->inputs[0]); - - /* flush the lavr delay buffer */ - if (ret == AVERROR_EOF && s->avr) { - AVFrame *frame; - int nb_samples = avresample_get_out_samples(s->avr, 0); - - if (!nb_samples) - return ret; - - frame = ff_get_audio_buffer(outlink, nb_samples); - if (!frame) - return AVERROR(ENOMEM); - - ret = avresample_convert(s->avr, frame->extended_data, - frame->linesize[0], nb_samples, - NULL, 0, 0); - if (ret <= 0) { - av_frame_free(&frame); - return (ret == 0) ? AVERROR_EOF : ret; - } - - frame->nb_samples = ret; - frame->pts = s->next_pts; - return ff_filter_frame(outlink, frame); - } - return ret; -} - -static int filter_frame(AVFilterLink *inlink, AVFrame *in) -{ - AVFilterContext *ctx = inlink->dst; - ResampleContext *s = ctx->priv; - AVFilterLink *outlink = ctx->outputs[0]; - int ret; - - if (s->avr) { - AVFrame *out; - int delay, nb_samples; - - /* maximum possible samples lavr can output */ - delay = avresample_get_delay(s->avr); - nb_samples = avresample_get_out_samples(s->avr, in->nb_samples); - - out = ff_get_audio_buffer(outlink, nb_samples); - if (!out) { - ret = AVERROR(ENOMEM); - goto fail; - } - - ret = avresample_convert(s->avr, out->extended_data, out->linesize[0], - nb_samples, in->extended_data, in->linesize[0], - in->nb_samples); - if (ret <= 0) { - av_frame_free(&out); - if (ret < 0) - goto fail; - } - - av_assert0(!avresample_available(s->avr)); - - if (s->resampling && s->next_pts == AV_NOPTS_VALUE) { - if (in->pts == AV_NOPTS_VALUE) { - av_log(ctx, AV_LOG_WARNING, "First timestamp is missing, " - "assuming 0.\n"); - s->next_pts = 0; - } else - s->next_pts = av_rescale_q(in->pts, inlink->time_base, - outlink->time_base); - } - - if (ret > 0) { - out->nb_samples = ret; - - ret = av_frame_copy_props(out, in); - if (ret < 0) { - av_frame_free(&out); - goto fail; - } - - if (s->resampling) { - out->sample_rate = outlink->sample_rate; - /* Only convert in->pts if there is a discontinuous jump. - This ensures that out->pts tracks the number of samples actually - output by the resampler in the absence of such a jump. - Otherwise, the rounding in av_rescale_q() and av_rescale() - causes off-by-1 errors. */ - if (in->pts != AV_NOPTS_VALUE && in->pts != s->next_in_pts) { - out->pts = av_rescale_q(in->pts, inlink->time_base, - outlink->time_base) - - av_rescale(delay, outlink->sample_rate, - inlink->sample_rate); - } else - out->pts = s->next_pts; - - s->next_pts = out->pts + out->nb_samples; - s->next_in_pts = in->pts + in->nb_samples; - } else - out->pts = in->pts; - - ret = ff_filter_frame(outlink, out); - s->got_output = 1; - } - -fail: - av_frame_free(&in); - } else { - in->format = outlink->format; - ret = ff_filter_frame(outlink, in); - s->got_output = 1; - } - - return ret; -} - -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *resample_child_class_next(const AVClass *prev) -{ - return prev ? NULL : avresample_get_class(); -} -#endif - -static const AVClass *resample_child_class_iterate(void **iter) -{ - const AVClass *c = *iter ? NULL : avresample_get_class(); - *iter = (void*)(uintptr_t)c; - return c; -} - -static void *resample_child_next(void *obj, void *prev) -{ - ResampleContext *s = obj; - return prev ? NULL : s->avr; -} - -static const AVClass resample_class = { - .class_name = "resample", - .item_name = av_default_item_name, - .version = LIBAVUTIL_VERSION_INT, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = resample_child_class_next, -#endif - .child_class_iterate = resample_child_class_iterate, - .child_next = resample_child_next, -}; - -static const AVFilterPad avfilter_af_resample_inputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_AUDIO, - .filter_frame = filter_frame, - }, - { NULL } -}; - -static const AVFilterPad avfilter_af_resample_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_AUDIO, - .config_props = config_output, - .request_frame = request_frame - }, - { NULL } -}; - -AVFilter ff_af_resample = { - .name = "resample", - .description = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."), - .priv_size = sizeof(ResampleContext), - .priv_class = &resample_class, - .init_dict = init, - .uninit = uninit, - .query_formats = query_formats, - .inputs = avfilter_af_resample_inputs, - .outputs = avfilter_af_resample_outputs, -}; diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 7dbd1fb1dd..19c2acb63c 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -129,7 +129,6 @@ extern AVFilter ff_af_lv2; extern AVFilter ff_af_mcompand; extern AVFilter ff_af_pan; extern AVFilter ff_af_replaygain; -extern AVFilter ff_af_resample; extern AVFilter ff_af_rubberband; extern AVFilter ff_af_sidechaincompress; extern AVFilter ff_af_sidechaingate; diff --git a/libavresample/Makefile b/libavresample/Makefile deleted file mode 100644 index 90f025a9f9..0000000000 --- a/libavresample/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -NAME = avresample -DESC = Libav audio resampling library - -HEADERS = avresample.h \ - version.h \ - -OBJS = audio_convert.o \ - audio_data.o \ - audio_mix.o \ - audio_mix_matrix.o \ - dither.o \ - options.o \ - resample.o \ - utils.o \ - -# Windows resource file -SLIBOBJS-$(HAVE_GNU_WINDRES) += avresampleres.o - -TESTPROGS = avresample diff --git a/libavresample/aarch64/Makefile b/libavresample/aarch64/Makefile deleted file mode 100644 index f92699ef1a..0000000000 --- a/libavresample/aarch64/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OBJS += aarch64/audio_convert_init.o \ - aarch64/resample_init.o \ - -OBJS-$(CONFIG_NEON_CLOBBER_TEST) += aarch64/neontest.o - -NEON-OBJS += aarch64/audio_convert_neon.o \ - aarch64/resample_neon.o \ diff --git a/libavresample/aarch64/asm-offsets.h b/libavresample/aarch64/asm-offsets.h deleted file mode 100644 index 0b582446f6..0000000000 --- a/libavresample/aarch64/asm-offsets.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_AARCH64_ASM_OFFSETS_H -#define AVRESAMPLE_AARCH64_ASM_OFFSETS_H - -/* struct ResampleContext */ -#define FILTER_BANK 0x10 -#define FILTER_LENGTH 0x18 -#define PHASE_SHIFT 0x34 -#define PHASE_MASK (PHASE_SHIFT + 0x04) // loaded as pair - -#endif /* AVRESAMPLE_AARCH64_ASM_OFFSETS_H */ diff --git a/libavresample/aarch64/audio_convert_init.c b/libavresample/aarch64/audio_convert_init.c deleted file mode 100644 index b5b0d1eee0..0000000000 --- a/libavresample/aarch64/audio_convert_init.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "config.h" -#include "libavutil/attributes.h" -#include "libavutil/cpu.h" -#include "libavutil/aarch64/cpu.h" -#include "libavutil/samplefmt.h" -#include "libavresample/audio_convert.h" - -void ff_conv_flt_to_s16_neon(int16_t *dst, const float *src, int len); -void ff_conv_fltp_to_s16_neon(int16_t *dst, float *const *src, - int len, int channels); -void ff_conv_fltp_to_s16_2ch_neon(int16_t *dst, float *const *src, - int len, int channels); - -av_cold void ff_audio_convert_init_aarch64(AudioConvert *ac) -{ - int cpu_flags = av_get_cpu_flags(); - - if (have_neon(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT, - 0, 16, 8, "NEON", - ff_conv_flt_to_s16_neon); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 2, 16, 8, "NEON", - ff_conv_fltp_to_s16_2ch_neon); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 0, 16, 8, "NEON", - ff_conv_fltp_to_s16_neon); - } -} diff --git a/libavresample/aarch64/audio_convert_neon.S b/libavresample/aarch64/audio_convert_neon.S deleted file mode 100644 index e13e277e61..0000000000 --- a/libavresample/aarch64/audio_convert_neon.S +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright (c) 2008 Mans Rullgard - * Copyright (c) 2014 Janne Grunau - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "libavutil/aarch64/asm.S" - -function ff_conv_flt_to_s16_neon, export=1 - subs x2, x2, #8 - ld1 {v0.4s}, [x1], #16 - fcvtzs v4.4s, v0.4s, #31 - ld1 {v1.4s}, [x1], #16 - fcvtzs v5.4s, v1.4s, #31 - b.eq 3f - ands x12, x2, #~15 - b.eq 2f -1: subs x12, x12, #16 - sqrshrn v4.4h, v4.4s, #16 - ld1 {v2.4s}, [x1], #16 - fcvtzs v6.4s, v2.4s, #31 - sqrshrn2 v4.8h, v5.4s, #16 - ld1 {v3.4s}, [x1], #16 - fcvtzs v7.4s, v3.4s, #31 - sqrshrn v6.4h, v6.4s, #16 - st1 {v4.8h}, [x0], #16 - sqrshrn2 v6.8h, v7.4s, #16 - ld1 {v0.4s}, [x1], #16 - fcvtzs v4.4s, v0.4s, #31 - ld1 {v1.4s}, [x1], #16 - fcvtzs v5.4s, v1.4s, #31 - st1 {v6.8h}, [x0], #16 - b.ne 1b - ands x2, x2, #15 - b.eq 3f -2: ld1 {v2.4s}, [x1], #16 - sqrshrn v4.4h, v4.4s, #16 - fcvtzs v6.4s, v2.4s, #31 - ld1 {v3.4s}, [x1], #16 - sqrshrn2 v4.8h, v5.4s, #16 - fcvtzs v7.4s, v3.4s, #31 - sqrshrn v6.4h, v6.4s, #16 - st1 {v4.8h}, [x0], #16 - sqrshrn2 v6.8h, v7.4s, #16 - st1 {v6.8h}, [x0] - ret -3: sqrshrn v4.4h, v4.4s, #16 - sqrshrn2 v4.8h, v5.4s, #16 - st1 {v4.8h}, [x0] - ret -endfunc - -function ff_conv_fltp_to_s16_2ch_neon, export=1 - ldp x4, x5, [x1] - subs x2, x2, #8 - ld1 {v0.4s}, [x4], #16 - fcvtzs v4.4s, v0.4s, #31 - ld1 {v1.4s}, [x4], #16 - fcvtzs v5.4s, v1.4s, #31 - ld1 {v2.4s}, [x5], #16 - fcvtzs v6.4s, v2.4s, #31 - ld1 {v3.4s}, [x5], #16 - fcvtzs v7.4s, v3.4s, #31 - b.eq 3f - ands x12, x2, #~15 - b.eq 2f -1: subs x12, x12, #16 - ld1 {v16.4s}, [x4], #16 - fcvtzs v20.4s, v16.4s, #31 - sri v6.4s, v4.4s, #16 - ld1 {v17.4s}, [x4], #16 - fcvtzs v21.4s, v17.4s, #31 - ld1 {v18.4s}, [x5], #16 - fcvtzs v22.4s, v18.4s, #31 - ld1 {v19.4s}, [x5], #16 - sri v7.4s, v5.4s, #16 - st1 {v6.4s}, [x0], #16 - fcvtzs v23.4s, v19.4s, #31 - st1 {v7.4s}, [x0], #16 - sri v22.4s, v20.4s, #16 - ld1 {v0.4s}, [x4], #16 - sri v23.4s, v21.4s, #16 - st1 {v22.4s}, [x0], #16 - fcvtzs v4.4s, v0.4s, #31 - ld1 {v1.4s}, [x4], #16 - fcvtzs v5.4s, v1.4s, #31 - ld1 {v2.4s}, [x5], #16 - fcvtzs v6.4s, v2.4s, #31 - ld1 {v3.4s}, [x5], #16 - fcvtzs v7.4s, v3.4s, #31 - st1 {v23.4s}, [x0], #16 - b.ne 1b - ands x2, x2, #15 - b.eq 3f -2: sri v6.4s, v4.4s, #16 - ld1 {v0.4s}, [x4], #16 - fcvtzs v0.4s, v0.4s, #31 - ld1 {v1.4s}, [x4], #16 - fcvtzs v1.4s, v1.4s, #31 - ld1 {v2.4s}, [x5], #16 - fcvtzs v2.4s, v2.4s, #31 - sri v7.4s, v5.4s, #16 - ld1 {v3.4s}, [x5], #16 - fcvtzs v3.4s, v3.4s, #31 - sri v2.4s, v0.4s, #16 - st1 {v6.4s,v7.4s}, [x0], #32 - sri v3.4s, v1.4s, #16 - st1 {v2.4s,v3.4s}, [x0], #32 - ret -3: sri v6.4s, v4.4s, #16 - sri v7.4s, v5.4s, #16 - st1 {v6.4s,v7.4s}, [x0] - ret -endfunc - -function ff_conv_fltp_to_s16_neon, export=1 - cmp w3, #2 - b.eq X(ff_conv_fltp_to_s16_2ch_neon) - b.gt 1f - ldr x1, [x1] - b X(ff_conv_flt_to_s16_neon) -1: - cmp w3, #4 - lsl x12, x3, #1 - b.lt 4f - -5: // 4 channels - ldp x4, x5, [x1], #16 - ldp x6, x7, [x1], #16 - mov w9, w2 - mov x8, x0 - ld1 {v4.4s}, [x4], #16 - fcvtzs v4.4s, v4.4s, #31 - ld1 {v5.4s}, [x5], #16 - fcvtzs v5.4s, v5.4s, #31 - ld1 {v6.4s}, [x6], #16 - fcvtzs v6.4s, v6.4s, #31 - ld1 {v7.4s}, [x7], #16 - fcvtzs v7.4s, v7.4s, #31 -6: - subs w9, w9, #8 - ld1 {v0.4s}, [x4], #16 - fcvtzs v0.4s, v0.4s, #31 - sri v5.4s, v4.4s, #16 - ld1 {v1.4s}, [x5], #16 - fcvtzs v1.4s, v1.4s, #31 - sri v7.4s, v6.4s, #16 - ld1 {v2.4s}, [x6], #16 - fcvtzs v2.4s, v2.4s, #31 - zip1 v16.4s, v5.4s, v7.4s - ld1 {v3.4s}, [x7], #16 - fcvtzs v3.4s, v3.4s, #31 - zip2 v17.4s, v5.4s, v7.4s - st1 {v16.d}[0], [x8], x12 - sri v1.4s, v0.4s, #16 - st1 {v16.d}[1], [x8], x12 - sri v3.4s, v2.4s, #16 - st1 {v17.d}[0], [x8], x12 - zip1 v18.4s, v1.4s, v3.4s - st1 {v17.d}[1], [x8], x12 - zip2 v19.4s, v1.4s, v3.4s - b.eq 7f - ld1 {v4.4s}, [x4], #16 - fcvtzs v4.4s, v4.4s, #31 - st1 {v18.d}[0], [x8], x12 - ld1 {v5.4s}, [x5], #16 - fcvtzs v5.4s, v5.4s, #31 - st1 {v18.d}[1], [x8], x12 - ld1 {v6.4s}, [x6], #16 - fcvtzs v6.4s, v6.4s, #31 - st1 {v19.d}[0], [x8], x12 - ld1 {v7.4s}, [x7], #16 - fcvtzs v7.4s, v7.4s, #31 - st1 {v19.d}[1], [x8], x12 - b 6b -7: - st1 {v18.d}[0], [x8], x12 - st1 {v18.d}[1], [x8], x12 - st1 {v19.d}[0], [x8], x12 - st1 {v19.d}[1], [x8], x12 - subs w3, w3, #4 - b.eq end - cmp w3, #4 - add x0, x0, #8 - b.ge 5b - -4: // 2 channels - cmp w3, #2 - b.lt 4f - ldp x4, x5, [x1], #16 - mov w9, w2 - mov x8, x0 - tst w9, #8 - ld1 {v4.4s}, [x4], #16 - fcvtzs v4.4s, v4.4s, #31 - ld1 {v5.4s}, [x5], #16 - fcvtzs v5.4s, v5.4s, #31 - ld1 {v6.4s}, [x4], #16 - fcvtzs v6.4s, v6.4s, #31 - ld1 {v7.4s}, [x5], #16 - fcvtzs v7.4s, v7.4s, #31 - b.eq 6f - subs w9, w9, #8 - b.eq 7f - sri v5.4s, v4.4s, #16 - ld1 {v4.4s}, [x4], #16 - fcvtzs v4.4s, v4.4s, #31 - st1 {v5.s}[0], [x8], x12 - sri v7.4s, v6.4s, #16 - st1 {v5.s}[1], [x8], x12 - ld1 {v6.4s}, [x4], #16 - fcvtzs v6.4s, v6.4s, #31 - st1 {v5.s}[2], [x8], x12 - st1 {v5.s}[3], [x8], x12 - st1 {v7.s}[0], [x8], x12 - st1 {v7.s}[1], [x8], x12 - ld1 {v5.4s}, [x5], #16 - fcvtzs v5.4s, v5.4s, #31 - st1 {v7.s}[2], [x8], x12 - st1 {v7.s}[3], [x8], x12 - ld1 {v7.4s}, [x5], #16 - fcvtzs v7.4s, v7.4s, #31 -6: - subs w9, w9, #16 - ld1 {v0.4s}, [x4], #16 - sri v5.4s, v4.4s, #16 - fcvtzs v0.4s, v0.4s, #31 - ld1 {v1.4s}, [x5], #16 - sri v7.4s, v6.4s, #16 - st1 {v5.s}[0], [x8], x12 - st1 {v5.s}[1], [x8], x12 - fcvtzs v1.4s, v1.4s, #31 - st1 {v5.s}[2], [x8], x12 - st1 {v5.s}[3], [x8], x12 - ld1 {v2.4s}, [x4], #16 - st1 {v7.s}[0], [x8], x12 - fcvtzs v2.4s, v2.4s, #31 - st1 {v7.s}[1], [x8], x12 - ld1 {v3.4s}, [x5], #16 - st1 {v7.s}[2], [x8], x12 - fcvtzs v3.4s, v3.4s, #31 - st1 {v7.s}[3], [x8], x12 - sri v1.4s, v0.4s, #16 - sri v3.4s, v2.4s, #16 - b.eq 6f - ld1 {v4.4s}, [x4], #16 - st1 {v1.s}[0], [x8], x12 - fcvtzs v4.4s, v4.4s, #31 - st1 {v1.s}[1], [x8], x12 - ld1 {v5.4s}, [x5], #16 - st1 {v1.s}[2], [x8], x12 - fcvtzs v5.4s, v5.4s, #31 - st1 {v1.s}[3], [x8], x12 - ld1 {v6.4s}, [x4], #16 - st1 {v3.s}[0], [x8], x12 - fcvtzs v6.4s, v6.4s, #31 - st1 {v3.s}[1], [x8], x12 - ld1 {v7.4s}, [x5], #16 - st1 {v3.s}[2], [x8], x12 - fcvtzs v7.4s, v7.4s, #31 - st1 {v3.s}[3], [x8], x12 - b.gt 6b -6: - st1 {v1.s}[0], [x8], x12 - st1 {v1.s}[1], [x8], x12 - st1 {v1.s}[2], [x8], x12 - st1 {v1.s}[3], [x8], x12 - st1 {v3.s}[0], [x8], x12 - st1 {v3.s}[1], [x8], x12 - st1 {v3.s}[2], [x8], x12 - st1 {v3.s}[3], [x8], x12 - b 8f -7: - sri v5.4s, v4.4s, #16 - sri v7.4s, v6.4s, #16 - st1 {v5.s}[0], [x8], x12 - st1 {v5.s}[1], [x8], x12 - st1 {v5.s}[2], [x8], x12 - st1 {v5.s}[3], [x8], x12 - st1 {v7.s}[0], [x8], x12 - st1 {v7.s}[1], [x8], x12 - st1 {v7.s}[2], [x8], x12 - st1 {v7.s}[3], [x8], x12 -8: - subs w3, w3, #2 - add x0, x0, #4 - b.eq end - -4: // 1 channel - ldr x4, [x1] - tst w2, #8 - mov w9, w2 - mov x5, x0 - ld1 {v0.4s}, [x4], #16 - fcvtzs v0.4s, v0.4s, #31 - ld1 {v1.4s}, [x4], #16 - fcvtzs v1.4s, v1.4s, #31 - b.ne 8f -6: - subs w9, w9, #16 - ld1 {v2.4s}, [x4], #16 - fcvtzs v2.4s, v2.4s, #31 - ld1 {v3.4s}, [x4], #16 - fcvtzs v3.4s, v3.4s, #31 - st1 {v0.h}[1], [x5], x12 - st1 {v0.h}[3], [x5], x12 - st1 {v0.h}[5], [x5], x12 - st1 {v0.h}[7], [x5], x12 - st1 {v1.h}[1], [x5], x12 - st1 {v1.h}[3], [x5], x12 - st1 {v1.h}[5], [x5], x12 - st1 {v1.h}[7], [x5], x12 - b.eq 7f - ld1 {v0.4s}, [x4], #16 - fcvtzs v0.4s, v0.4s, #31 - ld1 {v1.4s}, [x4], #16 - fcvtzs v1.4s, v1.4s, #31 -7: - st1 {v2.h}[1], [x5], x12 - st1 {v2.h}[3], [x5], x12 - st1 {v2.h}[5], [x5], x12 - st1 {v2.h}[7], [x5], x12 - st1 {v3.h}[1], [x5], x12 - st1 {v3.h}[3], [x5], x12 - st1 {v3.h}[5], [x5], x12 - st1 {v3.h}[7], [x5], x12 - b.gt 6b - ret -8: - subs w9, w9, #8 - st1 {v0.h}[1], [x5], x12 - st1 {v0.h}[3], [x5], x12 - st1 {v0.h}[5], [x5], x12 - st1 {v0.h}[7], [x5], x12 - st1 {v1.h}[1], [x5], x12 - st1 {v1.h}[3], [x5], x12 - st1 {v1.h}[5], [x5], x12 - st1 {v1.h}[7], [x5], x12 - b.eq end - ld1 {v0.4s}, [x4], #16 - fcvtzs v0.4s, v0.4s, #31 - ld1 {v1.4s}, [x4], #16 - fcvtzs v1.4s, v1.4s, #31 - b 6b -end: - ret -endfunc diff --git a/libavresample/aarch64/neontest.c b/libavresample/aarch64/neontest.c deleted file mode 100644 index e956ee6b0d..0000000000 --- a/libavresample/aarch64/neontest.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * check NEON registers for clobbers - * Copyright (c) 2013 Martin Storsjo - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavresample/avresample.h" -#include "libavutil/aarch64/neontest.h" - -wrap(avresample_convert(AVAudioResampleContext *avr, uint8_t **output, - int out_plane_size, int out_samples, uint8_t **input, - int in_plane_size, int in_samples)) -{ - testneonclobbers(avresample_convert, avr, output, out_plane_size, - out_samples, input, in_plane_size, in_samples); -} diff --git a/libavresample/aarch64/resample_init.c b/libavresample/aarch64/resample_init.c deleted file mode 100644 index e21c600286..0000000000 --- a/libavresample/aarch64/resample_init.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "config.h" -#include "libavutil/cpu.h" -#include "libavutil/aarch64/cpu.h" -#include "libavutil/internal.h" -#include "libavutil/samplefmt.h" -#include "libavresample/resample.h" - -#include "asm-offsets.h" - -AV_CHECK_OFFSET(struct ResampleContext, filter_bank, FILTER_BANK); -AV_CHECK_OFFSET(struct ResampleContext, filter_length, FILTER_LENGTH); -AV_CHECK_OFFSET(struct ResampleContext, phase_shift, PHASE_SHIFT); -AV_CHECK_OFFSET(struct ResampleContext, phase_mask, PHASE_MASK); - -void ff_resample_one_dbl_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); -void ff_resample_one_flt_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); -void ff_resample_one_s16_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); -void ff_resample_one_s32_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); - -av_cold void ff_audio_resample_init_aarch64(ResampleContext *c, - enum AVSampleFormat sample_fmt) -{ - int cpu_flags = av_get_cpu_flags(); - - if (have_neon(cpu_flags)) { - if (!c->linear) { - switch (sample_fmt) { - case AV_SAMPLE_FMT_DBLP: - c->resample_one = ff_resample_one_dbl_neon; - break; - case AV_SAMPLE_FMT_FLTP: - c->resample_one = ff_resample_one_flt_neon; - break; - case AV_SAMPLE_FMT_S16P: - c->resample_one = ff_resample_one_s16_neon; - break; - case AV_SAMPLE_FMT_S32P: - c->resample_one = ff_resample_one_s32_neon; - break; - } - } - } -} diff --git a/libavresample/aarch64/resample_neon.S b/libavresample/aarch64/resample_neon.S deleted file mode 100644 index d3c2cbf561..0000000000 --- a/libavresample/aarch64/resample_neon.S +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 2014 Janne Grunau - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavutil/aarch64/asm.S" -#include "asm-offsets.h" - -.macro resample_one fmt, es=2 -.ifnc \fmt, dbl - .macro M_MUL2 x:vararg - .endm - .macro M_MLA2 x:vararg - .endm -.endif -function ff_resample_one_\fmt\()_neon, export=1 - sxtw x2, w2 - ldr x9, [x0, #FILTER_BANK] - ldr w6, [x0, #FILTER_LENGTH] - ldp w7, w8, [x0, #PHASE_SHIFT] // and phase_mask - lsr x10, x4, x7 // sample_index - and x4, x4, x8 - lsl x11, x6, #\es // filter_length * elem_size - add x3, x3, x10, lsl #\es // src[sample_index] - madd x9, x11, x4, x9 // filter - cmp w6, #16 - b.lt 5f -8: // remaining filter_length at least 16 - subs w6, w6, #16 - LOAD8 v4, v5, v6, v7, x3 - LOAD8 v16, v17, v18, v19, x9 - M_MUL v0, v4, v16, v1 - M_MUL2 v1, v6, v18 -7: - LOAD8 v20, v21, v22, v23, x3 - M_MLA v0, v5, v17, v1 - M_MLA2 v1, v7, v19 - LOAD8 v24, v25, v26, v27, x9 - M_MLA v0, v20, v24, v1 - M_MLA2 v1, v22, v26 - b.eq 6f - cmp w6, #16 - M_MLA v0, v21, v25, v1 - M_MLA2 v1, v23, v27 - b.lt 4f - subs w6, w6, #16 - LOAD8 v4, v5, v6, v7, x3 - LOAD8 v16, v17, v18, v19, x9 - M_MLA v0, v4, v16, v1 - M_MLA2 v1, v6, v18 - b 7b -6: - M_MLA v0, v21, v25, v1 - M_MLA2 v1, v23, v27 - STORE_ONE 0, x1, x2, v1 - ret -5: - movi v0.16b, #0 - movi v1.16b, #0 -4: // remaining filter_length 1-15 - cmp w6, #4 - b.lt 2f - subs w6, w6, #4 - LOAD4 v4, v5, x3 - LOAD4 v6, v7, x9 - M_MLA v0, v4, v6, v1 - M_MLA2 v1, v5, v7 - b.eq 0f - b 4b -2: // remaining filter_length 1-3 - cmp w6, #2 - b.lt 1f - LOAD2 2, x3 - LOAD2 3, x9 - subs w6, w6, #2 - M_MLA v0, v2, v3 - b.eq 0f -1: // remaining filter_length 1 - LOAD1 6, x3 - LOAD1 7, x9 - M_MLA v0, v6, v7 -0: - STORE_ONE 0, x1, x2, v1 - ret -endfunc - -.purgem LOAD1 -.purgem LOAD2 -.purgem LOAD4 -.purgem LOAD8 -.purgem M_MLA -.purgem M_MLA2 -.purgem M_MUL -.purgem M_MUL2 -.purgem STORE_ONE -.endm - - -.macro LOAD1 d1, addr - ldr d\d1, [\addr], #8 -.endm -.macro LOAD2 d1, addr - ld1 {v\d1\().2d}, [\addr], #16 -.endm -.macro LOAD4 d1, d2, addr - ld1 {\d1\().2d,\d2\().2d}, [\addr], #32 -.endm -.macro LOAD8 d1, d2, d3, d4, addr - ld1 {\d1\().2d,\d2\().2d,\d3\().2d,\d4\().2d}, [\addr], #64 -.endm -.macro M_MLA d, r0, r1, d2:vararg - fmla \d\().2d, \r0\().2d, \r1\().2d -.endm -.macro M_MLA2 second:vararg - M_MLA \second -.endm -.macro M_MUL d, r0, r1, d2:vararg - fmul \d\().2d, \r0\().2d, \r1\().2d -.endm -.macro M_MUL2 second:vararg - M_MUL \second -.endm -.macro STORE_ONE rn, addr, idx, d2 - fadd v\rn\().2d, v\rn\().2d, \d2\().2d - faddp d\rn\(), v\rn\().2d - str d\rn\(), [\addr, \idx, lsl #3] -.endm - -resample_one dbl, 3 - - -.macro LOAD1 d1, addr - ldr s\d1, [\addr], #4 -.endm -.macro LOAD2 d1, addr - ld1 {v\d1\().2s}, [\addr], #8 -.endm -.macro LOAD4 d1, d2, addr - ld1 {\d1\().4s}, [\addr], #16 -.endm -.macro LOAD8 d1, d2, d3, d4, addr - ld1 {\d1\().4s,\d2\().4s}, [\addr], #32 -.endm -.macro M_MLA d, r0, r1, d2:vararg - fmla \d\().4s, \r0\().4s, \r1\().4s -.endm -.macro M_MUL d, r0, r1, d2:vararg - fmul \d\().4s, \r0\().4s, \r1\().4s -.endm -.macro STORE_ONE rn, addr, idx, d2 - faddp v\rn\().4s, v\rn\().4s, v\rn\().4s - faddp s\rn\(), v\rn\().2s - str s\rn\(), [\addr, \idx, lsl #2] -.endm - -resample_one flt - - -.macro LOAD1 d1, addr - ldr h\d1, [\addr], #2 -.endm -.macro LOAD2 d1, addr - ldr s\d1, [\addr], #4 -.endm -.macro LOAD4 d1, d2, addr - ld1 {\d1\().4h}, [\addr], #8 -.endm -.macro LOAD8 d1, d2, d3, d4, addr - ld1 {\d1\().4h,\d2\().4h}, [\addr], #16 -.endm -.macro M_MLA d, r0, r1, d2:vararg - smlal \d\().4s, \r0\().4h, \r1\().4h -.endm -.macro M_MUL d, r0, r1, d2:vararg - smull \d\().4s, \r0\().4h, \r1\().4h -.endm -.macro STORE_ONE rn, addr, idx, d2 - addp v\rn\().4s, v\rn\().4s, v\rn\().4s - addp v\rn\().4s, v\rn\().4s, v\rn\().4s - sqrshrn v\rn\().4h, v\rn\().4s, #15 - str h\rn\(), [\addr, \idx, lsl #1] -.endm - -resample_one s16, 1 - - -.macro LOAD1 d1, addr - ldr s\d1, [\addr], #4 -.endm -.macro LOAD2 d1, addr - ld1 {v\d1\().2s}, [\addr], #8 -.endm -.macro LOAD4 d1, d2, addr - ld1 {\d1\().4s}, [\addr], #16 -.endm -.macro LOAD8 d1, d2, d3, d4, addr - ld1 {\d1\().4s,\d2\().4s}, [\addr], #32 -.endm -.macro M_MLA d1, r0, r1, d2:vararg - smlal \d1\().2d, \r0\().2s, \r1\().2s -.ifnb \d2 - smlal2 \d2\().2d, \r0\().4s, \r1\().4s -.endif -.endm -.macro M_MUL d1, r0, r1, d2:vararg - smull \d1\().2d, \r0\().2s, \r1\().2s -.ifnb \d2 - smull2 \d2\().2d, \r0\().4s, \r1\().4s -.endif -.endm -.macro STORE_ONE rn, addr, idx, d2 - add v\rn\().2d, v\rn\().2d, \d2\().2d - addp d\rn\(), v\rn\().2d - sqrshrn v\rn\().2s, v\rn\().2d, #30 - str s\rn\(), [\addr, \idx, lsl #2] -.endm - -resample_one s32 diff --git a/libavresample/arm/Makefile b/libavresample/arm/Makefile deleted file mode 100644 index 352d1a8c13..0000000000 --- a/libavresample/arm/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OBJS += arm/audio_convert_init.o \ - arm/resample_init.o - -OBJS-$(CONFIG_NEON_CLOBBER_TEST) += arm/neontest.o - -NEON-OBJS += arm/audio_convert_neon.o \ - arm/resample_neon.o diff --git a/libavresample/arm/asm-offsets.h b/libavresample/arm/asm-offsets.h deleted file mode 100644 index 4d3d116dc0..0000000000 --- a/libavresample/arm/asm-offsets.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_ARM_ASM_OFFSETS_H -#define AVRESAMPLE_ARM_ASM_OFFSETS_H - -/* struct ResampleContext */ -#define FILTER_BANK 0x08 -#define FILTER_LENGTH 0x0c -#define SRC_INCR 0x20 -#define PHASE_SHIFT 0x28 -#define PHASE_MASK (PHASE_SHIFT + 0x04) - -#endif /* AVRESAMPLE_ARM_ASM_OFFSETS_H */ diff --git a/libavresample/arm/audio_convert_init.c b/libavresample/arm/audio_convert_init.c deleted file mode 100644 index 3d19a0e0e5..0000000000 --- a/libavresample/arm/audio_convert_init.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "config.h" -#include "libavutil/attributes.h" -#include "libavutil/cpu.h" -#include "libavutil/arm/cpu.h" -#include "libavutil/samplefmt.h" -#include "libavresample/audio_convert.h" - -void ff_conv_flt_to_s16_neon(int16_t *dst, const float *src, int len); -void ff_conv_fltp_to_s16_neon(int16_t *dst, float *const *src, - int len, int channels); -void ff_conv_fltp_to_s16_2ch_neon(int16_t *dst, float *const *src, - int len, int channels); - -av_cold void ff_audio_convert_init_arm(AudioConvert *ac) -{ - int cpu_flags = av_get_cpu_flags(); - - if (have_neon(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT, - 0, 16, 8, "NEON", - ff_conv_flt_to_s16_neon); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 0, 16, 8, "NEON", - ff_conv_fltp_to_s16_neon); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 2, 16, 8, "NEON", - ff_conv_fltp_to_s16_2ch_neon); - } -} diff --git a/libavresample/arm/audio_convert_neon.S b/libavresample/arm/audio_convert_neon.S deleted file mode 100644 index a120e8793b..0000000000 --- a/libavresample/arm/audio_convert_neon.S +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright (c) 2008 Mans Rullgard - * - * This file is part of FFmpeg - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "libavutil/arm/asm.S" - -function ff_conv_flt_to_s16_neon, export=1 - subs r2, r2, #8 - vld1.32 {q0}, [r1,:128]! - vcvt.s32.f32 q8, q0, #31 - vld1.32 {q1}, [r1,:128]! - vcvt.s32.f32 q9, q1, #31 - beq 3f - bics r12, r2, #15 - beq 2f -1: subs r12, r12, #16 - vqrshrn.s32 d4, q8, #16 - vld1.32 {q0}, [r1,:128]! - vcvt.s32.f32 q0, q0, #31 - vqrshrn.s32 d5, q9, #16 - vld1.32 {q1}, [r1,:128]! - vcvt.s32.f32 q1, q1, #31 - vqrshrn.s32 d6, q0, #16 - vst1.16 {q2}, [r0,:128]! - vqrshrn.s32 d7, q1, #16 - vld1.32 {q8}, [r1,:128]! - vcvt.s32.f32 q8, q8, #31 - vld1.32 {q9}, [r1,:128]! - vcvt.s32.f32 q9, q9, #31 - vst1.16 {q3}, [r0,:128]! - bne 1b - ands r2, r2, #15 - beq 3f -2: vld1.32 {q0}, [r1,:128]! - vqrshrn.s32 d4, q8, #16 - vcvt.s32.f32 q0, q0, #31 - vld1.32 {q1}, [r1,:128]! - vqrshrn.s32 d5, q9, #16 - vcvt.s32.f32 q1, q1, #31 - vqrshrn.s32 d6, q0, #16 - vst1.16 {q2}, [r0,:128]! - vqrshrn.s32 d7, q1, #16 - vst1.16 {q3}, [r0,:128]! - bx lr -3: vqrshrn.s32 d4, q8, #16 - vqrshrn.s32 d5, q9, #16 - vst1.16 {q2}, [r0,:128]! - bx lr -endfunc - -function ff_conv_fltp_to_s16_2ch_neon, export=1 - ldm r1, {r1, r3} - subs r2, r2, #8 - vld1.32 {q0}, [r1,:128]! - vcvt.s32.f32 q8, q0, #31 - vld1.32 {q1}, [r1,:128]! - vcvt.s32.f32 q9, q1, #31 - vld1.32 {q10}, [r3,:128]! - vcvt.s32.f32 q10, q10, #31 - vld1.32 {q11}, [r3,:128]! - vcvt.s32.f32 q11, q11, #31 - beq 3f - bics r12, r2, #15 - beq 2f -1: subs r12, r12, #16 - vld1.32 {q0}, [r1,:128]! - vcvt.s32.f32 q0, q0, #31 - vsri.32 q10, q8, #16 - vld1.32 {q1}, [r1,:128]! - vcvt.s32.f32 q1, q1, #31 - vld1.32 {q12}, [r3,:128]! - vcvt.s32.f32 q12, q12, #31 - vld1.32 {q13}, [r3,:128]! - vsri.32 q11, q9, #16 - vst1.16 {q10}, [r0,:128]! - vcvt.s32.f32 q13, q13, #31 - vst1.16 {q11}, [r0,:128]! - vsri.32 q12, q0, #16 - vld1.32 {q8}, [r1,:128]! - vsri.32 q13, q1, #16 - vst1.16 {q12}, [r0,:128]! - vcvt.s32.f32 q8, q8, #31 - vld1.32 {q9}, [r1,:128]! - vcvt.s32.f32 q9, q9, #31 - vld1.32 {q10}, [r3,:128]! - vcvt.s32.f32 q10, q10, #31 - vld1.32 {q11}, [r3,:128]! - vcvt.s32.f32 q11, q11, #31 - vst1.16 {q13}, [r0,:128]! - bne 1b - ands r2, r2, #15 - beq 3f -2: vsri.32 q10, q8, #16 - vld1.32 {q0}, [r1,:128]! - vcvt.s32.f32 q0, q0, #31 - vld1.32 {q1}, [r1,:128]! - vcvt.s32.f32 q1, q1, #31 - vld1.32 {q12}, [r3,:128]! - vcvt.s32.f32 q12, q12, #31 - vsri.32 q11, q9, #16 - vld1.32 {q13}, [r3,:128]! - vcvt.s32.f32 q13, q13, #31 - vst1.16 {q10}, [r0,:128]! - vsri.32 q12, q0, #16 - vst1.16 {q11}, [r0,:128]! - vsri.32 q13, q1, #16 - vst1.16 {q12-q13},[r0,:128]! - bx lr -3: vsri.32 q10, q8, #16 - vsri.32 q11, q9, #16 - vst1.16 {q10-q11},[r0,:128]! - bx lr -endfunc - -function ff_conv_fltp_to_s16_neon, export=1 - cmp r3, #2 - itt lt - ldrlt r1, [r1] - blt X(ff_conv_flt_to_s16_neon) - beq X(ff_conv_fltp_to_s16_2ch_neon) - - push {r4-r8, lr} - cmp r3, #4 - lsl r12, r3, #1 - blt 4f - - @ 4 channels -5: ldm r1!, {r4-r7} - mov lr, r2 - mov r8, r0 - vld1.32 {q8}, [r4,:128]! - vcvt.s32.f32 q8, q8, #31 - vld1.32 {q9}, [r5,:128]! - vcvt.s32.f32 q9, q9, #31 - vld1.32 {q10}, [r6,:128]! - vcvt.s32.f32 q10, q10, #31 - vld1.32 {q11}, [r7,:128]! - vcvt.s32.f32 q11, q11, #31 -6: subs lr, lr, #8 - vld1.32 {q0}, [r4,:128]! - vcvt.s32.f32 q0, q0, #31 - vsri.32 q9, q8, #16 - vld1.32 {q1}, [r5,:128]! - vcvt.s32.f32 q1, q1, #31 - vsri.32 q11, q10, #16 - vld1.32 {q2}, [r6,:128]! - vcvt.s32.f32 q2, q2, #31 - vzip.32 d18, d22 - vld1.32 {q3}, [r7,:128]! - vcvt.s32.f32 q3, q3, #31 - vzip.32 d19, d23 - vst1.16 {d18}, [r8], r12 - vsri.32 q1, q0, #16 - vst1.16 {d22}, [r8], r12 - vsri.32 q3, q2, #16 - vst1.16 {d19}, [r8], r12 - vzip.32 d2, d6 - vst1.16 {d23}, [r8], r12 - vzip.32 d3, d7 - beq 7f - vld1.32 {q8}, [r4,:128]! - vcvt.s32.f32 q8, q8, #31 - vst1.16 {d2}, [r8], r12 - vld1.32 {q9}, [r5,:128]! - vcvt.s32.f32 q9, q9, #31 - vst1.16 {d6}, [r8], r12 - vld1.32 {q10}, [r6,:128]! - vcvt.s32.f32 q10, q10, #31 - vst1.16 {d3}, [r8], r12 - vld1.32 {q11}, [r7,:128]! - vcvt.s32.f32 q11, q11, #31 - vst1.16 {d7}, [r8], r12 - b 6b -7: vst1.16 {d2}, [r8], r12 - vst1.16 {d6}, [r8], r12 - vst1.16 {d3}, [r8], r12 - vst1.16 {d7}, [r8], r12 - subs r3, r3, #4 - it eq - popeq {r4-r8, pc} - cmp r3, #4 - add r0, r0, #8 - bge 5b - - @ 2 channels -4: cmp r3, #2 - blt 4f - ldm r1!, {r4-r5} - mov lr, r2 - mov r8, r0 - tst lr, #8 - vld1.32 {q8}, [r4,:128]! - vcvt.s32.f32 q8, q8, #31 - vld1.32 {q9}, [r5,:128]! - vcvt.s32.f32 q9, q9, #31 - vld1.32 {q10}, [r4,:128]! - vcvt.s32.f32 q10, q10, #31 - vld1.32 {q11}, [r5,:128]! - vcvt.s32.f32 q11, q11, #31 - beq 6f - subs lr, lr, #8 - beq 7f - vsri.32 d18, d16, #16 - vsri.32 d19, d17, #16 - vld1.32 {q8}, [r4,:128]! - vcvt.s32.f32 q8, q8, #31 - vst1.32 {d18[0]}, [r8], r12 - vsri.32 d22, d20, #16 - vst1.32 {d18[1]}, [r8], r12 - vsri.32 d23, d21, #16 - vst1.32 {d19[0]}, [r8], r12 - vst1.32 {d19[1]}, [r8], r12 - vld1.32 {q9}, [r5,:128]! - vcvt.s32.f32 q9, q9, #31 - vst1.32 {d22[0]}, [r8], r12 - vst1.32 {d22[1]}, [r8], r12 - vld1.32 {q10}, [r4,:128]! - vcvt.s32.f32 q10, q10, #31 - vst1.32 {d23[0]}, [r8], r12 - vst1.32 {d23[1]}, [r8], r12 - vld1.32 {q11}, [r5,:128]! - vcvt.s32.f32 q11, q11, #31 -6: subs lr, lr, #16 - vld1.32 {q0}, [r4,:128]! - vcvt.s32.f32 q0, q0, #31 - vsri.32 d18, d16, #16 - vld1.32 {q1}, [r5,:128]! - vcvt.s32.f32 q1, q1, #31 - vsri.32 d19, d17, #16 - vld1.32 {q2}, [r4,:128]! - vcvt.s32.f32 q2, q2, #31 - vld1.32 {q3}, [r5,:128]! - vcvt.s32.f32 q3, q3, #31 - vst1.32 {d18[0]}, [r8], r12 - vsri.32 d22, d20, #16 - vst1.32 {d18[1]}, [r8], r12 - vsri.32 d23, d21, #16 - vst1.32 {d19[0]}, [r8], r12 - vsri.32 d2, d0, #16 - vst1.32 {d19[1]}, [r8], r12 - vsri.32 d3, d1, #16 - vst1.32 {d22[0]}, [r8], r12 - vsri.32 d6, d4, #16 - vst1.32 {d22[1]}, [r8], r12 - vsri.32 d7, d5, #16 - vst1.32 {d23[0]}, [r8], r12 - vst1.32 {d23[1]}, [r8], r12 - beq 6f - vld1.32 {q8}, [r4,:128]! - vcvt.s32.f32 q8, q8, #31 - vst1.32 {d2[0]}, [r8], r12 - vst1.32 {d2[1]}, [r8], r12 - vld1.32 {q9}, [r5,:128]! - vcvt.s32.f32 q9, q9, #31 - vst1.32 {d3[0]}, [r8], r12 - vst1.32 {d3[1]}, [r8], r12 - vld1.32 {q10}, [r4,:128]! - vcvt.s32.f32 q10, q10, #31 - vst1.32 {d6[0]}, [r8], r12 - vst1.32 {d6[1]}, [r8], r12 - vld1.32 {q11}, [r5,:128]! - vcvt.s32.f32 q11, q11, #31 - vst1.32 {d7[0]}, [r8], r12 - vst1.32 {d7[1]}, [r8], r12 - bgt 6b -6: vst1.32 {d2[0]}, [r8], r12 - vst1.32 {d2[1]}, [r8], r12 - vst1.32 {d3[0]}, [r8], r12 - vst1.32 {d3[1]}, [r8], r12 - vst1.32 {d6[0]}, [r8], r12 - vst1.32 {d6[1]}, [r8], r12 - vst1.32 {d7[0]}, [r8], r12 - vst1.32 {d7[1]}, [r8], r12 - b 8f -7: vsri.32 d18, d16, #16 - vsri.32 d19, d17, #16 - vst1.32 {d18[0]}, [r8], r12 - vsri.32 d22, d20, #16 - vst1.32 {d18[1]}, [r8], r12 - vsri.32 d23, d21, #16 - vst1.32 {d19[0]}, [r8], r12 - vst1.32 {d19[1]}, [r8], r12 - vst1.32 {d22[0]}, [r8], r12 - vst1.32 {d22[1]}, [r8], r12 - vst1.32 {d23[0]}, [r8], r12 - vst1.32 {d23[1]}, [r8], r12 -8: subs r3, r3, #2 - add r0, r0, #4 - it eq - popeq {r4-r8, pc} - - @ 1 channel -4: ldr r4, [r1] - tst r2, #8 - mov lr, r2 - mov r5, r0 - vld1.32 {q0}, [r4,:128]! - vcvt.s32.f32 q0, q0, #31 - vld1.32 {q1}, [r4,:128]! - vcvt.s32.f32 q1, q1, #31 - bne 8f -6: subs lr, lr, #16 - vld1.32 {q2}, [r4,:128]! - vcvt.s32.f32 q2, q2, #31 - vld1.32 {q3}, [r4,:128]! - vcvt.s32.f32 q3, q3, #31 - vst1.16 {d0[1]}, [r5,:16], r12 - vst1.16 {d0[3]}, [r5,:16], r12 - vst1.16 {d1[1]}, [r5,:16], r12 - vst1.16 {d1[3]}, [r5,:16], r12 - vst1.16 {d2[1]}, [r5,:16], r12 - vst1.16 {d2[3]}, [r5,:16], r12 - vst1.16 {d3[1]}, [r5,:16], r12 - vst1.16 {d3[3]}, [r5,:16], r12 - beq 7f - vld1.32 {q0}, [r4,:128]! - vcvt.s32.f32 q0, q0, #31 - vld1.32 {q1}, [r4,:128]! - vcvt.s32.f32 q1, q1, #31 -7: vst1.16 {d4[1]}, [r5,:16], r12 - vst1.16 {d4[3]}, [r5,:16], r12 - vst1.16 {d5[1]}, [r5,:16], r12 - vst1.16 {d5[3]}, [r5,:16], r12 - vst1.16 {d6[1]}, [r5,:16], r12 - vst1.16 {d6[3]}, [r5,:16], r12 - vst1.16 {d7[1]}, [r5,:16], r12 - vst1.16 {d7[3]}, [r5,:16], r12 - bgt 6b - pop {r4-r8, pc} -8: subs lr, lr, #8 - vst1.16 {d0[1]}, [r5,:16], r12 - vst1.16 {d0[3]}, [r5,:16], r12 - vst1.16 {d1[1]}, [r5,:16], r12 - vst1.16 {d1[3]}, [r5,:16], r12 - vst1.16 {d2[1]}, [r5,:16], r12 - vst1.16 {d2[3]}, [r5,:16], r12 - vst1.16 {d3[1]}, [r5,:16], r12 - vst1.16 {d3[3]}, [r5,:16], r12 - it eq - popeq {r4-r8, pc} - vld1.32 {q0}, [r4,:128]! - vcvt.s32.f32 q0, q0, #31 - vld1.32 {q1}, [r4,:128]! - vcvt.s32.f32 q1, q1, #31 - b 6b -endfunc diff --git a/libavresample/arm/neontest.c b/libavresample/arm/neontest.c deleted file mode 100644 index 22afedbc60..0000000000 --- a/libavresample/arm/neontest.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * check NEON registers for clobbers - * Copyright (c) 2013 Martin Storsjo - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavresample/avresample.h" -#include "libavutil/arm/neontest.h" - -wrap(avresample_convert(AVAudioResampleContext *avr, uint8_t **output, - int out_plane_size, int out_samples, uint8_t **input, - int in_plane_size, int in_samples)) -{ - testneonclobbers(avresample_convert, avr, output, out_plane_size, - out_samples, input, in_plane_size, in_samples); -} diff --git a/libavresample/arm/resample_init.c b/libavresample/arm/resample_init.c deleted file mode 100644 index 10af09cb91..0000000000 --- a/libavresample/arm/resample_init.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2014 Peter Meerwald - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" - -#include "libavutil/cpu.h" -#include "libavutil/arm/cpu.h" -#include "libavutil/internal.h" -#include "libavutil/samplefmt.h" - -#include "libavresample/resample.h" - -#include "asm-offsets.h" - -AV_CHECK_OFFSET(struct ResampleContext, filter_bank, FILTER_BANK); -AV_CHECK_OFFSET(struct ResampleContext, filter_length, FILTER_LENGTH); -AV_CHECK_OFFSET(struct ResampleContext, src_incr, SRC_INCR); -AV_CHECK_OFFSET(struct ResampleContext, phase_shift, PHASE_SHIFT); -AV_CHECK_OFFSET(struct ResampleContext, phase_mask, PHASE_MASK); - -void ff_resample_one_flt_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); -void ff_resample_one_s16_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); -void ff_resample_one_s32_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); - -void ff_resample_linear_flt_neon(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); - -av_cold void ff_audio_resample_init_arm(ResampleContext *c, - enum AVSampleFormat sample_fmt) -{ - int cpu_flags = av_get_cpu_flags(); - if (have_neon(cpu_flags)) { - switch (sample_fmt) { - case AV_SAMPLE_FMT_FLTP: - if (c->linear) - c->resample_one = ff_resample_linear_flt_neon; - else - c->resample_one = ff_resample_one_flt_neon; - break; - case AV_SAMPLE_FMT_S16P: - if (!c->linear) - c->resample_one = ff_resample_one_s16_neon; - break; - case AV_SAMPLE_FMT_S32P: - if (!c->linear) - c->resample_one = ff_resample_one_s32_neon; - break; - } - } -} diff --git a/libavresample/arm/resample_neon.S b/libavresample/arm/resample_neon.S deleted file mode 100644 index 7ee8497a5c..0000000000 --- a/libavresample/arm/resample_neon.S +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright (c) 2014 Peter Meerwald - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavutil/arm/asm.S" - -#include "asm-offsets.h" - -.macro resample_one fmt, es=2 -function ff_resample_one_\fmt\()_neon, export=1 - push {r4, r5} - add r1, r1, r2, lsl #\es - - ldr r2, [r0, #PHASE_SHIFT+4] /* phase_mask */ - ldr ip, [sp, #8] /* index */ - ldr r5, [r0, #FILTER_LENGTH] - and r2, ip, r2 /* (index & phase_mask) */ - ldr r4, [r0, #PHASE_SHIFT] - lsr r4, ip, r4 /* compute sample_index */ - mul r2, r2, r5 - - ldr ip, [r0, #FILTER_BANK] - add r3, r3, r4, lsl #\es /* &src[sample_index] */ - - cmp r5, #8 - add r0, ip, r2, lsl #\es /* filter = &filter_bank[...] */ - - blt 5f -8: - subs r5, r5, #8 - LOAD4 - MUL4 -7: - LOAD4 - beq 6f - cmp r5, #8 - MLA4 - blt 4f - subs r5, r5, #8 - LOAD4 - MLA4 - b 7b -6: - MLA4 - STORE - pop {r4, r5} - bx lr -5: - INIT4 -4: /* remaining filter_length 1 to 7 */ - cmp r5, #4 - blt 2f - subs r5, r5, #4 - LOAD4 - MLA4 - beq 0f -2: /* remaining filter_length 1 to 3 */ - cmp r5, #2 - blt 1f - subs r5, r5, #2 - LOAD2 - MLA2 - beq 0f -1: /* remaining filter_length 1 */ - LOAD1 - MLA1 -0: - STORE - pop {r4, r5} - bx lr -endfunc - -.purgem LOAD1 -.purgem LOAD2 -.purgem LOAD4 -.purgem MLA1 -.purgem MLA2 -.purgem MLA4 -.purgem MUL4 -.purgem INIT4 -.purgem STORE -.endm - - -/* float32 */ -.macro LOAD1 - veor.32 d0, d0 - vld1.32 {d0[0]}, [r0]! /* load filter */ - vld1.32 {d4[0]}, [r3]! /* load src */ -.endm -.macro LOAD2 - vld1.32 {d0}, [r0]! /* load filter */ - vld1.32 {d4}, [r3]! /* load src */ -.endm -.macro LOAD4 - vld1.32 {d0,d1}, [r0]! /* load filter */ - vld1.32 {d4,d5}, [r3]! /* load src */ -.endm -.macro MLA1 - vmla.f32 d16, d0, d4[0] -.endm -.macro MLA2 - vmla.f32 d16, d0, d4 -.endm -.macro MLA4 - vmla.f32 d16, d0, d4 - vmla.f32 d17, d1, d5 -.endm -.macro MUL4 - vmul.f32 d16, d0, d4 - vmul.f32 d17, d1, d5 -.endm -.macro INIT4 - veor.f32 q8, q8 -.endm -.macro STORE - vpadd.f32 d16, d16, d17 - vpadd.f32 d16, d16, d16 - vst1.32 d16[0], [r1] -.endm - -resample_one flt, 2 - - -/* s32 */ -.macro LOAD1 - veor.32 d0, d0 - vld1.32 {d0[0]}, [r0]! /* load filter */ - vld1.32 {d4[0]}, [r3]! /* load src */ -.endm -.macro LOAD2 - vld1.32 {d0}, [r0]! /* load filter */ - vld1.32 {d4}, [r3]! /* load src */ -.endm -.macro LOAD4 - vld1.32 {d0,d1}, [r0]! /* load filter */ - vld1.32 {d4,d5}, [r3]! /* load src */ -.endm -.macro MLA1 - vmlal.s32 q8, d0, d4[0] -.endm -.macro MLA2 - vmlal.s32 q8, d0, d4 -.endm -.macro MLA4 - vmlal.s32 q8, d0, d4 - vmlal.s32 q9, d1, d5 -.endm -.macro MUL4 - vmull.s32 q8, d0, d4 - vmull.s32 q9, d1, d5 -.endm -.macro INIT4 - veor.s64 q8, q8 - veor.s64 q9, q9 -.endm -.macro STORE - vadd.s64 q8, q8, q9 - vadd.s64 d16, d16, d17 - vqrshrn.s64 d16, q8, #30 - vst1.32 d16[0], [r1] -.endm - -resample_one s32, 2 - - -/* s16 */ -.macro LOAD1 - veor.16 d0, d0 - vld1.16 {d0[0]}, [r0]! /* load filter */ - vld1.16 {d4[0]}, [r3]! /* load src */ -.endm -.macro LOAD2 - veor.16 d0, d0 - vld1.32 {d0[0]}, [r0]! /* load filter */ - veor.16 d4, d4 - vld1.32 {d4[0]}, [r3]! /* load src */ -.endm -.macro LOAD4 - vld1.16 {d0}, [r0]! /* load filter */ - vld1.16 {d4}, [r3]! /* load src */ -.endm -.macro MLA1 - vmlal.s16 q8, d0, d4[0] -.endm -.macro MLA2 - vmlal.s16 q8, d0, d4 -.endm -.macro MLA4 - vmlal.s16 q8, d0, d4 -.endm -.macro MUL4 - vmull.s16 q8, d0, d4 -.endm -.macro INIT4 - veor.s32 q8, q8 -.endm -.macro STORE - vpadd.s32 d16, d16, d17 - vpadd.s32 d16, d16, d16 - vqrshrn.s32 d16, q8, #15 - vst1.16 d16[0], [r1] -.endm - -resample_one s16, 1 - - -.macro resample_linear fmt, es=2 -function ff_resample_linear_\fmt\()_neon, export=1 - push {r4, r5} - add r1, r1, r2, lsl #\es - - ldr r2, [r0, #PHASE_SHIFT+4] /* phase_mask */ - ldr ip, [sp, #8] /* index */ - ldr r5, [r0, #FILTER_LENGTH] - and r2, ip, r2 /* (index & phase_mask) */ - ldr r4, [r0, #PHASE_SHIFT] - lsr r4, ip, r4 /* compute sample_index */ - mul r2, r2, r5 - - ldr ip, [r0, #FILTER_BANK] - add r3, r3, r4, lsl #\es /* &src[sample_index] */ - - cmp r5, #8 - ldr r4, [r0, #SRC_INCR] - add r0, ip, r2, lsl #\es /* filter = &filter_bank[...] */ - add r2, r0, r5, lsl #\es /* filter[... + c->filter_length] */ - - blt 5f -8: - subs r5, r5, #8 - LOAD4 - MUL4 -7: - LOAD4 - beq 6f - cmp r5, #8 - MLA4 - blt 4f - subs r5, r5, #8 - LOAD4 - MLA4 - b 7b -6: - MLA4 - STORE - pop {r4, r5} - bx lr -5: - INIT4 -4: /* remaining filter_length 1 to 7 */ - cmp r5, #4 - blt 2f - subs r5, r5, #4 - LOAD4 - MLA4 - beq 0f -2: /* remaining filter_length 1 to 3 */ - cmp r5, #2 - blt 1f - subs r5, r5, #2 - LOAD2 - MLA2 - beq 0f -1: /* remaining filter_length 1 */ - LOAD1 - MLA1 -0: - STORE - pop {r4, r5} - bx lr -endfunc - -.purgem LOAD1 -.purgem LOAD2 -.purgem LOAD4 -.purgem MLA1 -.purgem MLA2 -.purgem MLA4 -.purgem MUL4 -.purgem INIT4 -.purgem STORE -.endm - - -/* float32 linear */ -.macro LOAD1 - veor.32 d0, d0 - veor.32 d2, d2 - vld1.32 {d0[0]}, [r0]! /* load filter */ - vld1.32 {d2[0]}, [r2]! /* load filter */ - vld1.32 {d4[0]}, [r3]! /* load src */ -.endm -.macro LOAD2 - vld1.32 {d0}, [r0]! /* load filter */ - vld1.32 {d2}, [r2]! /* load filter */ - vld1.32 {d4}, [r3]! /* load src */ -.endm -.macro LOAD4 - vld1.32 {d0,d1}, [r0]! /* load filter */ - vld1.32 {d2,d3}, [r2]! /* load filter */ - vld1.32 {d4,d5}, [r3]! /* load src */ -.endm -.macro MLA1 - vmla.f32 d18, d0, d4[0] - vmla.f32 d16, d2, d4[0] -.endm -.macro MLA2 - vmla.f32 d18, d0, d4 - vmla.f32 d16, d2, d4 -.endm -.macro MLA4 - vmla.f32 q9, q0, q2 - vmla.f32 q8, q1, q2 -.endm -.macro MUL4 - vmul.f32 q9, q0, q2 - vmul.f32 q8, q1, q2 -.endm -.macro INIT4 - veor.f32 q9, q9 - veor.f32 q8, q8 -.endm -.macro STORE - vldr s0, [sp, #12] /* frac */ - vmov s1, r4 - vcvt.f32.s32 d0, d0 - - vsub.f32 q8, q8, q9 /* v2 - val */ - vpadd.f32 d18, d18, d19 - vpadd.f32 d16, d16, d17 - vpadd.f32 d2, d18, d18 - vpadd.f32 d1, d16, d16 - - vmul.f32 s2, s2, s0 /* (v2 - val) * frac */ - vdiv.f32 s2, s2, s1 /* / c->src_incr */ - vadd.f32 s4, s4, s2 - - vstr s4, [r1] -.endm - -resample_linear flt, 2 diff --git a/libavresample/audio_convert.c b/libavresample/audio_convert.c deleted file mode 100644 index f2888cdd17..0000000000 --- a/libavresample/audio_convert.c +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Copyright (c) 2006 Michael Niedermayer - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "config.h" -#include "libavutil/common.h" -#include "libavutil/libm.h" -#include "libavutil/log.h" -#include "libavutil/mem.h" -#include "libavutil/samplefmt.h" -#include "audio_convert.h" -#include "audio_data.h" -#include "dither.h" - -enum ConvFuncType { - CONV_FUNC_TYPE_FLAT, - CONV_FUNC_TYPE_INTERLEAVE, - CONV_FUNC_TYPE_DEINTERLEAVE, -}; - -typedef void (conv_func_flat)(uint8_t *out, const uint8_t *in, int len); - -typedef void (conv_func_interleave)(uint8_t *out, uint8_t *const *in, - int len, int channels); - -typedef void (conv_func_deinterleave)(uint8_t **out, const uint8_t *in, int len, - int channels); - -struct AudioConvert { - AVAudioResampleContext *avr; - DitherContext *dc; - enum AVSampleFormat in_fmt; - enum AVSampleFormat out_fmt; - int apply_map; - int channels; - int planes; - int ptr_align; - int samples_align; - int has_optimized_func; - const char *func_descr; - const char *func_descr_generic; - enum ConvFuncType func_type; - conv_func_flat *conv_flat; - conv_func_flat *conv_flat_generic; - conv_func_interleave *conv_interleave; - conv_func_interleave *conv_interleave_generic; - conv_func_deinterleave *conv_deinterleave; - conv_func_deinterleave *conv_deinterleave_generic; -}; - -void ff_audio_convert_set_func(AudioConvert *ac, enum AVSampleFormat out_fmt, - enum AVSampleFormat in_fmt, int channels, - int ptr_align, int samples_align, - const char *descr, void *conv) -{ - int found = 0; - - switch (ac->func_type) { - case CONV_FUNC_TYPE_FLAT: - if (av_get_packed_sample_fmt(ac->in_fmt) == in_fmt && - av_get_packed_sample_fmt(ac->out_fmt) == out_fmt) { - ac->conv_flat = conv; - ac->func_descr = descr; - ac->ptr_align = ptr_align; - ac->samples_align = samples_align; - if (ptr_align == 1 && samples_align == 1) { - ac->conv_flat_generic = conv; - ac->func_descr_generic = descr; - } else { - ac->has_optimized_func = 1; - } - found = 1; - } - break; - case CONV_FUNC_TYPE_INTERLEAVE: - if (ac->in_fmt == in_fmt && ac->out_fmt == out_fmt && - (!channels || ac->channels == channels)) { - ac->conv_interleave = conv; - ac->func_descr = descr; - ac->ptr_align = ptr_align; - ac->samples_align = samples_align; - if (ptr_align == 1 && samples_align == 1) { - ac->conv_interleave_generic = conv; - ac->func_descr_generic = descr; - } else { - ac->has_optimized_func = 1; - } - found = 1; - } - break; - case CONV_FUNC_TYPE_DEINTERLEAVE: - if (ac->in_fmt == in_fmt && ac->out_fmt == out_fmt && - (!channels || ac->channels == channels)) { - ac->conv_deinterleave = conv; - ac->func_descr = descr; - ac->ptr_align = ptr_align; - ac->samples_align = samples_align; - if (ptr_align == 1 && samples_align == 1) { - ac->conv_deinterleave_generic = conv; - ac->func_descr_generic = descr; - } else { - ac->has_optimized_func = 1; - } - found = 1; - } - break; - } - if (found) { - av_log(ac->avr, AV_LOG_DEBUG, "audio_convert: found function: %-4s " - "to %-4s (%s)\n", av_get_sample_fmt_name(ac->in_fmt), - av_get_sample_fmt_name(ac->out_fmt), descr); - } -} - -#define CONV_FUNC_NAME(dst_fmt, src_fmt) conv_ ## src_fmt ## _to_ ## dst_fmt - -#define CONV_LOOP(otype, expr) \ - do { \ - *(otype *)po = expr; \ - pi += is; \ - po += os; \ - } while (po < end); \ - -#define CONV_FUNC_FLAT(ofmt, otype, ifmt, itype, expr) \ -static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t *out, const uint8_t *in, \ - int len) \ -{ \ - int is = sizeof(itype); \ - int os = sizeof(otype); \ - const uint8_t *pi = in; \ - uint8_t *po = out; \ - uint8_t *end = out + os * len; \ - CONV_LOOP(otype, expr) \ -} - -#define CONV_FUNC_INTERLEAVE(ofmt, otype, ifmt, itype, expr) \ -static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t *out, const uint8_t **in, \ - int len, int channels) \ -{ \ - int ch; \ - int out_bps = sizeof(otype); \ - int is = sizeof(itype); \ - int os = channels * out_bps; \ - for (ch = 0; ch < channels; ch++) { \ - const uint8_t *pi = in[ch]; \ - uint8_t *po = out + ch * out_bps; \ - uint8_t *end = po + os * len; \ - CONV_LOOP(otype, expr) \ - } \ -} - -#define CONV_FUNC_DEINTERLEAVE(ofmt, otype, ifmt, itype, expr) \ -static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t **out, const uint8_t *in, \ - int len, int channels) \ -{ \ - int ch; \ - int in_bps = sizeof(itype); \ - int is = channels * in_bps; \ - int os = sizeof(otype); \ - for (ch = 0; ch < channels; ch++) { \ - const uint8_t *pi = in + ch * in_bps; \ - uint8_t *po = out[ch]; \ - uint8_t *end = po + os * len; \ - CONV_LOOP(otype, expr) \ - } \ -} - -#define CONV_FUNC_GROUP(ofmt, otype, ifmt, itype, expr) \ -CONV_FUNC_FLAT( ofmt, otype, ifmt, itype, expr) \ -CONV_FUNC_INTERLEAVE( ofmt, otype, ifmt ## P, itype, expr) \ -CONV_FUNC_DEINTERLEAVE(ofmt ## P, otype, ifmt, itype, expr) - -CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_U8, uint8_t, *(const uint8_t *)pi) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) << 8) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) << 24) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0f / (1 << 7))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0 / (1 << 7))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t, (*(const int16_t *)pi >> 8) + 0x80) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi << 16) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0f / (1 << 15))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0 / (1 << 15))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t, (*(const int32_t *)pi >> 24) + 0x80) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi >> 16) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0f / (1U << 31))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0 / (1U << 31))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8( lrintf(*(const float *)pi * (1 << 7)) + 0x80)) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16( lrintf(*(const float *)pi * (1 << 15)))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *)pi * (1U << 31)))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_FLT, float, *(const float *)pi) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_FLT, float, *(const float *)pi) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8( lrint(*(const double *)pi * (1 << 7)) + 0x80)) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16( lrint(*(const double *)pi * (1 << 15)))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *)pi * (1U << 31)))) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_DBL, double, *(const double *)pi) -CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_DBL, double, *(const double *)pi) - -#define SET_CONV_FUNC_GROUP(ofmt, ifmt) \ -ff_audio_convert_set_func(ac, ofmt, ifmt, 0, 1, 1, "C", CONV_FUNC_NAME(ofmt, ifmt)); \ -ff_audio_convert_set_func(ac, ofmt ## P, ifmt, 0, 1, 1, "C", CONV_FUNC_NAME(ofmt ## P, ifmt)); \ -ff_audio_convert_set_func(ac, ofmt, ifmt ## P, 0, 1, 1, "C", CONV_FUNC_NAME(ofmt, ifmt ## P)); - -static void set_generic_function(AudioConvert *ac) -{ - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_U8) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S32) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_FLT) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBL) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL) - SET_CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL) -} - -void ff_audio_convert_free(AudioConvert **ac) -{ - if (!*ac) - return; - ff_dither_free(&(*ac)->dc); - av_freep(ac); -} - -AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, - enum AVSampleFormat out_fmt, - enum AVSampleFormat in_fmt, - int channels, int sample_rate, - int apply_map) -{ - AudioConvert *ac; - int in_planar, out_planar; - - ac = av_mallocz(sizeof(*ac)); - if (!ac) - return NULL; - - ac->avr = avr; - ac->out_fmt = out_fmt; - ac->in_fmt = in_fmt; - ac->channels = channels; - ac->apply_map = apply_map; - - if (avr->dither_method != AV_RESAMPLE_DITHER_NONE && - av_get_packed_sample_fmt(out_fmt) == AV_SAMPLE_FMT_S16 && - av_get_bytes_per_sample(in_fmt) > 2) { - ac->dc = ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, - apply_map); - if (!ac->dc) { - av_free(ac); - return NULL; - } - return ac; - } - - in_planar = ff_sample_fmt_is_planar(in_fmt, channels); - out_planar = ff_sample_fmt_is_planar(out_fmt, channels); - - if (in_planar == out_planar) { - ac->func_type = CONV_FUNC_TYPE_FLAT; - ac->planes = in_planar ? ac->channels : 1; - } else if (in_planar) - ac->func_type = CONV_FUNC_TYPE_INTERLEAVE; - else - ac->func_type = CONV_FUNC_TYPE_DEINTERLEAVE; - - set_generic_function(ac); - - if (ARCH_AARCH64) - ff_audio_convert_init_aarch64(ac); - if (ARCH_ARM) - ff_audio_convert_init_arm(ac); - if (ARCH_X86) - ff_audio_convert_init_x86(ac); - - return ac; -} - -int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) -{ - int use_generic = 1; - int len = in->nb_samples; - int p; - - if (ac->dc) { - /* dithered conversion */ - av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", - len, av_get_sample_fmt_name(ac->in_fmt), - av_get_sample_fmt_name(ac->out_fmt)); - - return ff_convert_dither(ac->dc, out, in); - } - - /* determine whether to use the optimized function based on pointer and - samples alignment in both the input and output */ - if (ac->has_optimized_func) { - int ptr_align = FFMIN(in->ptr_align, out->ptr_align); - int samples_align = FFMIN(in->samples_align, out->samples_align); - int aligned_len = FFALIGN(len, ac->samples_align); - if (!(ptr_align % ac->ptr_align) && samples_align >= aligned_len) { - len = aligned_len; - use_generic = 0; - } - } - av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\n", len, - av_get_sample_fmt_name(ac->in_fmt), - av_get_sample_fmt_name(ac->out_fmt), - use_generic ? ac->func_descr_generic : ac->func_descr); - - if (ac->apply_map) { - ChannelMapInfo *map = &ac->avr->ch_map_info; - - if (!ff_sample_fmt_is_planar(ac->out_fmt, ac->channels)) { - av_log(ac->avr, AV_LOG_ERROR, "cannot remap packed format during conversion\n"); - return AVERROR(EINVAL); - } - - if (map->do_remap) { - if (ff_sample_fmt_is_planar(ac->in_fmt, ac->channels)) { - conv_func_flat *convert = use_generic ? ac->conv_flat_generic : - ac->conv_flat; - - for (p = 0; p < ac->planes; p++) - if (map->channel_map[p] >= 0) - convert(out->data[p], in->data[map->channel_map[p]], len); - } else { - uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; - conv_func_deinterleave *convert = use_generic ? - ac->conv_deinterleave_generic : - ac->conv_deinterleave; - - for (p = 0; p < ac->channels; p++) - data[map->input_map[p]] = out->data[p]; - - convert(data, in->data[0], len, ac->channels); - } - } - if (map->do_copy || map->do_zero) { - for (p = 0; p < ac->planes; p++) { - if (map->channel_copy[p]) - memcpy(out->data[p], out->data[map->channel_copy[p]], - len * out->stride); - else if (map->channel_zero[p]) - av_samples_set_silence(&out->data[p], 0, len, 1, ac->out_fmt); - } - } - } else { - switch (ac->func_type) { - case CONV_FUNC_TYPE_FLAT: { - if (!in->is_planar) - len *= in->channels; - if (use_generic) { - for (p = 0; p < ac->planes; p++) - ac->conv_flat_generic(out->data[p], in->data[p], len); - } else { - for (p = 0; p < ac->planes; p++) - ac->conv_flat(out->data[p], in->data[p], len); - } - break; - } - case CONV_FUNC_TYPE_INTERLEAVE: - if (use_generic) - ac->conv_interleave_generic(out->data[0], in->data, len, - ac->channels); - else - ac->conv_interleave(out->data[0], in->data, len, ac->channels); - break; - case CONV_FUNC_TYPE_DEINTERLEAVE: - if (use_generic) - ac->conv_deinterleave_generic(out->data, in->data[0], len, - ac->channels); - else - ac->conv_deinterleave(out->data, in->data[0], len, - ac->channels); - break; - } - } - - out->nb_samples = in->nb_samples; - return 0; -} diff --git a/libavresample/audio_convert.h b/libavresample/audio_convert.h deleted file mode 100644 index df15442c18..0000000000 --- a/libavresample/audio_convert.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_AUDIO_CONVERT_H -#define AVRESAMPLE_AUDIO_CONVERT_H - -#include "libavutil/samplefmt.h" -#include "avresample.h" -#include "internal.h" -#include "audio_data.h" - -/** - * Set conversion function if the parameters match. - * - * This compares the parameters of the conversion function to the parameters - * in the AudioConvert context. If the parameters do not match, no changes are - * made to the active functions. If the parameters do match and the alignment - * is not constrained, the function is set as the generic conversion function. - * If the parameters match and the alignment is constrained, the function is - * set as the optimized conversion function. - * - * @param ac AudioConvert context - * @param out_fmt output sample format - * @param in_fmt input sample format - * @param channels number of channels, or 0 for any number of channels - * @param ptr_align buffer pointer alignment, in bytes - * @param samples_align buffer size alignment, in samples - * @param descr function type description (e.g. "C" or "SSE") - * @param conv conversion function pointer - */ -void ff_audio_convert_set_func(AudioConvert *ac, enum AVSampleFormat out_fmt, - enum AVSampleFormat in_fmt, int channels, - int ptr_align, int samples_align, - const char *descr, void *conv); - -/** - * Allocate and initialize AudioConvert context for sample format conversion. - * - * @param avr AVAudioResampleContext - * @param out_fmt output sample format - * @param in_fmt input sample format - * @param channels number of channels - * @param sample_rate sample rate (used for dithering) - * @param apply_map apply channel map during conversion - * @return newly-allocated AudioConvert context - */ -AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, - enum AVSampleFormat out_fmt, - enum AVSampleFormat in_fmt, - int channels, int sample_rate, - int apply_map); - -/** - * Free AudioConvert. - * - * The AudioConvert must have been previously allocated with ff_audio_convert_alloc(). - * - * @param ac AudioConvert struct - */ -void ff_audio_convert_free(AudioConvert **ac); - -/** - * Convert audio data from one sample format to another. - * - * For each call, the alignment of the input and output AudioData buffers are - * examined to determine whether to use the generic or optimized conversion - * function (when available). - * - * The number of samples to convert is determined by in->nb_samples. The output - * buffer must be large enough to handle this many samples. out->nb_samples is - * set by this function before a successful return. - * - * @param ac AudioConvert context - * @param out output audio data - * @param in input audio data - * @return 0 on success, negative AVERROR code on failure - */ -int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in); - -/* arch-specific initialization functions */ - -void ff_audio_convert_init_aarch64(AudioConvert *ac); -void ff_audio_convert_init_arm(AudioConvert *ac); -void ff_audio_convert_init_x86(AudioConvert *ac); - -#endif /* AVRESAMPLE_AUDIO_CONVERT_H */ diff --git a/libavresample/audio_data.c b/libavresample/audio_data.c deleted file mode 100644 index b54ead841a..0000000000 --- a/libavresample/audio_data.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include - -#include "libavutil/mem.h" -#include "audio_data.h" - -static const AVClass audio_data_class = { - .class_name = "AudioData", - .item_name = av_default_item_name, - .version = LIBAVUTIL_VERSION_INT, -}; - -/* - * Calculate alignment for data pointers. - */ -static void calc_ptr_alignment(AudioData *a) -{ - int p; - int min_align = 128; - - for (p = 0; p < a->planes; p++) { - int cur_align = 128; - while ((intptr_t)a->data[p] % cur_align) - cur_align >>= 1; - if (cur_align < min_align) - min_align = cur_align; - } - a->ptr_align = min_align; -} - -int ff_sample_fmt_is_planar(enum AVSampleFormat sample_fmt, int channels) -{ - if (channels == 1) - return 1; - else - return av_sample_fmt_is_planar(sample_fmt); -} - -int ff_audio_data_set_channels(AudioData *a, int channels) -{ - if (channels < 1 || channels > AVRESAMPLE_MAX_CHANNELS || - channels > a->allocated_channels) - return AVERROR(EINVAL); - - a->channels = channels; - a->planes = a->is_planar ? channels : 1; - - calc_ptr_alignment(a); - - return 0; -} - -int ff_audio_data_init(AudioData *a, uint8_t * const *src, int plane_size, - int channels, int nb_samples, - enum AVSampleFormat sample_fmt, int read_only, - const char *name) -{ - int p; - - memset(a, 0, sizeof(*a)); - a->class = &audio_data_class; - - if (channels < 1 || channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(a, AV_LOG_ERROR, "invalid channel count: %d\n", channels); - return AVERROR(EINVAL); - } - - a->sample_size = av_get_bytes_per_sample(sample_fmt); - if (!a->sample_size) { - av_log(a, AV_LOG_ERROR, "invalid sample format\n"); - return AVERROR(EINVAL); - } - a->is_planar = ff_sample_fmt_is_planar(sample_fmt, channels); - a->planes = a->is_planar ? channels : 1; - a->stride = a->sample_size * (a->is_planar ? 1 : channels); - - for (p = 0; p < (a->is_planar ? channels : 1); p++) { - if (!src[p]) { - av_log(a, AV_LOG_ERROR, "invalid NULL pointer for src[%d]\n", p); - return AVERROR(EINVAL); - } - a->data[p] = src[p]; - } - a->allocated_samples = nb_samples * !read_only; - a->nb_samples = nb_samples; - a->sample_fmt = sample_fmt; - a->channels = channels; - a->allocated_channels = channels; - a->read_only = read_only; - a->allow_realloc = 0; - a->name = name ? name : "{no name}"; - - calc_ptr_alignment(a); - a->samples_align = plane_size / a->stride; - - return 0; -} - -AudioData *ff_audio_data_alloc(int channels, int nb_samples, - enum AVSampleFormat sample_fmt, const char *name) -{ - AudioData *a; - int ret; - - if (channels < 1 || channels > AVRESAMPLE_MAX_CHANNELS) - return NULL; - - a = av_mallocz(sizeof(*a)); - if (!a) - return NULL; - - a->sample_size = av_get_bytes_per_sample(sample_fmt); - if (!a->sample_size) { - av_free(a); - return NULL; - } - a->is_planar = ff_sample_fmt_is_planar(sample_fmt, channels); - a->planes = a->is_planar ? channels : 1; - a->stride = a->sample_size * (a->is_planar ? 1 : channels); - - a->class = &audio_data_class; - a->sample_fmt = sample_fmt; - a->channels = channels; - a->allocated_channels = channels; - a->read_only = 0; - a->allow_realloc = 1; - a->name = name ? name : "{no name}"; - - if (nb_samples > 0) { - ret = ff_audio_data_realloc(a, nb_samples); - if (ret < 0) { - av_free(a); - return NULL; - } - return a; - } else { - calc_ptr_alignment(a); - return a; - } -} - -int ff_audio_data_realloc(AudioData *a, int nb_samples) -{ - int ret, new_buf_size, plane_size, p; - - /* check if buffer is already large enough */ - if (a->allocated_samples >= nb_samples) - return 0; - - /* validate that the output is not read-only and realloc is allowed */ - if (a->read_only || !a->allow_realloc) - return AVERROR(EINVAL); - - new_buf_size = av_samples_get_buffer_size(&plane_size, - a->allocated_channels, nb_samples, - a->sample_fmt, 0); - if (new_buf_size < 0) - return new_buf_size; - - /* if there is already data in the buffer and the sample format is planar, - allocate a new buffer and copy the data, otherwise just realloc the - internal buffer and set new data pointers */ - if (a->nb_samples > 0 && a->is_planar) { - uint8_t *new_data[AVRESAMPLE_MAX_CHANNELS] = { NULL }; - - ret = av_samples_alloc(new_data, &plane_size, a->allocated_channels, - nb_samples, a->sample_fmt, 0); - if (ret < 0) - return ret; - - for (p = 0; p < a->planes; p++) - memcpy(new_data[p], a->data[p], a->nb_samples * a->stride); - - av_freep(&a->buffer); - memcpy(a->data, new_data, sizeof(new_data)); - a->buffer = a->data[0]; - } else { - av_freep(&a->buffer); - a->buffer = av_malloc(new_buf_size); - if (!a->buffer) - return AVERROR(ENOMEM); - ret = av_samples_fill_arrays(a->data, &plane_size, a->buffer, - a->allocated_channels, nb_samples, - a->sample_fmt, 0); - if (ret < 0) - return ret; - } - a->buffer_size = new_buf_size; - a->allocated_samples = nb_samples; - - calc_ptr_alignment(a); - a->samples_align = plane_size / a->stride; - - return 0; -} - -void ff_audio_data_free(AudioData **a) -{ - if (!*a) - return; - av_free((*a)->buffer); - av_freep(a); -} - -int ff_audio_data_copy(AudioData *dst, AudioData *src, ChannelMapInfo *map) -{ - int ret, p; - - /* validate input/output compatibility */ - if (dst->sample_fmt != src->sample_fmt || dst->channels < src->channels) - return AVERROR(EINVAL); - - if (map && !src->is_planar) { - av_log(src, AV_LOG_ERROR, "cannot remap packed format during copy\n"); - return AVERROR(EINVAL); - } - - /* if the input is empty, just empty the output */ - if (!src->nb_samples) { - dst->nb_samples = 0; - return 0; - } - - /* reallocate output if necessary */ - ret = ff_audio_data_realloc(dst, src->nb_samples); - if (ret < 0) - return ret; - - /* copy data */ - if (map) { - if (map->do_remap) { - for (p = 0; p < src->planes; p++) { - if (map->channel_map[p] >= 0) - memcpy(dst->data[p], src->data[map->channel_map[p]], - src->nb_samples * src->stride); - } - } - if (map->do_copy || map->do_zero) { - for (p = 0; p < src->planes; p++) { - if (map->channel_copy[p]) - memcpy(dst->data[p], dst->data[map->channel_copy[p]], - src->nb_samples * src->stride); - else if (map->channel_zero[p]) - av_samples_set_silence(&dst->data[p], 0, src->nb_samples, - 1, dst->sample_fmt); - } - } - } else { - for (p = 0; p < src->planes; p++) - memcpy(dst->data[p], src->data[p], src->nb_samples * src->stride); - } - - dst->nb_samples = src->nb_samples; - - return 0; -} - -int ff_audio_data_combine(AudioData *dst, int dst_offset, AudioData *src, - int src_offset, int nb_samples) -{ - int ret, p, dst_offset2, dst_move_size; - - /* validate input/output compatibility */ - if (dst->sample_fmt != src->sample_fmt || dst->channels != src->channels) { - av_log(src, AV_LOG_ERROR, "sample format mismatch\n"); - return AVERROR(EINVAL); - } - - /* validate offsets are within the buffer bounds */ - if (dst_offset < 0 || dst_offset > dst->nb_samples || - src_offset < 0 || src_offset > src->nb_samples) { - av_log(src, AV_LOG_ERROR, "offset out-of-bounds: src=%d dst=%d\n", - src_offset, dst_offset); - return AVERROR(EINVAL); - } - - /* check offsets and sizes to see if we can just do nothing and return */ - if (nb_samples > src->nb_samples - src_offset) - nb_samples = src->nb_samples - src_offset; - if (nb_samples <= 0) - return 0; - - /* validate that the output is not read-only */ - if (dst->read_only) { - av_log(dst, AV_LOG_ERROR, "dst is read-only\n"); - return AVERROR(EINVAL); - } - - /* reallocate output if necessary */ - ret = ff_audio_data_realloc(dst, dst->nb_samples + nb_samples); - if (ret < 0) { - av_log(dst, AV_LOG_ERROR, "error reallocating dst\n"); - return ret; - } - - dst_offset2 = dst_offset + nb_samples; - dst_move_size = dst->nb_samples - dst_offset; - - for (p = 0; p < src->planes; p++) { - if (dst_move_size > 0) { - memmove(dst->data[p] + dst_offset2 * dst->stride, - dst->data[p] + dst_offset * dst->stride, - dst_move_size * dst->stride); - } - memcpy(dst->data[p] + dst_offset * dst->stride, - src->data[p] + src_offset * src->stride, - nb_samples * src->stride); - } - dst->nb_samples += nb_samples; - - return 0; -} - -void ff_audio_data_drain(AudioData *a, int nb_samples) -{ - if (a->nb_samples <= nb_samples) { - /* drain the whole buffer */ - a->nb_samples = 0; - } else { - int p; - int move_offset = a->stride * nb_samples; - int move_size = a->stride * (a->nb_samples - nb_samples); - - for (p = 0; p < a->planes; p++) - memmove(a->data[p], a->data[p] + move_offset, move_size); - - a->nb_samples -= nb_samples; - } -} - -int ff_audio_data_add_to_fifo(AVAudioFifo *af, AudioData *a, int offset, - int nb_samples) -{ - uint8_t *offset_data[AVRESAMPLE_MAX_CHANNELS]; - int offset_size, p; - - if (offset >= a->nb_samples) - return 0; - offset_size = offset * a->stride; - for (p = 0; p < a->planes; p++) - offset_data[p] = a->data[p] + offset_size; - - return av_audio_fifo_write(af, (void **)offset_data, nb_samples); -} - -int ff_audio_data_read_from_fifo(AVAudioFifo *af, AudioData *a, int nb_samples) -{ - int ret; - - if (a->read_only) - return AVERROR(EINVAL); - - ret = ff_audio_data_realloc(a, nb_samples); - if (ret < 0) - return ret; - - ret = av_audio_fifo_read(af, (void **)a->data, nb_samples); - if (ret >= 0) - a->nb_samples = ret; - return ret; -} diff --git a/libavresample/audio_data.h b/libavresample/audio_data.h deleted file mode 100644 index 1280307a95..0000000000 --- a/libavresample/audio_data.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_AUDIO_DATA_H -#define AVRESAMPLE_AUDIO_DATA_H - -#include - -#include "libavutil/audio_fifo.h" -#include "libavutil/log.h" -#include "libavutil/samplefmt.h" -#include "avresample.h" -#include "internal.h" - -int ff_sample_fmt_is_planar(enum AVSampleFormat sample_fmt, int channels); - -/** - * Audio buffer used for intermediate storage between conversion phases. - */ -struct AudioData { - const AVClass *class; /**< AVClass for logging */ - uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; /**< data plane pointers */ - uint8_t *buffer; /**< data buffer */ - unsigned int buffer_size; /**< allocated buffer size */ - int allocated_samples; /**< number of samples the buffer can hold */ - int nb_samples; /**< current number of samples */ - enum AVSampleFormat sample_fmt; /**< sample format */ - int channels; /**< channel count */ - int allocated_channels; /**< allocated channel count */ - int is_planar; /**< sample format is planar */ - int planes; /**< number of data planes */ - int sample_size; /**< bytes per sample */ - int stride; /**< sample byte offset within a plane */ - int read_only; /**< data is read-only */ - int allow_realloc; /**< realloc is allowed */ - int ptr_align; /**< minimum data pointer alignment */ - int samples_align; /**< allocated samples alignment */ - const char *name; /**< name for debug logging */ -}; - -int ff_audio_data_set_channels(AudioData *a, int channels); - -/** - * Initialize AudioData using a given source. - * - * This does not allocate an internal buffer. It only sets the data pointers - * and audio parameters. - * - * @param a AudioData struct - * @param src source data pointers - * @param plane_size plane size, in bytes. - * This can be 0 if unknown, but that will lead to - * optimized functions not being used in many cases, - * which could slow down some conversions. - * @param channels channel count - * @param nb_samples number of samples in the source data - * @param sample_fmt sample format - * @param read_only indicates if buffer is read only or read/write - * @param name name for debug logging (can be NULL) - * @return 0 on success, negative AVERROR value on error - */ -int ff_audio_data_init(AudioData *a, uint8_t * const *src, int plane_size, - int channels, int nb_samples, - enum AVSampleFormat sample_fmt, int read_only, - const char *name); - -/** - * Allocate AudioData. - * - * This allocates an internal buffer and sets audio parameters. - * - * @param channels channel count - * @param nb_samples number of samples to allocate space for - * @param sample_fmt sample format - * @param name name for debug logging (can be NULL) - * @return newly allocated AudioData struct, or NULL on error - */ -AudioData *ff_audio_data_alloc(int channels, int nb_samples, - enum AVSampleFormat sample_fmt, - const char *name); - -/** - * Reallocate AudioData. - * - * The AudioData must have been previously allocated with ff_audio_data_alloc(). - * - * @param a AudioData struct - * @param nb_samples number of samples to allocate space for - * @return 0 on success, negative AVERROR value on error - */ -int ff_audio_data_realloc(AudioData *a, int nb_samples); - -/** - * Free AudioData. - * - * The AudioData must have been previously allocated with ff_audio_data_alloc(). - * - * @param a AudioData struct - */ -void ff_audio_data_free(AudioData **a); - -/** - * Copy data from one AudioData to another. - * - * @param out output AudioData - * @param in input AudioData - * @param map channel map, NULL if not remapping - * @return 0 on success, negative AVERROR value on error - */ -int ff_audio_data_copy(AudioData *out, AudioData *in, ChannelMapInfo *map); - -/** - * Append data from one AudioData to the end of another. - * - * @param dst destination AudioData - * @param dst_offset offset, in samples, to start writing, relative to the - * start of dst - * @param src source AudioData - * @param src_offset offset, in samples, to start copying, relative to the - * start of the src - * @param nb_samples number of samples to copy - * @return 0 on success, negative AVERROR value on error - */ -int ff_audio_data_combine(AudioData *dst, int dst_offset, AudioData *src, - int src_offset, int nb_samples); - -/** - * Drain samples from the start of the AudioData. - * - * Remaining samples are shifted to the start of the AudioData. - * - * @param a AudioData struct - * @param nb_samples number of samples to drain - */ -void ff_audio_data_drain(AudioData *a, int nb_samples); - -/** - * Add samples in AudioData to an AVAudioFifo. - * - * @param af Audio FIFO Buffer - * @param a AudioData struct - * @param offset number of samples to skip from the start of the data - * @param nb_samples number of samples to add to the FIFO - * @return number of samples actually added to the FIFO, or - * negative AVERROR code on error - */ -int ff_audio_data_add_to_fifo(AVAudioFifo *af, AudioData *a, int offset, - int nb_samples); - -/** - * Read samples from an AVAudioFifo to AudioData. - * - * @param af Audio FIFO Buffer - * @param a AudioData struct - * @param nb_samples number of samples to read from the FIFO - * @return number of samples actually read from the FIFO, or - * negative AVERROR code on error - */ -int ff_audio_data_read_from_fifo(AVAudioFifo *af, AudioData *a, int nb_samples); - -#endif /* AVRESAMPLE_AUDIO_DATA_H */ diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c deleted file mode 100644 index 7ae0aeb74d..0000000000 --- a/libavresample/audio_mix.c +++ /dev/null @@ -1,742 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "libavutil/common.h" -#include "libavutil/libm.h" -#include "libavutil/samplefmt.h" -#include "avresample.h" -#include "internal.h" -#include "audio_data.h" -#include "audio_mix.h" - -static const char * const coeff_type_names[] = { "q8", "q15", "flt" }; - -struct AudioMix { - AVAudioResampleContext *avr; - enum AVSampleFormat fmt; - enum AVMixCoeffType coeff_type; - uint64_t in_layout; - uint64_t out_layout; - int in_channels; - int out_channels; - - int ptr_align; - int samples_align; - int has_optimized_func; - const char *func_descr; - const char *func_descr_generic; - mix_func *mix; - mix_func *mix_generic; - - int in_matrix_channels; - int out_matrix_channels; - int output_zero[AVRESAMPLE_MAX_CHANNELS]; - int input_skip[AVRESAMPLE_MAX_CHANNELS]; - int output_skip[AVRESAMPLE_MAX_CHANNELS]; - int16_t *matrix_q8[AVRESAMPLE_MAX_CHANNELS]; - int32_t *matrix_q15[AVRESAMPLE_MAX_CHANNELS]; - float *matrix_flt[AVRESAMPLE_MAX_CHANNELS]; - void **matrix; -}; - -void ff_audio_mix_set_func(AudioMix *am, enum AVSampleFormat fmt, - enum AVMixCoeffType coeff_type, int in_channels, - int out_channels, int ptr_align, int samples_align, - const char *descr, void *mix_func) -{ - if (fmt == am->fmt && coeff_type == am->coeff_type && - ( in_channels == am->in_matrix_channels || in_channels == 0) && - (out_channels == am->out_matrix_channels || out_channels == 0)) { - char chan_str[16]; - am->mix = mix_func; - am->func_descr = descr; - am->ptr_align = ptr_align; - am->samples_align = samples_align; - if (ptr_align == 1 && samples_align == 1) { - am->mix_generic = mix_func; - am->func_descr_generic = descr; - } else { - am->has_optimized_func = 1; - } - if (in_channels) { - if (out_channels) - snprintf(chan_str, sizeof(chan_str), "[%d to %d] ", - in_channels, out_channels); - else - snprintf(chan_str, sizeof(chan_str), "[%d to any] ", - in_channels); - } else if (out_channels) { - snprintf(chan_str, sizeof(chan_str), "[any to %d] ", - out_channels); - } else { - snprintf(chan_str, sizeof(chan_str), "[any to any] "); - } - av_log(am->avr, AV_LOG_DEBUG, "audio_mix: found function: [fmt=%s] " - "[c=%s] %s(%s)\n", av_get_sample_fmt_name(fmt), - coeff_type_names[coeff_type], chan_str, descr); - } -} - -#define MIX_FUNC_NAME(fmt, cfmt) mix_any_ ## fmt ##_## cfmt ##_c - -#define MIX_FUNC_GENERIC(fmt, cfmt, stype, ctype, sumtype, expr) \ -static void MIX_FUNC_NAME(fmt, cfmt)(stype **samples, ctype **matrix, \ - int len, int out_ch, int in_ch) \ -{ \ - int i, in, out; \ - stype temp[AVRESAMPLE_MAX_CHANNELS]; \ - for (i = 0; i < len; i++) { \ - for (out = 0; out < out_ch; out++) { \ - sumtype sum = 0; \ - for (in = 0; in < in_ch; in++) \ - sum += samples[in][i] * matrix[out][in]; \ - temp[out] = expr; \ - } \ - for (out = 0; out < out_ch; out++) \ - samples[out][i] = temp[out]; \ - } \ -} - -MIX_FUNC_GENERIC(FLTP, FLT, float, float, float, sum) -MIX_FUNC_GENERIC(S16P, FLT, int16_t, float, float, av_clip_int16(lrintf(sum))) -MIX_FUNC_GENERIC(S16P, Q15, int16_t, int32_t, int64_t, av_clip_int16(sum >> 15)) -MIX_FUNC_GENERIC(S16P, Q8, int16_t, int16_t, int32_t, av_clip_int16(sum >> 8)) - -/* TODO: templatize the channel-specific C functions */ - -static void mix_2_to_1_fltp_flt_c(float **samples, float **matrix, int len, - int out_ch, int in_ch) -{ - float *src0 = samples[0]; - float *src1 = samples[1]; - float *dst = src0; - float m0 = matrix[0][0]; - float m1 = matrix[0][1]; - - while (len > 4) { - *dst++ = *src0++ * m0 + *src1++ * m1; - *dst++ = *src0++ * m0 + *src1++ * m1; - *dst++ = *src0++ * m0 + *src1++ * m1; - *dst++ = *src0++ * m0 + *src1++ * m1; - len -= 4; - } - while (len > 0) { - *dst++ = *src0++ * m0 + *src1++ * m1; - len--; - } -} - -static void mix_2_to_1_s16p_flt_c(int16_t **samples, float **matrix, int len, - int out_ch, int in_ch) -{ - int16_t *src0 = samples[0]; - int16_t *src1 = samples[1]; - int16_t *dst = src0; - float m0 = matrix[0][0]; - float m1 = matrix[0][1]; - - while (len > 4) { - *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); - *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); - *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); - *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); - len -= 4; - } - while (len > 0) { - *dst++ = av_clip_int16(lrintf(*src0++ * m0 + *src1++ * m1)); - len--; - } -} - -static void mix_2_to_1_s16p_q8_c(int16_t **samples, int16_t **matrix, int len, - int out_ch, int in_ch) -{ - int16_t *src0 = samples[0]; - int16_t *src1 = samples[1]; - int16_t *dst = src0; - int16_t m0 = matrix[0][0]; - int16_t m1 = matrix[0][1]; - - while (len > 4) { - *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; - *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; - *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; - *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; - len -= 4; - } - while (len > 0) { - *dst++ = (*src0++ * m0 + *src1++ * m1) >> 8; - len--; - } -} - -static void mix_1_to_2_fltp_flt_c(float **samples, float **matrix, int len, - int out_ch, int in_ch) -{ - float v; - float *dst0 = samples[0]; - float *dst1 = samples[1]; - float *src = dst0; - float m0 = matrix[0][0]; - float m1 = matrix[1][0]; - - while (len > 4) { - v = *src++; - *dst0++ = v * m0; - *dst1++ = v * m1; - v = *src++; - *dst0++ = v * m0; - *dst1++ = v * m1; - v = *src++; - *dst0++ = v * m0; - *dst1++ = v * m1; - v = *src++; - *dst0++ = v * m0; - *dst1++ = v * m1; - len -= 4; - } - while (len > 0) { - v = *src++; - *dst0++ = v * m0; - *dst1++ = v * m1; - len--; - } -} - -static void mix_6_to_2_fltp_flt_c(float **samples, float **matrix, int len, - int out_ch, int in_ch) -{ - float v0, v1; - float *src0 = samples[0]; - float *src1 = samples[1]; - float *src2 = samples[2]; - float *src3 = samples[3]; - float *src4 = samples[4]; - float *src5 = samples[5]; - float *dst0 = src0; - float *dst1 = src1; - float *m0 = matrix[0]; - float *m1 = matrix[1]; - - while (len > 0) { - v0 = *src0++; - v1 = *src1++; - *dst0++ = v0 * m0[0] + - v1 * m0[1] + - *src2 * m0[2] + - *src3 * m0[3] + - *src4 * m0[4] + - *src5 * m0[5]; - *dst1++ = v0 * m1[0] + - v1 * m1[1] + - *src2++ * m1[2] + - *src3++ * m1[3] + - *src4++ * m1[4] + - *src5++ * m1[5]; - len--; - } -} - -static void mix_2_to_6_fltp_flt_c(float **samples, float **matrix, int len, - int out_ch, int in_ch) -{ - float v0, v1; - float *dst0 = samples[0]; - float *dst1 = samples[1]; - float *dst2 = samples[2]; - float *dst3 = samples[3]; - float *dst4 = samples[4]; - float *dst5 = samples[5]; - float *src0 = dst0; - float *src1 = dst1; - - while (len > 0) { - v0 = *src0++; - v1 = *src1++; - *dst0++ = v0 * matrix[0][0] + v1 * matrix[0][1]; - *dst1++ = v0 * matrix[1][0] + v1 * matrix[1][1]; - *dst2++ = v0 * matrix[2][0] + v1 * matrix[2][1]; - *dst3++ = v0 * matrix[3][0] + v1 * matrix[3][1]; - *dst4++ = v0 * matrix[4][0] + v1 * matrix[4][1]; - *dst5++ = v0 * matrix[5][0] + v1 * matrix[5][1]; - len--; - } -} - -static av_cold int mix_function_init(AudioMix *am) -{ - am->func_descr = am->func_descr_generic = "n/a"; - am->mix = am->mix_generic = NULL; - - /* no need to set a mix function when we're skipping mixing */ - if (!am->in_matrix_channels || !am->out_matrix_channels) - return 0; - - /* any-to-any C versions */ - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 0, 0, 1, 1, "C", MIX_FUNC_NAME(FLTP, FLT)); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, - 0, 0, 1, 1, "C", MIX_FUNC_NAME(S16P, FLT)); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q15, - 0, 0, 1, 1, "C", MIX_FUNC_NAME(S16P, Q15)); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q8, - 0, 0, 1, 1, "C", MIX_FUNC_NAME(S16P, Q8)); - - /* channel-specific C versions */ - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 2, 1, 1, 1, "C", mix_2_to_1_fltp_flt_c); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, - 2, 1, 1, 1, "C", mix_2_to_1_s16p_flt_c); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q8, - 2, 1, 1, 1, "C", mix_2_to_1_s16p_q8_c); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 1, 2, 1, 1, "C", mix_1_to_2_fltp_flt_c); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 6, 2, 1, 1, "C", mix_6_to_2_fltp_flt_c); - - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 2, 6, 1, 1, "C", mix_2_to_6_fltp_flt_c); - - if (ARCH_X86) - ff_audio_mix_init_x86(am); - - if (!am->mix) { - av_log(am->avr, AV_LOG_ERROR, "audio_mix: NO FUNCTION FOUND: [fmt=%s] " - "[c=%s] [%d to %d]\n", av_get_sample_fmt_name(am->fmt), - coeff_type_names[am->coeff_type], am->in_channels, - am->out_channels); - return AVERROR_PATCHWELCOME; - } - return 0; -} - -AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr) -{ - AudioMix *am; - int ret; - - am = av_mallocz(sizeof(*am)); - if (!am) - return NULL; - am->avr = avr; - - if (avr->internal_sample_fmt != AV_SAMPLE_FMT_S16P && - avr->internal_sample_fmt != AV_SAMPLE_FMT_FLTP) { - av_log(avr, AV_LOG_ERROR, "Unsupported internal format for " - "mixing: %s\n", - av_get_sample_fmt_name(avr->internal_sample_fmt)); - goto error; - } - - am->fmt = avr->internal_sample_fmt; - am->coeff_type = avr->mix_coeff_type; - am->in_layout = avr->in_channel_layout; - am->out_layout = avr->out_channel_layout; - am->in_channels = avr->in_channels; - am->out_channels = avr->out_channels; - - /* build matrix if the user did not already set one */ - if (avr->mix_matrix) { - ret = ff_audio_mix_set_matrix(am, avr->mix_matrix, avr->in_channels); - if (ret < 0) - goto error; - av_freep(&avr->mix_matrix); - } else { - double *matrix_dbl = av_mallocz(avr->out_channels * avr->in_channels * - sizeof(*matrix_dbl)); - if (!matrix_dbl) - goto error; - - ret = avresample_build_matrix(avr->in_channel_layout, - avr->out_channel_layout, - avr->center_mix_level, - avr->surround_mix_level, - avr->lfe_mix_level, - avr->normalize_mix_level, - matrix_dbl, - avr->in_channels, - avr->matrix_encoding); - if (ret < 0) { - av_free(matrix_dbl); - goto error; - } - - ret = ff_audio_mix_set_matrix(am, matrix_dbl, avr->in_channels); - if (ret < 0) { - av_log(avr, AV_LOG_ERROR, "error setting mix matrix\n"); - av_free(matrix_dbl); - goto error; - } - - av_free(matrix_dbl); - } - - return am; - -error: - av_free(am); - return NULL; -} - -void ff_audio_mix_free(AudioMix **am_p) -{ - AudioMix *am; - - if (!*am_p) - return; - am = *am_p; - - if (am->matrix) { - av_free(am->matrix[0]); - am->matrix = NULL; - } - memset(am->matrix_q8, 0, sizeof(am->matrix_q8 )); - memset(am->matrix_q15, 0, sizeof(am->matrix_q15)); - memset(am->matrix_flt, 0, sizeof(am->matrix_flt)); - - av_freep(am_p); -} - -int ff_audio_mix(AudioMix *am, AudioData *src) -{ - int use_generic = 1; - int len = src->nb_samples; - int i, j; - - /* determine whether to use the optimized function based on pointer and - samples alignment in both the input and output */ - if (am->has_optimized_func) { - int aligned_len = FFALIGN(len, am->samples_align); - if (!(src->ptr_align % am->ptr_align) && - src->samples_align >= aligned_len) { - len = aligned_len; - use_generic = 0; - } - } - av_log(am->avr, AV_LOG_TRACE, "audio_mix: %d samples - %d to %d channels (%s)\n", - src->nb_samples, am->in_channels, am->out_channels, - use_generic ? am->func_descr_generic : am->func_descr); - - if (am->in_matrix_channels && am->out_matrix_channels) { - uint8_t **data; - uint8_t *data0[AVRESAMPLE_MAX_CHANNELS] = { NULL }; - - if (am->out_matrix_channels < am->out_channels || - am->in_matrix_channels < am->in_channels) { - for (i = 0, j = 0; i < FFMAX(am->in_channels, am->out_channels); i++) { - if (am->input_skip[i] || am->output_skip[i] || am->output_zero[i]) - continue; - data0[j++] = src->data[i]; - } - data = data0; - } else { - data = src->data; - } - - if (use_generic) - am->mix_generic(data, am->matrix, len, am->out_matrix_channels, - am->in_matrix_channels); - else - am->mix(data, am->matrix, len, am->out_matrix_channels, - am->in_matrix_channels); - } - - if (am->out_matrix_channels < am->out_channels) { - for (i = 0; i < am->out_channels; i++) - if (am->output_zero[i]) - av_samples_set_silence(&src->data[i], 0, len, 1, am->fmt); - } - - ff_audio_data_set_channels(src, am->out_channels); - - return 0; -} - -int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride) -{ - int i, o, i0, o0; - - if ( am->in_channels <= 0 || am->in_channels > AVRESAMPLE_MAX_CHANNELS || - am->out_channels <= 0 || am->out_channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(am->avr, AV_LOG_ERROR, "Invalid channel counts\n"); - return AVERROR(EINVAL); - } - -#define GET_MATRIX_CONVERT(suffix, scale) \ - if (!am->matrix_ ## suffix[0]) { \ - av_log(am->avr, AV_LOG_ERROR, "matrix is not set\n"); \ - return AVERROR(EINVAL); \ - } \ - for (o = 0, o0 = 0; o < am->out_channels; o++) { \ - for (i = 0, i0 = 0; i < am->in_channels; i++) { \ - if (am->input_skip[i] || am->output_zero[o]) \ - matrix[o * stride + i] = 0.0; \ - else \ - matrix[o * stride + i] = am->matrix_ ## suffix[o0][i0] * \ - (scale); \ - if (!am->input_skip[i]) \ - i0++; \ - } \ - if (!am->output_zero[o]) \ - o0++; \ - } - - switch (am->coeff_type) { - case AV_MIX_COEFF_TYPE_Q8: - GET_MATRIX_CONVERT(q8, 1.0 / 256.0); - break; - case AV_MIX_COEFF_TYPE_Q15: - GET_MATRIX_CONVERT(q15, 1.0 / 32768.0); - break; - case AV_MIX_COEFF_TYPE_FLT: - GET_MATRIX_CONVERT(flt, 1.0); - break; - default: - av_log(am->avr, AV_LOG_ERROR, "Invalid mix coeff type\n"); - return AVERROR(EINVAL); - } - - return 0; -} - -static void reduce_matrix(AudioMix *am, const double *matrix, int stride) -{ - int i, o; - - memset(am->output_zero, 0, sizeof(am->output_zero)); - memset(am->input_skip, 0, sizeof(am->input_skip)); - memset(am->output_skip, 0, sizeof(am->output_skip)); - - /* exclude output channels if they can be zeroed instead of mixed */ - for (o = 0; o < am->out_channels; o++) { - int zero = 1; - - /* check if the output is always silent */ - for (i = 0; i < am->in_channels; i++) { - if (matrix[o * stride + i] != 0.0) { - zero = 0; - break; - } - } - /* check if the corresponding input channel makes a contribution to - any output channel */ - if (o < am->in_channels) { - for (i = 0; i < am->out_channels; i++) { - if (matrix[i * stride + o] != 0.0) { - zero = 0; - break; - } - } - } - if (zero) { - am->output_zero[o] = 1; - am->out_matrix_channels--; - if (o < am->in_channels) - am->in_matrix_channels--; - } - } - if (am->out_matrix_channels == 0 || am->in_matrix_channels == 0) { - am->out_matrix_channels = 0; - am->in_matrix_channels = 0; - return; - } - - /* skip input channels that contribute fully only to the corresponding - output channel */ - for (i = 0; i < FFMIN(am->in_channels, am->out_channels); i++) { - int skip = 1; - - for (o = 0; o < am->out_channels; o++) { - int i0; - if ((o != i && matrix[o * stride + i] != 0.0) || - (o == i && matrix[o * stride + i] != 1.0)) { - skip = 0; - break; - } - /* if the input contributes fully to the output, also check that no - other inputs contribute to this output */ - if (o == i) { - for (i0 = 0; i0 < am->in_channels; i0++) { - if (i0 != i && matrix[o * stride + i0] != 0.0) { - skip = 0; - break; - } - } - } - } - if (skip) { - am->input_skip[i] = 1; - am->in_matrix_channels--; - } - } - /* skip input channels that do not contribute to any output channel */ - for (; i < am->in_channels; i++) { - int contrib = 0; - - for (o = 0; o < am->out_channels; o++) { - if (matrix[o * stride + i] != 0.0) { - contrib = 1; - break; - } - } - if (!contrib) { - am->input_skip[i] = 1; - am->in_matrix_channels--; - } - } - if (am->in_matrix_channels == 0) { - am->out_matrix_channels = 0; - return; - } - - /* skip output channels that only get full contribution from the - corresponding input channel */ - for (o = 0; o < FFMIN(am->in_channels, am->out_channels); o++) { - int skip = 1; - int o0; - - for (i = 0; i < am->in_channels; i++) { - if ((o != i && matrix[o * stride + i] != 0.0) || - (o == i && matrix[o * stride + i] != 1.0)) { - skip = 0; - break; - } - } - /* check if the corresponding input channel makes a contribution to - any other output channel */ - i = o; - for (o0 = 0; o0 < am->out_channels; o0++) { - if (o0 != i && matrix[o0 * stride + i] != 0.0) { - skip = 0; - break; - } - } - if (skip) { - am->output_skip[o] = 1; - am->out_matrix_channels--; - } - } - if (am->out_matrix_channels == 0) { - am->in_matrix_channels = 0; - return; - } -} - -int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride) -{ - int i, o, i0, o0, ret; - char in_layout_name[128]; - char out_layout_name[128]; - - if ( am->in_channels <= 0 || am->in_channels > AVRESAMPLE_MAX_CHANNELS || - am->out_channels <= 0 || am->out_channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(am->avr, AV_LOG_ERROR, "Invalid channel counts\n"); - return AVERROR(EINVAL); - } - - if (am->matrix) { - av_free(am->matrix[0]); - am->matrix = NULL; - } - - am->in_matrix_channels = am->in_channels; - am->out_matrix_channels = am->out_channels; - - reduce_matrix(am, matrix, stride); - -#define CONVERT_MATRIX(type, expr) \ - am->matrix_## type[0] = av_mallocz(am->out_matrix_channels * \ - am->in_matrix_channels * \ - sizeof(*am->matrix_## type[0])); \ - if (!am->matrix_## type[0]) \ - return AVERROR(ENOMEM); \ - for (o = 0, o0 = 0; o < am->out_channels; o++) { \ - if (am->output_zero[o] || am->output_skip[o]) \ - continue; \ - if (o0 > 0) \ - am->matrix_## type[o0] = am->matrix_## type[o0 - 1] + \ - am->in_matrix_channels; \ - for (i = 0, i0 = 0; i < am->in_channels; i++) { \ - double v; \ - if (am->input_skip[i] || am->output_zero[i]) \ - continue; \ - v = matrix[o * stride + i]; \ - am->matrix_## type[o0][i0] = expr; \ - i0++; \ - } \ - o0++; \ - } \ - am->matrix = (void **)am->matrix_## type; - - if (am->in_matrix_channels && am->out_matrix_channels) { - switch (am->coeff_type) { - case AV_MIX_COEFF_TYPE_Q8: - CONVERT_MATRIX(q8, av_clip_int16(lrint(256.0 * v))) - break; - case AV_MIX_COEFF_TYPE_Q15: - CONVERT_MATRIX(q15, av_clipl_int32(llrint(32768.0 * v))) - break; - case AV_MIX_COEFF_TYPE_FLT: - CONVERT_MATRIX(flt, v) - break; - default: - av_log(am->avr, AV_LOG_ERROR, "Invalid mix coeff type\n"); - return AVERROR(EINVAL); - } - } - - ret = mix_function_init(am); - if (ret < 0) - return ret; - - av_get_channel_layout_string(in_layout_name, sizeof(in_layout_name), - am->in_channels, am->in_layout); - av_get_channel_layout_string(out_layout_name, sizeof(out_layout_name), - am->out_channels, am->out_layout); - av_log(am->avr, AV_LOG_DEBUG, "audio_mix: %s to %s\n", - in_layout_name, out_layout_name); - av_log(am->avr, AV_LOG_DEBUG, "matrix size: %d x %d\n", - am->in_matrix_channels, am->out_matrix_channels); - for (o = 0; o < am->out_channels; o++) { - for (i = 0; i < am->in_channels; i++) { - if (am->output_zero[o]) - av_log(am->avr, AV_LOG_DEBUG, " (ZERO)"); - else if (am->input_skip[i] || am->output_zero[i] || am->output_skip[o]) - av_log(am->avr, AV_LOG_DEBUG, " (SKIP)"); - else - av_log(am->avr, AV_LOG_DEBUG, " %0.3f ", - matrix[o * am->in_channels + i]); - } - av_log(am->avr, AV_LOG_DEBUG, "\n"); - } - - return 0; -} diff --git a/libavresample/audio_mix.h b/libavresample/audio_mix.h deleted file mode 100644 index 0187d0f9e0..0000000000 --- a/libavresample/audio_mix.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_AUDIO_MIX_H -#define AVRESAMPLE_AUDIO_MIX_H - -#include - -#include "libavutil/samplefmt.h" -#include "avresample.h" -#include "internal.h" -#include "audio_data.h" - -typedef void (mix_func)(uint8_t **src, void **matrix, int len, int out_ch, - int in_ch); - -/** - * Set mixing function if the parameters match. - * - * This compares the parameters of the mixing function to the parameters in the - * AudioMix context. If the parameters do not match, no changes are made to the - * active functions. If the parameters do match and the alignment is not - * constrained, the function is set as the generic mixing function. If the - * parameters match and the alignment is constrained, the function is set as - * the optimized mixing function. - * - * @param am AudioMix context - * @param fmt input/output sample format - * @param coeff_type mixing coefficient type - * @param in_channels number of input channels, or 0 for any number of channels - * @param out_channels number of output channels, or 0 for any number of channels - * @param ptr_align buffer pointer alignment, in bytes - * @param samples_align buffer size alignment, in samples - * @param descr function type description (e.g. "C" or "SSE") - * @param mix_func mixing function pointer - */ -void ff_audio_mix_set_func(AudioMix *am, enum AVSampleFormat fmt, - enum AVMixCoeffType coeff_type, int in_channels, - int out_channels, int ptr_align, int samples_align, - const char *descr, void *mix_func); - -/** - * Allocate and initialize an AudioMix context. - * - * The parameters in the AVAudioResampleContext are used to initialize the - * AudioMix context. - * - * @param avr AVAudioResampleContext - * @return newly-allocated AudioMix context. - */ -AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr); - -/** - * Free an AudioMix context. - */ -void ff_audio_mix_free(AudioMix **am); - -/** - * Apply channel mixing to audio data using the current mixing matrix. - */ -int ff_audio_mix(AudioMix *am, AudioData *src); - -/** - * Get the current mixing matrix. - */ -int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride); - -/** - * Set the current mixing matrix. - */ -int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride); - -/* arch-specific initialization functions */ - -void ff_audio_mix_init_x86(AudioMix *am); - -#endif /* AVRESAMPLE_AUDIO_MIX_H */ diff --git a/libavresample/audio_mix_matrix.c b/libavresample/audio_mix_matrix.c deleted file mode 100644 index 5d92351a0e..0000000000 --- a/libavresample/audio_mix_matrix.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (C) 2011 Michael Niedermayer (michaelni@gmx.at) - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "libavutil/common.h" -#include "libavutil/libm.h" -#include "libavutil/samplefmt.h" -#include "avresample.h" -#include "internal.h" -#include "audio_data.h" -#include "audio_mix.h" - -/* channel positions */ -#define FRONT_LEFT 0 -#define FRONT_RIGHT 1 -#define FRONT_CENTER 2 -#define LOW_FREQUENCY 3 -#define BACK_LEFT 4 -#define BACK_RIGHT 5 -#define FRONT_LEFT_OF_CENTER 6 -#define FRONT_RIGHT_OF_CENTER 7 -#define BACK_CENTER 8 -#define SIDE_LEFT 9 -#define SIDE_RIGHT 10 -#define TOP_CENTER 11 -#define TOP_FRONT_LEFT 12 -#define TOP_FRONT_CENTER 13 -#define TOP_FRONT_RIGHT 14 -#define TOP_BACK_LEFT 15 -#define TOP_BACK_CENTER 16 -#define TOP_BACK_RIGHT 17 -#define STEREO_LEFT 29 -#define STEREO_RIGHT 30 -#define WIDE_LEFT 31 -#define WIDE_RIGHT 32 -#define SURROUND_DIRECT_LEFT 33 -#define SURROUND_DIRECT_RIGHT 34 -#define LOW_FREQUENCY_2 35 - -#define SQRT3_2 1.22474487139158904909 /* sqrt(3/2) */ - -static av_always_inline int even(uint64_t layout) -{ - return (!layout || !!(layout & (layout - 1))); -} - -static int sane_layout(uint64_t layout) -{ - /* check that there is at least 1 front speaker */ - if (!(layout & AV_CH_LAYOUT_SURROUND)) - return 0; - - /* check for left/right symmetry */ - if (!even(layout & (AV_CH_FRONT_LEFT | AV_CH_FRONT_RIGHT)) || - !even(layout & (AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT)) || - !even(layout & (AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT)) || - !even(layout & (AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER)) || - !even(layout & (AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT)) || - !even(layout & (AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT)) || - !even(layout & (AV_CH_STEREO_LEFT | AV_CH_STEREO_RIGHT)) || - !even(layout & (AV_CH_WIDE_LEFT | AV_CH_WIDE_RIGHT)) || - !even(layout & (AV_CH_SURROUND_DIRECT_LEFT | AV_CH_SURROUND_DIRECT_RIGHT))) - return 0; - - return 1; -} - -int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout, - double center_mix_level, double surround_mix_level, - double lfe_mix_level, int normalize, - double *matrix_out, int stride, - enum AVMatrixEncoding matrix_encoding) -{ - int i, j, out_i, out_j; - double matrix[64][64] = {{0}}; - int64_t unaccounted; - double maxcoef = 0; - int in_channels, out_channels; - - if ((out_layout & AV_CH_LAYOUT_STEREO_DOWNMIX) == AV_CH_LAYOUT_STEREO_DOWNMIX) { - out_layout = AV_CH_LAYOUT_STEREO; - } - - unaccounted = in_layout & ~out_layout; - - in_channels = av_get_channel_layout_nb_channels( in_layout); - out_channels = av_get_channel_layout_nb_channels(out_layout); - - memset(matrix_out, 0, out_channels * stride * sizeof(*matrix_out)); - - /* check if layouts are supported */ - if (!in_layout || in_channels > AVRESAMPLE_MAX_CHANNELS) - return AVERROR(EINVAL); - if (!out_layout || out_channels > AVRESAMPLE_MAX_CHANNELS) - return AVERROR(EINVAL); - - /* check if layouts are unbalanced or abnormal */ - if (!sane_layout(in_layout) || !sane_layout(out_layout)) - return AVERROR_PATCHWELCOME; - - /* route matching input/output channels */ - for (i = 0; i < 64; i++) { - if (in_layout & out_layout & (1ULL << i)) - matrix[i][i] = 1.0; - } - - /* mix front center to front left/right */ - if (unaccounted & AV_CH_FRONT_CENTER) { - if ((out_layout & AV_CH_LAYOUT_STEREO) == AV_CH_LAYOUT_STEREO) { - if ((in_layout & AV_CH_LAYOUT_STEREO) == AV_CH_LAYOUT_STEREO) { - matrix[FRONT_LEFT ][FRONT_CENTER] += center_mix_level; - matrix[FRONT_RIGHT][FRONT_CENTER] += center_mix_level; - } else { - matrix[FRONT_LEFT ][FRONT_CENTER] += M_SQRT1_2; - matrix[FRONT_RIGHT][FRONT_CENTER] += M_SQRT1_2; - } - } else - return AVERROR_PATCHWELCOME; - } - /* mix front left/right to center */ - if (unaccounted & AV_CH_LAYOUT_STEREO) { - if (out_layout & AV_CH_FRONT_CENTER) { - matrix[FRONT_CENTER][FRONT_LEFT ] += M_SQRT1_2; - matrix[FRONT_CENTER][FRONT_RIGHT] += M_SQRT1_2; - /* mix left/right/center to center */ - if (in_layout & AV_CH_FRONT_CENTER) - matrix[FRONT_CENTER][FRONT_CENTER] = center_mix_level * M_SQRT2; - } else - return AVERROR_PATCHWELCOME; - } - /* mix back center to back, side, or front */ - if (unaccounted & AV_CH_BACK_CENTER) { - if (out_layout & AV_CH_BACK_LEFT) { - matrix[BACK_LEFT ][BACK_CENTER] += M_SQRT1_2; - matrix[BACK_RIGHT][BACK_CENTER] += M_SQRT1_2; - } else if (out_layout & AV_CH_SIDE_LEFT) { - matrix[SIDE_LEFT ][BACK_CENTER] += M_SQRT1_2; - matrix[SIDE_RIGHT][BACK_CENTER] += M_SQRT1_2; - } else if (out_layout & AV_CH_FRONT_LEFT) { - if (matrix_encoding == AV_MATRIX_ENCODING_DOLBY || - matrix_encoding == AV_MATRIX_ENCODING_DPLII) { - if (unaccounted & (AV_CH_BACK_LEFT | AV_CH_SIDE_LEFT)) { - matrix[FRONT_LEFT ][BACK_CENTER] -= surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][BACK_CENTER] += surround_mix_level * M_SQRT1_2; - } else { - matrix[FRONT_LEFT ][BACK_CENTER] -= surround_mix_level; - matrix[FRONT_RIGHT][BACK_CENTER] += surround_mix_level; - } - } else { - matrix[FRONT_LEFT ][BACK_CENTER] += surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][BACK_CENTER] += surround_mix_level * M_SQRT1_2; - } - } else if (out_layout & AV_CH_FRONT_CENTER) { - matrix[FRONT_CENTER][BACK_CENTER] += surround_mix_level * M_SQRT1_2; - } else - return AVERROR_PATCHWELCOME; - } - /* mix back left/right to back center, side, or front */ - if (unaccounted & AV_CH_BACK_LEFT) { - if (out_layout & AV_CH_BACK_CENTER) { - matrix[BACK_CENTER][BACK_LEFT ] += M_SQRT1_2; - matrix[BACK_CENTER][BACK_RIGHT] += M_SQRT1_2; - } else if (out_layout & AV_CH_SIDE_LEFT) { - /* if side channels do not exist in the input, just copy back - channels to side channels, otherwise mix back into side */ - if (in_layout & AV_CH_SIDE_LEFT) { - matrix[SIDE_LEFT ][BACK_LEFT ] += M_SQRT1_2; - matrix[SIDE_RIGHT][BACK_RIGHT] += M_SQRT1_2; - } else { - matrix[SIDE_LEFT ][BACK_LEFT ] += 1.0; - matrix[SIDE_RIGHT][BACK_RIGHT] += 1.0; - } - } else if (out_layout & AV_CH_FRONT_LEFT) { - if (matrix_encoding == AV_MATRIX_ENCODING_DOLBY) { - matrix[FRONT_LEFT ][BACK_LEFT ] -= surround_mix_level * M_SQRT1_2; - matrix[FRONT_LEFT ][BACK_RIGHT] -= surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][BACK_LEFT ] += surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][BACK_RIGHT] += surround_mix_level * M_SQRT1_2; - } else if (matrix_encoding == AV_MATRIX_ENCODING_DPLII) { - matrix[FRONT_LEFT ][BACK_LEFT ] -= surround_mix_level * SQRT3_2; - matrix[FRONT_LEFT ][BACK_RIGHT] -= surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][BACK_LEFT ] += surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][BACK_RIGHT] += surround_mix_level * SQRT3_2; - } else { - matrix[FRONT_LEFT ][BACK_LEFT ] += surround_mix_level; - matrix[FRONT_RIGHT][BACK_RIGHT] += surround_mix_level; - } - } else if (out_layout & AV_CH_FRONT_CENTER) { - matrix[FRONT_CENTER][BACK_LEFT ] += surround_mix_level * M_SQRT1_2; - matrix[FRONT_CENTER][BACK_RIGHT] += surround_mix_level * M_SQRT1_2; - } else - return AVERROR_PATCHWELCOME; - } - /* mix side left/right into back or front */ - if (unaccounted & AV_CH_SIDE_LEFT) { - if (out_layout & AV_CH_BACK_LEFT) { - /* if back channels do not exist in the input, just copy side - channels to back channels, otherwise mix side into back */ - if (in_layout & AV_CH_BACK_LEFT) { - matrix[BACK_LEFT ][SIDE_LEFT ] += M_SQRT1_2; - matrix[BACK_RIGHT][SIDE_RIGHT] += M_SQRT1_2; - } else { - matrix[BACK_LEFT ][SIDE_LEFT ] += 1.0; - matrix[BACK_RIGHT][SIDE_RIGHT] += 1.0; - } - } else if (out_layout & AV_CH_BACK_CENTER) { - matrix[BACK_CENTER][SIDE_LEFT ] += M_SQRT1_2; - matrix[BACK_CENTER][SIDE_RIGHT] += M_SQRT1_2; - } else if (out_layout & AV_CH_FRONT_LEFT) { - if (matrix_encoding == AV_MATRIX_ENCODING_DOLBY) { - matrix[FRONT_LEFT ][SIDE_LEFT ] -= surround_mix_level * M_SQRT1_2; - matrix[FRONT_LEFT ][SIDE_RIGHT] -= surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][SIDE_LEFT ] += surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][SIDE_RIGHT] += surround_mix_level * M_SQRT1_2; - } else if (matrix_encoding == AV_MATRIX_ENCODING_DPLII) { - matrix[FRONT_LEFT ][SIDE_LEFT ] -= surround_mix_level * SQRT3_2; - matrix[FRONT_LEFT ][SIDE_RIGHT] -= surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][SIDE_LEFT ] += surround_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][SIDE_RIGHT] += surround_mix_level * SQRT3_2; - } else { - matrix[FRONT_LEFT ][SIDE_LEFT ] += surround_mix_level; - matrix[FRONT_RIGHT][SIDE_RIGHT] += surround_mix_level; - } - } else if (out_layout & AV_CH_FRONT_CENTER) { - matrix[FRONT_CENTER][SIDE_LEFT ] += surround_mix_level * M_SQRT1_2; - matrix[FRONT_CENTER][SIDE_RIGHT] += surround_mix_level * M_SQRT1_2; - } else - return AVERROR_PATCHWELCOME; - } - /* mix left-of-center/right-of-center into front left/right or center */ - if (unaccounted & AV_CH_FRONT_LEFT_OF_CENTER) { - if (out_layout & AV_CH_FRONT_LEFT) { - matrix[FRONT_LEFT ][FRONT_LEFT_OF_CENTER ] += 1.0; - matrix[FRONT_RIGHT][FRONT_RIGHT_OF_CENTER] += 1.0; - } else if (out_layout & AV_CH_FRONT_CENTER) { - matrix[FRONT_CENTER][FRONT_LEFT_OF_CENTER ] += M_SQRT1_2; - matrix[FRONT_CENTER][FRONT_RIGHT_OF_CENTER] += M_SQRT1_2; - } else - return AVERROR_PATCHWELCOME; - } - /* mix LFE into front left/right or center */ - if (unaccounted & AV_CH_LOW_FREQUENCY) { - if (out_layout & AV_CH_FRONT_CENTER) { - matrix[FRONT_CENTER][LOW_FREQUENCY] += lfe_mix_level; - } else if (out_layout & AV_CH_FRONT_LEFT) { - matrix[FRONT_LEFT ][LOW_FREQUENCY] += lfe_mix_level * M_SQRT1_2; - matrix[FRONT_RIGHT][LOW_FREQUENCY] += lfe_mix_level * M_SQRT1_2; - } else - return AVERROR_PATCHWELCOME; - } - - /* transfer internal matrix to output matrix and calculate maximum - per-channel coefficient sum */ - for (out_i = i = 0; out_i < out_channels && i < 64; i++) { - double sum = 0; - for (out_j = j = 0; out_j < in_channels && j < 64; j++) { - matrix_out[out_i * stride + out_j] = matrix[i][j]; - sum += fabs(matrix[i][j]); - if (in_layout & (1ULL << j)) - out_j++; - } - maxcoef = FFMAX(maxcoef, sum); - if (out_layout & (1ULL << i)) - out_i++; - } - - /* normalize */ - if (normalize && maxcoef > 1.0) { - for (i = 0; i < out_channels; i++) - for (j = 0; j < in_channels; j++) - matrix_out[i * stride + j] /= maxcoef; - } - - return 0; -} diff --git a/libavresample/avresample.h b/libavresample/avresample.h deleted file mode 100644 index 5ac9adb44b..0000000000 --- a/libavresample/avresample.h +++ /dev/null @@ -1,595 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_AVRESAMPLE_H -#define AVRESAMPLE_AVRESAMPLE_H - -/** - * @file - * @ingroup lavr - * external API header - */ - -/** - * @defgroup lavr libavresample - * @{ - * - * Libavresample (lavr) is a library that handles audio resampling, sample - * format conversion and mixing. - * - * Interaction with lavr is done through AVAudioResampleContext, which is - * allocated with avresample_alloc_context(). It is opaque, so all parameters - * must be set with the @ref avoptions API. - * - * For example the following code will setup conversion from planar float sample - * format to interleaved signed 16-bit integer, downsampling from 48kHz to - * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing - * matrix): - * @code - * AVAudioResampleContext *avr = avresample_alloc_context(); - * av_opt_set_int(avr, "in_channel_layout", AV_CH_LAYOUT_5POINT1, 0); - * av_opt_set_int(avr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); - * av_opt_set_int(avr, "in_sample_rate", 48000, 0); - * av_opt_set_int(avr, "out_sample_rate", 44100, 0); - * av_opt_set_int(avr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); - * av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); - * @endcode - * - * Once the context is initialized, it must be opened with avresample_open(). If - * you need to change the conversion parameters, you must close the context with - * avresample_close(), change the parameters as described above, then reopen it - * again. - * - * The conversion itself is done by repeatedly calling avresample_convert(). - * Note that the samples may get buffered in two places in lavr. The first one - * is the output FIFO, where the samples end up if the output buffer is not - * large enough. The data stored in there may be retrieved at any time with - * avresample_read(). The second place is the resampling delay buffer, - * applicable only when resampling is done. The samples in it require more input - * before they can be processed. Their current amount is returned by - * avresample_get_delay(). At the end of conversion the resampling buffer can be - * flushed by calling avresample_convert() with NULL input. - * - * The following code demonstrates the conversion loop assuming the parameters - * from above and caller-defined functions get_input() and handle_output(): - * @code - * uint8_t **input; - * int in_linesize, in_samples; - * - * while (get_input(&input, &in_linesize, &in_samples)) { - * uint8_t *output - * int out_linesize; - * int out_samples = avresample_get_out_samples(avr, in_samples); - * - * av_samples_alloc(&output, &out_linesize, 2, out_samples, - * AV_SAMPLE_FMT_S16, 0); - * out_samples = avresample_convert(avr, &output, out_linesize, out_samples, - * input, in_linesize, in_samples); - * handle_output(output, out_linesize, out_samples); - * av_freep(&output); - * } - * @endcode - * - * When the conversion is finished and the FIFOs are flushed if required, the - * conversion context and everything associated with it must be freed with - * avresample_free(). - */ - -#include "libavutil/avutil.h" -#include "libavutil/channel_layout.h" -#include "libavutil/dict.h" -#include "libavutil/frame.h" -#include "libavutil/log.h" -#include "libavutil/mathematics.h" - -#include "libavresample/version.h" - -#define AVRESAMPLE_MAX_CHANNELS 32 - -typedef struct AVAudioResampleContext AVAudioResampleContext; - -/** - * @deprecated use libswresample - * - * Mixing Coefficient Types */ -enum attribute_deprecated AVMixCoeffType { - AV_MIX_COEFF_TYPE_Q8, /** 16-bit 8.8 fixed-point */ - AV_MIX_COEFF_TYPE_Q15, /** 32-bit 17.15 fixed-point */ - AV_MIX_COEFF_TYPE_FLT, /** floating-point */ - AV_MIX_COEFF_TYPE_NB, /** Number of coeff types. Not part of ABI */ -}; - -/** - * @deprecated use libswresample - * - * Resampling Filter Types */ -enum attribute_deprecated AVResampleFilterType { - AV_RESAMPLE_FILTER_TYPE_CUBIC, /**< Cubic */ - AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall Windowed Sinc */ - AV_RESAMPLE_FILTER_TYPE_KAISER, /**< Kaiser Windowed Sinc */ -}; - -/** - * @deprecated use libswresample - */ -enum attribute_deprecated AVResampleDitherMethod { - AV_RESAMPLE_DITHER_NONE, /**< Do not use dithering */ - AV_RESAMPLE_DITHER_RECTANGULAR, /**< Rectangular Dither */ - AV_RESAMPLE_DITHER_TRIANGULAR, /**< Triangular Dither*/ - AV_RESAMPLE_DITHER_TRIANGULAR_HP, /**< Triangular Dither with High Pass */ - AV_RESAMPLE_DITHER_TRIANGULAR_NS, /**< Triangular Dither with Noise Shaping */ - AV_RESAMPLE_DITHER_NB, /**< Number of dither types. Not part of ABI. */ -}; - -/** - * - * @deprecated use libswresample - * - * Return the LIBAVRESAMPLE_VERSION_INT constant. - */ -attribute_deprecated -unsigned avresample_version(void); - -/** - * - * @deprecated use libswresample - * - * Return the libavresample build-time configuration. - * @return configure string - */ -attribute_deprecated -const char *avresample_configuration(void); - -/** - * - * @deprecated use libswresample - * - * Return the libavresample license. - */ -attribute_deprecated -const char *avresample_license(void); - -/** - * - * @deprecated use libswresample - * - * Get the AVClass for AVAudioResampleContext. - * - * Can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options - * without allocating a context. - * - * @see av_opt_find(). - * - * @return AVClass for AVAudioResampleContext - */ -attribute_deprecated -const AVClass *avresample_get_class(void); - -/** - * - * @deprecated use libswresample - * - * Allocate AVAudioResampleContext and set options. - * - * @return allocated audio resample context, or NULL on failure - */ -attribute_deprecated -AVAudioResampleContext *avresample_alloc_context(void); - -/** - * - * @deprecated use libswresample - * - * Initialize AVAudioResampleContext. - * @note The context must be configured using the AVOption API. - * @note The fields "in_channel_layout", "out_channel_layout", - * "in_sample_rate", "out_sample_rate", "in_sample_fmt", - * "out_sample_fmt" must be set. - * - * @see av_opt_set_int() - * @see av_opt_set_dict() - * @see av_get_default_channel_layout() - * - * @param avr audio resample context - * @return 0 on success, negative AVERROR code on failure - */ -attribute_deprecated -int avresample_open(AVAudioResampleContext *avr); - -/** - * - * @deprecated use libswresample - * - * Check whether an AVAudioResampleContext is open or closed. - * - * @param avr AVAudioResampleContext to check - * @return 1 if avr is open, 0 if avr is closed. - */ -attribute_deprecated -int avresample_is_open(AVAudioResampleContext *avr); - -/** - * - * @deprecated use libswresample - * - * Close AVAudioResampleContext. - * - * This closes the context, but it does not change the parameters. The context - * can be reopened with avresample_open(). It does, however, clear the output - * FIFO and any remaining leftover samples in the resampling delay buffer. If - * there was a custom matrix being used, that is also cleared. - * - * @see avresample_convert() - * @see avresample_set_matrix() - * - * @param avr audio resample context - */ -attribute_deprecated -void avresample_close(AVAudioResampleContext *avr); - -/** - * - * @deprecated use libswresample - * - * Free AVAudioResampleContext and associated AVOption values. - * - * This also calls avresample_close() before freeing. - * - * @param avr audio resample context - */ -attribute_deprecated -void avresample_free(AVAudioResampleContext **avr); - -/** - * - * @deprecated use libswresample - * - * Generate a channel mixing matrix. - * - * This function is the one used internally by libavresample for building the - * default mixing matrix. It is made public just as a utility function for - * building custom matrices. - * - * @param in_layout input channel layout - * @param out_layout output channel layout - * @param center_mix_level mix level for the center channel - * @param surround_mix_level mix level for the surround channel(s) - * @param lfe_mix_level mix level for the low-frequency effects channel - * @param normalize if 1, coefficients will be normalized to prevent - * overflow. if 0, coefficients will not be - * normalized. - * @param[out] matrix mixing coefficients; matrix[i + stride * o] is - * the weight of input channel i in output channel o. - * @param stride distance between adjacent input channels in the - * matrix array - * @param matrix_encoding matrixed stereo downmix mode (e.g. dplii) - * @return 0 on success, negative AVERROR code on failure - */ -attribute_deprecated -int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout, - double center_mix_level, double surround_mix_level, - double lfe_mix_level, int normalize, double *matrix, - int stride, enum AVMatrixEncoding matrix_encoding); - -/** - * - * @deprecated use libswresample - * - * Get the current channel mixing matrix. - * - * If no custom matrix has been previously set or the AVAudioResampleContext is - * not open, an error is returned. - * - * @param avr audio resample context - * @param matrix mixing coefficients; matrix[i + stride * o] is the weight of - * input channel i in output channel o. - * @param stride distance between adjacent input channels in the matrix array - * @return 0 on success, negative AVERROR code on failure - */ -attribute_deprecated -int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix, - int stride); - -/** - * - * @deprecated use libswresample - * - * Set channel mixing matrix. - * - * Allows for setting a custom mixing matrix, overriding the default matrix - * generated internally during avresample_open(). This function can be called - * anytime on an allocated context, either before or after calling - * avresample_open(), as long as the channel layouts have been set. - * avresample_convert() always uses the current matrix. - * Calling avresample_close() on the context will clear the current matrix. - * - * @see avresample_close() - * - * @param avr audio resample context - * @param matrix mixing coefficients; matrix[i + stride * o] is the weight of - * input channel i in output channel o. - * @param stride distance between adjacent input channels in the matrix array - * @return 0 on success, negative AVERROR code on failure - */ -attribute_deprecated -int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix, - int stride); - -/** - * - * @deprecated use libswresample - * - * Set a customized input channel mapping. - * - * This function can only be called when the allocated context is not open. - * Also, the input channel layout must have already been set. - * - * Calling avresample_close() on the context will clear the channel mapping. - * - * The map for each input channel specifies the channel index in the source to - * use for that particular channel, or -1 to mute the channel. Source channels - * can be duplicated by using the same index for multiple input channels. - * - * Examples: - * - * Reordering 5.1 AAC order (C,L,R,Ls,Rs,LFE) to FFmpeg order (L,R,C,LFE,Ls,Rs): - * { 1, 2, 0, 5, 3, 4 } - * - * Muting the 3rd channel in 4-channel input: - * { 0, 1, -1, 3 } - * - * Duplicating the left channel of stereo input: - * { 0, 0 } - * - * @param avr audio resample context - * @param channel_map customized input channel mapping - * @return 0 on success, negative AVERROR code on failure - */ -attribute_deprecated -int avresample_set_channel_mapping(AVAudioResampleContext *avr, - const int *channel_map); - -/** - * - * @deprecated use libswresample - * - * Set compensation for resampling. - * - * This can be called anytime after avresample_open(). If resampling is not - * automatically enabled because of a sample rate conversion, the - * "force_resampling" option must have been set to 1 when opening the context - * in order to use resampling compensation. - * - * @param avr audio resample context - * @param sample_delta compensation delta, in samples - * @param compensation_distance compensation distance, in samples - * @return 0 on success, negative AVERROR code on failure - */ -attribute_deprecated -int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta, - int compensation_distance); - -/** - * - * @deprecated use libswresample - * - * Provide the upper bound on the number of samples the configured - * conversion would output. - * - * @param avr audio resample context - * @param in_nb_samples number of input samples - * - * @return number of samples or AVERROR(EINVAL) if the value - * would exceed INT_MAX - */ -attribute_deprecated -int avresample_get_out_samples(AVAudioResampleContext *avr, int in_nb_samples); - -/** - * - * @deprecated use libswresample - * - * Convert input samples and write them to the output FIFO. - * - * The upper bound on the number of output samples can be obtained through - * avresample_get_out_samples(). - * - * The output data can be NULL or have fewer allocated samples than required. - * In this case, any remaining samples not written to the output will be added - * to an internal FIFO buffer, to be returned at the next call to this function - * or to avresample_read(). - * - * If converting sample rate, there may be data remaining in the internal - * resampling delay buffer. avresample_get_delay() tells the number of remaining - * samples. To get this data as output, call avresample_convert() with NULL - * input. - * - * At the end of the conversion process, there may be data remaining in the - * internal FIFO buffer. avresample_available() tells the number of remaining - * samples. To get this data as output, either call avresample_convert() with - * NULL input or call avresample_read(). - * - * @see avresample_get_out_samples() - * @see avresample_read() - * @see avresample_get_delay() - * - * @param avr audio resample context - * @param output output data pointers - * @param out_plane_size output plane size, in bytes. - * This can be 0 if unknown, but that will lead to - * optimized functions not being used directly on the - * output, which could slow down some conversions. - * @param out_samples maximum number of samples that the output buffer can hold - * @param input input data pointers - * @param in_plane_size input plane size, in bytes - * This can be 0 if unknown, but that will lead to - * optimized functions not being used directly on the - * input, which could slow down some conversions. - * @param in_samples number of input samples to convert - * @return number of samples written to the output buffer, - * not including converted samples added to the internal - * output FIFO - */ -attribute_deprecated -int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, - int out_plane_size, int out_samples, - uint8_t * const *input, int in_plane_size, - int in_samples); - -/** - * - * @deprecated use libswresample - * - * Return the number of samples currently in the resampling delay buffer. - * - * When resampling, there may be a delay between the input and output. Any - * unconverted samples in each call are stored internally in a delay buffer. - * This function allows the user to determine the current number of samples in - * the delay buffer, which can be useful for synchronization. - * - * @see avresample_convert() - * - * @param avr audio resample context - * @return number of samples currently in the resampling delay buffer - */ -attribute_deprecated -int avresample_get_delay(AVAudioResampleContext *avr); - -/** - * - * @deprecated use libswresample - * - * Return the number of available samples in the output FIFO. - * - * During conversion, if the user does not specify an output buffer or - * specifies an output buffer that is smaller than what is needed, remaining - * samples that are not written to the output are stored to an internal FIFO - * buffer. The samples in the FIFO can be read with avresample_read() or - * avresample_convert(). - * - * @see avresample_read() - * @see avresample_convert() - * - * @param avr audio resample context - * @return number of samples available for reading - */ -attribute_deprecated -int avresample_available(AVAudioResampleContext *avr); - -/** - * - * @deprecated use libswresample - * - * Read samples from the output FIFO. - * - * During conversion, if the user does not specify an output buffer or - * specifies an output buffer that is smaller than what is needed, remaining - * samples that are not written to the output are stored to an internal FIFO - * buffer. This function can be used to read samples from that internal FIFO. - * - * @see avresample_available() - * @see avresample_convert() - * - * @param avr audio resample context - * @param output output data pointers. May be NULL, in which case - * nb_samples of data is discarded from output FIFO. - * @param nb_samples number of samples to read from the FIFO - * @return the number of samples written to output - */ -attribute_deprecated -int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples); - -/** - * - * @deprecated use libswresample - * - * Convert the samples in the input AVFrame and write them to the output AVFrame. - * - * Input and output AVFrames must have channel_layout, sample_rate and format set. - * - * The upper bound on the number of output samples is obtained through - * avresample_get_out_samples(). - * - * If the output AVFrame does not have the data pointers allocated the nb_samples - * field will be set using avresample_get_out_samples() and av_frame_get_buffer() - * is called to allocate the frame. - * - * The output AVFrame can be NULL or have fewer allocated samples than required. - * In this case, any remaining samples not written to the output will be added - * to an internal FIFO buffer, to be returned at the next call to this function - * or to avresample_convert() or to avresample_read(). - * - * If converting sample rate, there may be data remaining in the internal - * resampling delay buffer. avresample_get_delay() tells the number of - * remaining samples. To get this data as output, call this function or - * avresample_convert() with NULL input. - * - * At the end of the conversion process, there may be data remaining in the - * internal FIFO buffer. avresample_available() tells the number of remaining - * samples. To get this data as output, either call this function or - * avresample_convert() with NULL input or call avresample_read(). - * - * If the AVAudioResampleContext configuration does not match the output and - * input AVFrame settings the conversion does not take place and depending on - * which AVFrame is not matching AVERROR_OUTPUT_CHANGED, AVERROR_INPUT_CHANGED - * or AVERROR_OUTPUT_CHANGED|AVERROR_INPUT_CHANGED is returned. - * - * @see avresample_get_out_samples() - * @see avresample_available() - * @see avresample_convert() - * @see avresample_read() - * @see avresample_get_delay() - * - * @param avr audio resample context - * @param output output AVFrame - * @param input input AVFrame - * @return 0 on success, AVERROR on failure or nonmatching - * configuration. - */ -attribute_deprecated -int avresample_convert_frame(AVAudioResampleContext *avr, - AVFrame *output, AVFrame *input); - -/** - * - * @deprecated use libswresample - * - * Configure or reconfigure the AVAudioResampleContext using the information - * provided by the AVFrames. - * - * The original resampling context is reset even on failure. - * The function calls avresample_close() internally if the context is open. - * - * @see avresample_open(); - * @see avresample_close(); - * - * @param avr audio resample context - * @param out output AVFrame - * @param in input AVFrame - * @return 0 on success, AVERROR on failure. - */ -attribute_deprecated -int avresample_config(AVAudioResampleContext *avr, AVFrame *out, AVFrame *in); - -/** - * @} - */ - -#endif /* AVRESAMPLE_AVRESAMPLE_H */ diff --git a/libavresample/avresampleres.rc b/libavresample/avresampleres.rc deleted file mode 100644 index e6d0d151e1..0000000000 --- a/libavresample/avresampleres.rc +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Windows resource file for libavresample - * - * Copyright (C) 2012 James Almer - * Copyright (C) 2013 Tiancheng "Timothy" Gu - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include "libavresample/version.h" -#include "libavutil/ffversion.h" -#include "config.h" - -1 VERSIONINFO -FILEVERSION LIBAVRESAMPLE_VERSION_MAJOR, LIBAVRESAMPLE_VERSION_MINOR, LIBAVRESAMPLE_VERSION_MICRO, 0 -PRODUCTVERSION LIBAVRESAMPLE_VERSION_MAJOR, LIBAVRESAMPLE_VERSION_MINOR, LIBAVRESAMPLE_VERSION_MICRO, 0 -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -{ - BLOCK "StringFileInfo" - { - BLOCK "040904B0" - { - VALUE "CompanyName", "FFmpeg Project" - VALUE "FileDescription", "Libav audio resampling library" - VALUE "FileVersion", AV_STRINGIFY(LIBAVRESAMPLE_VERSION) - VALUE "InternalName", "libavresample" - VALUE "LegalCopyright", "Copyright (C) 2000-" AV_STRINGIFY(CONFIG_THIS_YEAR) " FFmpeg Project" - VALUE "OriginalFilename", "avresample" BUILDSUF "-" AV_STRINGIFY(LIBAVRESAMPLE_VERSION_MAJOR) SLIBSUF - VALUE "ProductName", "FFmpeg" - VALUE "ProductVersion", FFMPEG_VERSION - } - } - - BLOCK "VarFileInfo" - { - VALUE "Translation", 0x0409, 0x04B0 - } -} diff --git a/libavresample/dither.c b/libavresample/dither.c deleted file mode 100644 index 2ae8d338be..0000000000 --- a/libavresample/dither.c +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * Triangular with Noise Shaping is based on opusfile. - * Copyright (c) 1994-2012 by the Xiph.Org Foundation and contributors - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * Dithered Audio Sample Quantization - * - * Converts from dbl, flt, or s32 to s16 using dithering. - */ - -#include -#include - -#include "libavutil/attributes.h" -#include "libavutil/common.h" -#include "libavutil/lfg.h" -#include "libavutil/mem.h" -#include "libavutil/samplefmt.h" -#include "audio_convert.h" -#include "dither.h" -#include "internal.h" - -typedef struct DitherState { - int mute; - unsigned int seed; - AVLFG lfg; - float *noise_buf; - int noise_buf_size; - int noise_buf_ptr; - float dither_a[4]; - float dither_b[4]; -} DitherState; - -struct DitherContext { - DitherDSPContext ddsp; - enum AVResampleDitherMethod method; - int apply_map; - ChannelMapInfo *ch_map_info; - - int mute_dither_threshold; // threshold for disabling dither - int mute_reset_threshold; // threshold for resetting noise shaping - const float *ns_coef_b; // noise shaping coeffs - const float *ns_coef_a; // noise shaping coeffs - - int channels; - DitherState *state; // dither states for each channel - - AudioData *flt_data; // input data in fltp - AudioData *s16_data; // dithered output in s16p - AudioConvert *ac_in; // converter for input to fltp - AudioConvert *ac_out; // converter for s16p to s16 (if needed) - - void (*quantize)(int16_t *dst, const float *src, float *dither, int len); - int samples_align; -}; - -/* mute threshold, in seconds */ -#define MUTE_THRESHOLD_SEC 0.000333 - -/* scale factor for 16-bit output. - The signal is attenuated slightly to avoid clipping */ -#define S16_SCALE 32753.0f - -/* scale to convert lfg from INT_MIN/INT_MAX to -0.5/0.5 */ -#define LFG_SCALE (1.0f / (2.0f * INT32_MAX)) - -/* noise shaping coefficients */ - -static const float ns_48_coef_b[4] = { - 2.2374f, -0.7339f, -0.1251f, -0.6033f -}; - -static const float ns_48_coef_a[4] = { - 0.9030f, 0.0116f, -0.5853f, -0.2571f -}; - -static const float ns_44_coef_b[4] = { - 2.2061f, -0.4707f, -0.2534f, -0.6213f -}; - -static const float ns_44_coef_a[4] = { - 1.0587f, 0.0676f, -0.6054f, -0.2738f -}; - -static void dither_int_to_float_rectangular_c(float *dst, int *src, int len) -{ - int i; - for (i = 0; i < len; i++) - dst[i] = src[i] * LFG_SCALE; -} - -static void dither_int_to_float_triangular_c(float *dst, int *src0, int len) -{ - int i; - int *src1 = src0 + len; - - for (i = 0; i < len; i++) { - float r = src0[i] * LFG_SCALE; - r += src1[i] * LFG_SCALE; - dst[i] = r; - } -} - -static void quantize_c(int16_t *dst, const float *src, float *dither, int len) -{ - int i; - for (i = 0; i < len; i++) - dst[i] = av_clip_int16(lrintf(src[i] * S16_SCALE + dither[i])); -} - -#define SQRT_1_6 0.40824829046386301723f - -static void dither_highpass_filter(float *src, int len) -{ - int i; - - /* filter is from libswresample in FFmpeg */ - for (i = 0; i < len - 2; i++) - src[i] = (-src[i] + 2 * src[i + 1] - src[i + 2]) * SQRT_1_6; -} - -static int generate_dither_noise(DitherContext *c, DitherState *state, - int min_samples) -{ - int i; - int nb_samples = FFALIGN(min_samples, 16) + 16; - int buf_samples = nb_samples * - (c->method == AV_RESAMPLE_DITHER_RECTANGULAR ? 1 : 2); - unsigned int *noise_buf_ui; - - av_freep(&state->noise_buf); - state->noise_buf_size = state->noise_buf_ptr = 0; - - state->noise_buf = av_malloc(buf_samples * sizeof(*state->noise_buf)); - if (!state->noise_buf) - return AVERROR(ENOMEM); - state->noise_buf_size = FFALIGN(min_samples, 16); - noise_buf_ui = (unsigned int *)state->noise_buf; - - av_lfg_init(&state->lfg, state->seed); - for (i = 0; i < buf_samples; i++) - noise_buf_ui[i] = av_lfg_get(&state->lfg); - - c->ddsp.dither_int_to_float(state->noise_buf, noise_buf_ui, nb_samples); - - if (c->method == AV_RESAMPLE_DITHER_TRIANGULAR_HP) - dither_highpass_filter(state->noise_buf, nb_samples); - - return 0; -} - -static void quantize_triangular_ns(DitherContext *c, DitherState *state, - int16_t *dst, const float *src, - int nb_samples) -{ - int i, j; - float *dither = &state->noise_buf[state->noise_buf_ptr]; - - if (state->mute > c->mute_reset_threshold) - memset(state->dither_a, 0, sizeof(state->dither_a)); - - for (i = 0; i < nb_samples; i++) { - float err = 0; - float sample = src[i] * S16_SCALE; - - for (j = 0; j < 4; j++) { - err += c->ns_coef_b[j] * state->dither_b[j] - - c->ns_coef_a[j] * state->dither_a[j]; - } - for (j = 3; j > 0; j--) { - state->dither_a[j] = state->dither_a[j - 1]; - state->dither_b[j] = state->dither_b[j - 1]; - } - state->dither_a[0] = err; - sample -= err; - - if (state->mute > c->mute_dither_threshold) { - dst[i] = av_clip_int16(lrintf(sample)); - state->dither_b[0] = 0; - } else { - dst[i] = av_clip_int16(lrintf(sample + dither[i])); - state->dither_b[0] = av_clipf(dst[i] - sample, -1.5f, 1.5f); - } - - state->mute++; - if (src[i]) - state->mute = 0; - } -} - -static int convert_samples(DitherContext *c, int16_t **dst, float * const *src, - int channels, int nb_samples) -{ - int ch, ret; - int aligned_samples = FFALIGN(nb_samples, 16); - - for (ch = 0; ch < channels; ch++) { - DitherState *state = &c->state[ch]; - - if (state->noise_buf_size < aligned_samples) { - ret = generate_dither_noise(c, state, nb_samples); - if (ret < 0) - return ret; - } else if (state->noise_buf_size - state->noise_buf_ptr < aligned_samples) { - state->noise_buf_ptr = 0; - } - - if (c->method == AV_RESAMPLE_DITHER_TRIANGULAR_NS) { - quantize_triangular_ns(c, state, dst[ch], src[ch], nb_samples); - } else { - c->quantize(dst[ch], src[ch], - &state->noise_buf[state->noise_buf_ptr], - FFALIGN(nb_samples, c->samples_align)); - } - - state->noise_buf_ptr += aligned_samples; - } - - return 0; -} - -int ff_convert_dither(DitherContext *c, AudioData *dst, AudioData *src) -{ - int ret; - AudioData *flt_data; - - /* output directly to dst if it is planar */ - if (dst->sample_fmt == AV_SAMPLE_FMT_S16P) - c->s16_data = dst; - else { - /* make sure s16_data is large enough for the output */ - ret = ff_audio_data_realloc(c->s16_data, src->nb_samples); - if (ret < 0) - return ret; - } - - if (src->sample_fmt != AV_SAMPLE_FMT_FLTP || c->apply_map) { - /* make sure flt_data is large enough for the input */ - ret = ff_audio_data_realloc(c->flt_data, src->nb_samples); - if (ret < 0) - return ret; - flt_data = c->flt_data; - } - - if (src->sample_fmt != AV_SAMPLE_FMT_FLTP) { - /* convert input samples to fltp and scale to s16 range */ - ret = ff_audio_convert(c->ac_in, flt_data, src); - if (ret < 0) - return ret; - } else if (c->apply_map) { - ret = ff_audio_data_copy(flt_data, src, c->ch_map_info); - if (ret < 0) - return ret; - } else { - flt_data = src; - } - - /* check alignment and padding constraints */ - if (c->method != AV_RESAMPLE_DITHER_TRIANGULAR_NS) { - int ptr_align = FFMIN(flt_data->ptr_align, c->s16_data->ptr_align); - int samples_align = FFMIN(flt_data->samples_align, c->s16_data->samples_align); - int aligned_len = FFALIGN(src->nb_samples, c->ddsp.samples_align); - - if (!(ptr_align % c->ddsp.ptr_align) && samples_align >= aligned_len) { - c->quantize = c->ddsp.quantize; - c->samples_align = c->ddsp.samples_align; - } else { - c->quantize = quantize_c; - c->samples_align = 1; - } - } - - ret = convert_samples(c, (int16_t **)c->s16_data->data, - (float * const *)flt_data->data, src->channels, - src->nb_samples); - if (ret < 0) - return ret; - - c->s16_data->nb_samples = src->nb_samples; - - /* interleave output to dst if needed */ - if (dst->sample_fmt == AV_SAMPLE_FMT_S16) { - ret = ff_audio_convert(c->ac_out, dst, c->s16_data); - if (ret < 0) - return ret; - } else - c->s16_data = NULL; - - return 0; -} - -void ff_dither_free(DitherContext **cp) -{ - DitherContext *c = *cp; - int ch; - - if (!c) - return; - ff_audio_data_free(&c->flt_data); - ff_audio_data_free(&c->s16_data); - ff_audio_convert_free(&c->ac_in); - ff_audio_convert_free(&c->ac_out); - for (ch = 0; ch < c->channels; ch++) - av_free(c->state[ch].noise_buf); - av_free(c->state); - av_freep(cp); -} - -static av_cold void dither_init(DitherDSPContext *ddsp, - enum AVResampleDitherMethod method) -{ - ddsp->quantize = quantize_c; - ddsp->ptr_align = 1; - ddsp->samples_align = 1; - - if (method == AV_RESAMPLE_DITHER_RECTANGULAR) - ddsp->dither_int_to_float = dither_int_to_float_rectangular_c; - else - ddsp->dither_int_to_float = dither_int_to_float_triangular_c; - - if (ARCH_X86) - ff_dither_init_x86(ddsp, method); -} - -DitherContext *ff_dither_alloc(AVAudioResampleContext *avr, - enum AVSampleFormat out_fmt, - enum AVSampleFormat in_fmt, - int channels, int sample_rate, int apply_map) -{ - AVLFG seed_gen; - DitherContext *c; - int ch; - - if (av_get_packed_sample_fmt(out_fmt) != AV_SAMPLE_FMT_S16 || - av_get_bytes_per_sample(in_fmt) <= 2) { - av_log(avr, AV_LOG_ERROR, "dithering %s to %s is not supported\n", - av_get_sample_fmt_name(in_fmt), av_get_sample_fmt_name(out_fmt)); - return NULL; - } - - c = av_mallocz(sizeof(*c)); - if (!c) - return NULL; - - c->apply_map = apply_map; - if (apply_map) - c->ch_map_info = &avr->ch_map_info; - - if (avr->dither_method == AV_RESAMPLE_DITHER_TRIANGULAR_NS && - sample_rate != 48000 && sample_rate != 44100) { - av_log(avr, AV_LOG_WARNING, "sample rate must be 48000 or 44100 Hz " - "for triangular_ns dither. using triangular_hp instead.\n"); - avr->dither_method = AV_RESAMPLE_DITHER_TRIANGULAR_HP; - } - c->method = avr->dither_method; - dither_init(&c->ddsp, c->method); - - if (c->method == AV_RESAMPLE_DITHER_TRIANGULAR_NS) { - if (sample_rate == 48000) { - c->ns_coef_b = ns_48_coef_b; - c->ns_coef_a = ns_48_coef_a; - } else { - c->ns_coef_b = ns_44_coef_b; - c->ns_coef_a = ns_44_coef_a; - } - } - - /* Either s16 or s16p output format is allowed, but s16p is used - internally, so we need to use a temp buffer and interleave if the output - format is s16 */ - if (out_fmt != AV_SAMPLE_FMT_S16P) { - c->s16_data = ff_audio_data_alloc(channels, 1024, AV_SAMPLE_FMT_S16P, - "dither s16 buffer"); - if (!c->s16_data) - goto fail; - - c->ac_out = ff_audio_convert_alloc(avr, out_fmt, AV_SAMPLE_FMT_S16P, - channels, sample_rate, 0); - if (!c->ac_out) - goto fail; - } - - if (in_fmt != AV_SAMPLE_FMT_FLTP || c->apply_map) { - c->flt_data = ff_audio_data_alloc(channels, 1024, AV_SAMPLE_FMT_FLTP, - "dither flt buffer"); - if (!c->flt_data) - goto fail; - } - if (in_fmt != AV_SAMPLE_FMT_FLTP) { - c->ac_in = ff_audio_convert_alloc(avr, AV_SAMPLE_FMT_FLTP, in_fmt, - channels, sample_rate, c->apply_map); - if (!c->ac_in) - goto fail; - } - - c->state = av_mallocz(channels * sizeof(*c->state)); - if (!c->state) - goto fail; - c->channels = channels; - - /* calculate thresholds for turning off dithering during periods of - silence to avoid replacing digital silence with quiet dither noise */ - c->mute_dither_threshold = lrintf(sample_rate * MUTE_THRESHOLD_SEC); - c->mute_reset_threshold = c->mute_dither_threshold * 4; - - /* initialize dither states */ - av_lfg_init(&seed_gen, 0xC0FFEE); - for (ch = 0; ch < channels; ch++) { - DitherState *state = &c->state[ch]; - state->mute = c->mute_reset_threshold + 1; - state->seed = av_lfg_get(&seed_gen); - generate_dither_noise(c, state, FFMAX(32768, sample_rate / 2)); - } - - return c; - -fail: - ff_dither_free(&c); - return NULL; -} diff --git a/libavresample/dither.h b/libavresample/dither.h deleted file mode 100644 index 72f09cbdde..0000000000 --- a/libavresample/dither.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_DITHER_H -#define AVRESAMPLE_DITHER_H - -#include "avresample.h" -#include "audio_data.h" - -typedef struct DitherContext DitherContext; - -typedef struct DitherDSPContext { - /** - * Convert samples from flt to s16 with added dither noise. - * - * @param dst destination float array, range -0.5 to 0.5 - * @param src source int array, range INT_MIN to INT_MAX. - * @param dither float dither noise array - * @param len number of samples - */ - void (*quantize)(int16_t *dst, const float *src, float *dither, int len); - - int ptr_align; ///< src and dst constraints for quantize() - int samples_align; ///< len constraints for quantize() - - /** - * Convert dither noise from int to float with triangular distribution. - * - * @param dst destination float array, range -0.5 to 0.5 - * constraints: 32-byte aligned - * @param src0 source int array, range INT_MIN to INT_MAX. - * the array size is len * 2 - * constraints: 32-byte aligned - * @param len number of output noise samples - * constraints: multiple of 16 - */ - void (*dither_int_to_float)(float *dst, int *src0, int len); -} DitherDSPContext; - -/** - * Allocate and initialize a DitherContext. - * - * The parameters in the AVAudioResampleContext are used to initialize the - * DitherContext. - * - * @param avr AVAudioResampleContext - * @return newly-allocated DitherContext - */ -DitherContext *ff_dither_alloc(AVAudioResampleContext *avr, - enum AVSampleFormat out_fmt, - enum AVSampleFormat in_fmt, - int channels, int sample_rate, int apply_map); - -/** - * Free a DitherContext. - * - * @param c DitherContext - */ -void ff_dither_free(DitherContext **c); - -/** - * Convert audio sample format with dithering. - * - * @param c DitherContext - * @param dst destination audio data - * @param src source audio data - * @return 0 if ok, negative AVERROR code on failure - */ -int ff_convert_dither(DitherContext *c, AudioData *dst, AudioData *src); - -/* arch-specific initialization functions */ - -void ff_dither_init_x86(DitherDSPContext *ddsp, - enum AVResampleDitherMethod method); - -#endif /* AVRESAMPLE_DITHER_H */ diff --git a/libavresample/internal.h b/libavresample/internal.h deleted file mode 100644 index 2fc3f6da67..0000000000 --- a/libavresample/internal.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_INTERNAL_H -#define AVRESAMPLE_INTERNAL_H - -#include "libavutil/audio_fifo.h" -#include "libavutil/log.h" -#include "libavutil/opt.h" -#include "libavutil/samplefmt.h" -#include "avresample.h" - -typedef struct AudioData AudioData; -typedef struct AudioConvert AudioConvert; -typedef struct AudioMix AudioMix; -typedef struct ResampleContext ResampleContext; - -enum RemapPoint { - REMAP_NONE, - REMAP_IN_COPY, - REMAP_IN_CONVERT, - REMAP_OUT_COPY, - REMAP_OUT_CONVERT, -}; - -typedef struct ChannelMapInfo { - int channel_map[AVRESAMPLE_MAX_CHANNELS]; /**< source index of each output channel, -1 if not remapped */ - int do_remap; /**< remap needed */ - int channel_copy[AVRESAMPLE_MAX_CHANNELS]; /**< dest index to copy from */ - int do_copy; /**< copy needed */ - int channel_zero[AVRESAMPLE_MAX_CHANNELS]; /**< dest index to zero */ - int do_zero; /**< zeroing needed */ - int input_map[AVRESAMPLE_MAX_CHANNELS]; /**< dest index of each input channel */ -} ChannelMapInfo; - -struct AVAudioResampleContext { - const AVClass *av_class; /**< AVClass for logging and AVOptions */ - - uint64_t in_channel_layout; /**< input channel layout */ - enum AVSampleFormat in_sample_fmt; /**< input sample format */ - int in_sample_rate; /**< input sample rate */ - uint64_t out_channel_layout; /**< output channel layout */ - enum AVSampleFormat out_sample_fmt; /**< output sample format */ - int out_sample_rate; /**< output sample rate */ - enum AVSampleFormat internal_sample_fmt; /**< internal sample format */ - enum AVMixCoeffType mix_coeff_type; /**< mixing coefficient type */ - double center_mix_level; /**< center mix level */ - double surround_mix_level; /**< surround mix level */ - double lfe_mix_level; /**< lfe mix level */ - int normalize_mix_level; /**< enable mix level normalization */ - int force_resampling; /**< force resampling */ - int filter_size; /**< length of each FIR filter in the resampling filterbank relative to the cutoff frequency */ - int phase_shift; /**< log2 of the number of entries in the resampling polyphase filterbank */ - int linear_interp; /**< if 1 then the resampling FIR filter will be linearly interpolated */ - double cutoff; /**< resampling cutoff frequency. 1.0 corresponds to half the output sample rate */ - enum AVResampleFilterType filter_type; /**< resampling filter type */ - int kaiser_beta; /**< beta value for Kaiser window (only applicable if filter_type == AV_FILTER_TYPE_KAISER) */ - enum AVResampleDitherMethod dither_method; /**< dither method */ - - int in_channels; /**< number of input channels */ - int out_channels; /**< number of output channels */ - int resample_channels; /**< number of channels used for resampling */ - int downmix_needed; /**< downmixing is needed */ - int upmix_needed; /**< upmixing is needed */ - int mixing_needed; /**< either upmixing or downmixing is needed */ - int resample_needed; /**< resampling is needed */ - int in_convert_needed; /**< input sample format conversion is needed */ - int out_convert_needed; /**< output sample format conversion is needed */ - int in_copy_needed; /**< input data copy is needed */ - - AudioData *in_buffer; /**< buffer for converted input */ - AudioData *resample_out_buffer; /**< buffer for output from resampler */ - AudioData *out_buffer; /**< buffer for converted output */ - AVAudioFifo *out_fifo; /**< FIFO for output samples */ - - AudioConvert *ac_in; /**< input sample format conversion context */ - AudioConvert *ac_out; /**< output sample format conversion context */ - ResampleContext *resample; /**< resampling context */ - AudioMix *am; /**< channel mixing context */ - enum AVMatrixEncoding matrix_encoding; /**< matrixed stereo encoding */ - - /** - * mix matrix - * only used if avresample_set_matrix() is called before avresample_open() - */ - double *mix_matrix; - - int use_channel_map; - enum RemapPoint remap_point; - ChannelMapInfo ch_map_info; -}; - - -void ff_audio_resample_init_aarch64(ResampleContext *c, - enum AVSampleFormat sample_fmt); -void ff_audio_resample_init_arm(ResampleContext *c, - enum AVSampleFormat sample_fmt); - -#endif /* AVRESAMPLE_INTERNAL_H */ diff --git a/libavresample/libavresample.v b/libavresample/libavresample.v deleted file mode 100644 index d6fc7512ba..0000000000 --- a/libavresample/libavresample.v +++ /dev/null @@ -1,6 +0,0 @@ -LIBAVRESAMPLE_MAJOR { - global: - av*; - local: - *; -}; diff --git a/libavresample/options.c b/libavresample/options.c deleted file mode 100644 index 5f08cd7e52..0000000000 --- a/libavresample/options.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "libavutil/mathematics.h" -#include "libavutil/mem.h" -#include "libavutil/opt.h" -#include "avresample.h" -#include "internal.h" -#include "audio_mix.h" - -/** - * @file - * Options definition for AVAudioResampleContext. - */ - -#define OFFSET(x) offsetof(AVAudioResampleContext, x) -#define PARAM AV_OPT_FLAG_AUDIO_PARAM - -static const AVOption avresample_options[] = { - { "in_channel_layout", "Input Channel Layout", OFFSET(in_channel_layout), AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX, PARAM }, - { "in_sample_fmt", "Input Sample Format", OFFSET(in_sample_fmt), AV_OPT_TYPE_INT, { .i64 = AV_SAMPLE_FMT_S16 }, AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NB-1, PARAM }, - { "in_sample_rate", "Input Sample Rate", OFFSET(in_sample_rate), AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM }, - { "out_channel_layout", "Output Channel Layout", OFFSET(out_channel_layout), AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX, PARAM }, - { "out_sample_fmt", "Output Sample Format", OFFSET(out_sample_fmt), AV_OPT_TYPE_INT, { .i64 = AV_SAMPLE_FMT_S16 }, AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NB-1, PARAM }, - { "out_sample_rate", "Output Sample Rate", OFFSET(out_sample_rate), AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM }, - { "internal_sample_fmt", "Internal Sample Format", OFFSET(internal_sample_fmt), AV_OPT_TYPE_INT, { .i64 = AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE, AV_SAMPLE_FMT_NB-1, PARAM, "internal_sample_fmt" }, - {"u8" , "8-bit unsigned integer", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_U8 }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"s16", "16-bit signed integer", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_S16 }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"s32", "32-bit signed integer", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_S32 }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"flt", "32-bit float", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_FLT }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"dbl", "64-bit double", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_DBL }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"u8p" , "8-bit unsigned integer planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_U8P }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"s16p", "16-bit signed integer planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_S16P }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"s32p", "32-bit signed integer planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_S32P }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"fltp", "32-bit float planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_FLTP }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - {"dblp", "64-bit double planar", 0, AV_OPT_TYPE_CONST, {.i64 = AV_SAMPLE_FMT_DBLP }, INT_MIN, INT_MAX, PARAM, "internal_sample_fmt"}, - { "mix_coeff_type", "Mixing Coefficient Type", OFFSET(mix_coeff_type), AV_OPT_TYPE_INT, { .i64 = AV_MIX_COEFF_TYPE_FLT }, AV_MIX_COEFF_TYPE_Q8, AV_MIX_COEFF_TYPE_NB-1, PARAM, "mix_coeff_type" }, - { "q8", "16-bit 8.8 Fixed-Point", 0, AV_OPT_TYPE_CONST, { .i64 = AV_MIX_COEFF_TYPE_Q8 }, INT_MIN, INT_MAX, PARAM, "mix_coeff_type" }, - { "q15", "32-bit 17.15 Fixed-Point", 0, AV_OPT_TYPE_CONST, { .i64 = AV_MIX_COEFF_TYPE_Q15 }, INT_MIN, INT_MAX, PARAM, "mix_coeff_type" }, - { "flt", "Floating-Point", 0, AV_OPT_TYPE_CONST, { .i64 = AV_MIX_COEFF_TYPE_FLT }, INT_MIN, INT_MAX, PARAM, "mix_coeff_type" }, - { "center_mix_level", "Center Mix Level", OFFSET(center_mix_level), AV_OPT_TYPE_DOUBLE, { .dbl = M_SQRT1_2 }, -32.0, 32.0, PARAM }, - { "surround_mix_level", "Surround Mix Level", OFFSET(surround_mix_level), AV_OPT_TYPE_DOUBLE, { .dbl = M_SQRT1_2 }, -32.0, 32.0, PARAM }, - { "lfe_mix_level", "LFE Mix Level", OFFSET(lfe_mix_level), AV_OPT_TYPE_DOUBLE, { .dbl = 0.0 }, -32.0, 32.0, PARAM }, - { "normalize_mix_level", "Normalize Mix Level", OFFSET(normalize_mix_level), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, PARAM }, - { "force_resampling", "Force Resampling", OFFSET(force_resampling), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, PARAM }, - { "filter_size", "Resampling Filter Size", OFFSET(filter_size), AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 32, /* ??? */ PARAM }, - { "phase_shift", "Resampling Phase Shift", OFFSET(phase_shift), AV_OPT_TYPE_INT, { .i64 = 10 }, 0, 30, /* ??? */ PARAM }, - { "linear_interp", "Use Linear Interpolation", OFFSET(linear_interp), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, PARAM }, - { "cutoff", "Cutoff Frequency Ratio", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, { .dbl = 0.8 }, 0.0, 1.0, PARAM }, - /* duplicate option in order to work with avconv */ - { "resample_cutoff", "Cutoff Frequency Ratio", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, { .dbl = 0.8 }, 0.0, 1.0, PARAM }, - { "matrix_encoding", "Matrixed Stereo Encoding", OFFSET(matrix_encoding), AV_OPT_TYPE_INT, {.i64 = AV_MATRIX_ENCODING_NONE}, AV_MATRIX_ENCODING_NONE, AV_MATRIX_ENCODING_NB-1, PARAM, "matrix_encoding" }, - { "none", "None", 0, AV_OPT_TYPE_CONST, { .i64 = AV_MATRIX_ENCODING_NONE }, INT_MIN, INT_MAX, PARAM, "matrix_encoding" }, - { "dolby", "Dolby", 0, AV_OPT_TYPE_CONST, { .i64 = AV_MATRIX_ENCODING_DOLBY }, INT_MIN, INT_MAX, PARAM, "matrix_encoding" }, - { "dplii", "Dolby Pro Logic II", 0, AV_OPT_TYPE_CONST, { .i64 = AV_MATRIX_ENCODING_DPLII }, INT_MIN, INT_MAX, PARAM, "matrix_encoding" }, - { "filter_type", "Filter Type", OFFSET(filter_type), AV_OPT_TYPE_INT, { .i64 = AV_RESAMPLE_FILTER_TYPE_KAISER }, AV_RESAMPLE_FILTER_TYPE_CUBIC, AV_RESAMPLE_FILTER_TYPE_KAISER, PARAM, "filter_type" }, - { "cubic", "Cubic", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_FILTER_TYPE_CUBIC }, INT_MIN, INT_MAX, PARAM, "filter_type" }, - { "blackman_nuttall", "Blackman Nuttall Windowed Sinc", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL }, INT_MIN, INT_MAX, PARAM, "filter_type" }, - { "kaiser", "Kaiser Windowed Sinc", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_FILTER_TYPE_KAISER }, INT_MIN, INT_MAX, PARAM, "filter_type" }, - { "kaiser_beta", "Kaiser Window Beta", OFFSET(kaiser_beta), AV_OPT_TYPE_INT, { .i64 = 9 }, 2, 16, PARAM }, - { "dither_method", "Dither Method", OFFSET(dither_method), AV_OPT_TYPE_INT, { .i64 = AV_RESAMPLE_DITHER_NONE }, 0, AV_RESAMPLE_DITHER_NB-1, PARAM, "dither_method"}, - {"none", "No Dithering", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_DITHER_NONE }, INT_MIN, INT_MAX, PARAM, "dither_method"}, - {"rectangular", "Rectangular Dither", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_DITHER_RECTANGULAR }, INT_MIN, INT_MAX, PARAM, "dither_method"}, - {"triangular", "Triangular Dither", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_DITHER_TRIANGULAR }, INT_MIN, INT_MAX, PARAM, "dither_method"}, - {"triangular_hp", "Triangular Dither With High Pass", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_DITHER_TRIANGULAR_HP }, INT_MIN, INT_MAX, PARAM, "dither_method"}, - {"triangular_ns", "Triangular Dither With Noise Shaping", 0, AV_OPT_TYPE_CONST, { .i64 = AV_RESAMPLE_DITHER_TRIANGULAR_NS }, INT_MIN, INT_MAX, PARAM, "dither_method"}, - { NULL }, -}; - -static const AVClass av_resample_context_class = { - .class_name = "AVAudioResampleContext", - .item_name = av_default_item_name, - .option = avresample_options, - .version = LIBAVUTIL_VERSION_INT, -}; - -AVAudioResampleContext *avresample_alloc_context(void) -{ - AVAudioResampleContext *avr; - - avr = av_mallocz(sizeof(*avr)); - if (!avr) - return NULL; - - avr->av_class = &av_resample_context_class; - av_opt_set_defaults(avr); - - return avr; -} - -const AVClass *avresample_get_class(void) -{ - return &av_resample_context_class; -} diff --git a/libavresample/resample.c b/libavresample/resample.c deleted file mode 100644 index dc14cc2d2a..0000000000 --- a/libavresample/resample.c +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Copyright (c) 2004 Michael Niedermayer - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavutil/common.h" -#include "libavutil/libm.h" -#include "libavutil/log.h" -#include "internal.h" -#include "resample.h" -#include "audio_data.h" - - -/* double template */ -#define CONFIG_RESAMPLE_DBL -#include "resample_template.c" -#undef CONFIG_RESAMPLE_DBL - -/* float template */ -#define CONFIG_RESAMPLE_FLT -#include "resample_template.c" -#undef CONFIG_RESAMPLE_FLT - -/* s32 template */ -#define CONFIG_RESAMPLE_S32 -#include "resample_template.c" -#undef CONFIG_RESAMPLE_S32 - -/* s16 template */ -#include "resample_template.c" - - -/* 0th order modified Bessel function of the first kind. */ -static double bessel(double x) -{ - double v = 1; - double lastv = 0; - double t = 1; - int i; - - x = x * x / 4; - for (i = 1; v != lastv; i++) { - lastv = v; - t *= x / (i * i); - v += t; - } - return v; -} - -/* Build a polyphase filterbank. */ -static int build_filter(ResampleContext *c, double factor) -{ - int ph, i; - double x, y, w; - double *tab; - int tap_count = c->filter_length; - int phase_count = 1 << c->phase_shift; - const int center = (tap_count - 1) / 2; - - tab = av_malloc(tap_count * sizeof(*tab)); - if (!tab) - return AVERROR(ENOMEM); - - for (ph = 0; ph < phase_count; ph++) { - double norm = 0; - for (i = 0; i < tap_count; i++) { - x = M_PI * ((double)(i - center) - (double)ph / phase_count) * factor; - if (x == 0) y = 1.0; - else y = sin(x) / x; - switch (c->filter_type) { - case AV_RESAMPLE_FILTER_TYPE_CUBIC: { - const float d = -0.5; //first order derivative = -0.5 - x = fabs(((double)(i - center) - (double)ph / phase_count) * factor); - if (x < 1.0) y = 1 - 3 * x*x + 2 * x*x*x + d * ( -x*x + x*x*x); - else y = d * (-4 + 8 * x - 5 * x*x + x*x*x); - break; - } - case AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL: - w = 2.0 * x / (factor * tap_count) + M_PI; - y *= 0.3635819 - 0.4891775 * cos( w) + - 0.1365995 * cos(2 * w) - - 0.0106411 * cos(3 * w); - break; - case AV_RESAMPLE_FILTER_TYPE_KAISER: - w = 2.0 * x / (factor * tap_count * M_PI); - y *= bessel(c->kaiser_beta * sqrt(FFMAX(1 - w * w, 0))); - break; - } - - tab[i] = y; - norm += y; - } - /* normalize so that an uniform color remains the same */ - for (i = 0; i < tap_count; i++) - tab[i] = tab[i] / norm; - - c->set_filter(c->filter_bank, tab, ph, tap_count); - } - - av_free(tab); - return 0; -} - -ResampleContext *ff_audio_resample_init(AVAudioResampleContext *avr) -{ - ResampleContext *c; - int out_rate = avr->out_sample_rate; - int in_rate = avr->in_sample_rate; - double factor = FFMIN(out_rate * avr->cutoff / in_rate, 1.0); - int phase_count = 1 << avr->phase_shift; - int felem_size; - - if (avr->internal_sample_fmt != AV_SAMPLE_FMT_S16P && - avr->internal_sample_fmt != AV_SAMPLE_FMT_S32P && - avr->internal_sample_fmt != AV_SAMPLE_FMT_FLTP && - avr->internal_sample_fmt != AV_SAMPLE_FMT_DBLP) { - av_log(avr, AV_LOG_ERROR, "Unsupported internal format for " - "resampling: %s\n", - av_get_sample_fmt_name(avr->internal_sample_fmt)); - return NULL; - } - c = av_mallocz(sizeof(*c)); - if (!c) - return NULL; - - c->avr = avr; - c->phase_shift = avr->phase_shift; - c->phase_mask = phase_count - 1; - c->linear = avr->linear_interp; - c->filter_length = FFMAX((int)ceil(avr->filter_size / factor), 1); - c->filter_type = avr->filter_type; - c->kaiser_beta = avr->kaiser_beta; - - switch (avr->internal_sample_fmt) { - case AV_SAMPLE_FMT_DBLP: - c->resample_one = c->linear ? resample_linear_dbl : resample_one_dbl; - c->resample_nearest = resample_nearest_dbl; - c->set_filter = set_filter_dbl; - break; - case AV_SAMPLE_FMT_FLTP: - c->resample_one = c->linear ? resample_linear_flt : resample_one_flt; - c->resample_nearest = resample_nearest_flt; - c->set_filter = set_filter_flt; - break; - case AV_SAMPLE_FMT_S32P: - c->resample_one = c->linear ? resample_linear_s32 : resample_one_s32; - c->resample_nearest = resample_nearest_s32; - c->set_filter = set_filter_s32; - break; - case AV_SAMPLE_FMT_S16P: - c->resample_one = c->linear ? resample_linear_s16 : resample_one_s16; - c->resample_nearest = resample_nearest_s16; - c->set_filter = set_filter_s16; - break; - } - - if (ARCH_AARCH64) - ff_audio_resample_init_aarch64(c, avr->internal_sample_fmt); - if (ARCH_ARM) - ff_audio_resample_init_arm(c, avr->internal_sample_fmt); - - felem_size = av_get_bytes_per_sample(avr->internal_sample_fmt); - c->filter_bank = av_mallocz(c->filter_length * (phase_count + 1) * felem_size); - if (!c->filter_bank) - goto error; - - if (build_filter(c, factor) < 0) - goto error; - - memcpy(&c->filter_bank[(c->filter_length * phase_count + 1) * felem_size], - c->filter_bank, (c->filter_length - 1) * felem_size); - memcpy(&c->filter_bank[c->filter_length * phase_count * felem_size], - &c->filter_bank[(c->filter_length - 1) * felem_size], felem_size); - - c->compensation_distance = 0; - if (!av_reduce(&c->src_incr, &c->dst_incr, out_rate, - in_rate * (int64_t)phase_count, INT32_MAX / 2)) - goto error; - c->ideal_dst_incr = c->dst_incr; - - c->padding_size = (c->filter_length - 1) / 2; - c->initial_padding_filled = 0; - c->index = 0; - c->frac = 0; - - /* allocate internal buffer */ - c->buffer = ff_audio_data_alloc(avr->resample_channels, c->padding_size, - avr->internal_sample_fmt, - "resample buffer"); - if (!c->buffer) - goto error; - c->buffer->nb_samples = c->padding_size; - c->initial_padding_samples = c->padding_size; - - av_log(avr, AV_LOG_DEBUG, "resample: %s from %d Hz to %d Hz\n", - av_get_sample_fmt_name(avr->internal_sample_fmt), - avr->in_sample_rate, avr->out_sample_rate); - - return c; - -error: - ff_audio_data_free(&c->buffer); - av_free(c->filter_bank); - av_free(c); - return NULL; -} - -void ff_audio_resample_free(ResampleContext **c) -{ - if (!*c) - return; - ff_audio_data_free(&(*c)->buffer); - av_free((*c)->filter_bank); - av_freep(c); -} - -int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta, - int compensation_distance) -{ - ResampleContext *c; - - if (compensation_distance < 0) - return AVERROR(EINVAL); - if (!compensation_distance && sample_delta) - return AVERROR(EINVAL); - - if (!avr->resample_needed) { - av_log(avr, AV_LOG_ERROR, "Unable to set resampling compensation\n"); - return AVERROR(EINVAL); - } - c = avr->resample; - c->compensation_distance = compensation_distance; - if (compensation_distance) { - c->dst_incr = c->ideal_dst_incr - c->ideal_dst_incr * - (int64_t)sample_delta / compensation_distance; - } else { - c->dst_incr = c->ideal_dst_incr; - } - - return 0; -} - -static int resample(ResampleContext *c, void *dst, const void *src, - int *consumed, int src_size, int dst_size, int update_ctx, - int nearest_neighbour) -{ - int dst_index; - unsigned int index = c->index; - int frac = c->frac; - int dst_incr_frac = c->dst_incr % c->src_incr; - int dst_incr = c->dst_incr / c->src_incr; - int compensation_distance = c->compensation_distance; - - if (!dst != !src) - return AVERROR(EINVAL); - - if (nearest_neighbour) { - uint64_t index2 = ((uint64_t)index) << 32; - int64_t incr = (1LL << 32) * c->dst_incr / c->src_incr; - dst_size = FFMIN(dst_size, - (src_size-1-index) * (int64_t)c->src_incr / - c->dst_incr); - - if (dst) { - for(dst_index = 0; dst_index < dst_size; dst_index++) { - c->resample_nearest(dst, dst_index, src, index2 >> 32); - index2 += incr; - } - } else { - dst_index = dst_size; - } - index += dst_index * dst_incr; - index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr; - frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr; - } else { - for (dst_index = 0; dst_index < dst_size; dst_index++) { - int sample_index = index >> c->phase_shift; - - if (sample_index + c->filter_length > src_size) - break; - - if (dst) - c->resample_one(c, dst, dst_index, src, index, frac); - - frac += dst_incr_frac; - index += dst_incr; - if (frac >= c->src_incr) { - frac -= c->src_incr; - index++; - } - if (dst_index + 1 == compensation_distance) { - compensation_distance = 0; - dst_incr_frac = c->ideal_dst_incr % c->src_incr; - dst_incr = c->ideal_dst_incr / c->src_incr; - } - } - } - if (consumed) - *consumed = index >> c->phase_shift; - - if (update_ctx) { - index &= c->phase_mask; - - if (compensation_distance) { - compensation_distance -= dst_index; - if (compensation_distance <= 0) - return AVERROR_BUG; - } - c->frac = frac; - c->index = index; - c->dst_incr = dst_incr_frac + c->src_incr*dst_incr; - c->compensation_distance = compensation_distance; - } - - return dst_index; -} - -int ff_audio_resample(ResampleContext *c, AudioData *dst, AudioData *src) -{ - int ch, in_samples, in_leftover, consumed = 0, out_samples = 0; - int ret = AVERROR(EINVAL); - int nearest_neighbour = (c->compensation_distance == 0 && - c->filter_length == 1 && - c->phase_shift == 0); - - in_samples = src ? src->nb_samples : 0; - in_leftover = c->buffer->nb_samples; - - /* add input samples to the internal buffer */ - if (src) { - ret = ff_audio_data_combine(c->buffer, in_leftover, src, 0, in_samples); - if (ret < 0) - return ret; - } else if (in_leftover <= c->final_padding_samples) { - /* no remaining samples to flush */ - return 0; - } - - if (!c->initial_padding_filled) { - int bps = av_get_bytes_per_sample(c->avr->internal_sample_fmt); - int i; - - if (src && c->buffer->nb_samples < 2 * c->padding_size) - return 0; - - for (i = 0; i < c->padding_size; i++) - for (ch = 0; ch < c->buffer->channels; ch++) { - if (c->buffer->nb_samples > 2 * c->padding_size - i) { - memcpy(c->buffer->data[ch] + bps * i, - c->buffer->data[ch] + bps * (2 * c->padding_size - i), bps); - } else { - memset(c->buffer->data[ch] + bps * i, 0, bps); - } - } - c->initial_padding_filled = 1; - } - - if (!src && !c->final_padding_filled) { - int bps = av_get_bytes_per_sample(c->avr->internal_sample_fmt); - int i; - - ret = ff_audio_data_realloc(c->buffer, - FFMAX(in_samples, in_leftover) + - c->padding_size); - if (ret < 0) { - av_log(c->avr, AV_LOG_ERROR, "Error reallocating resampling buffer\n"); - return AVERROR(ENOMEM); - } - - for (i = 0; i < c->padding_size; i++) - for (ch = 0; ch < c->buffer->channels; ch++) { - if (in_leftover > i) { - memcpy(c->buffer->data[ch] + bps * (in_leftover + i), - c->buffer->data[ch] + bps * (in_leftover - i - 1), - bps); - } else { - memset(c->buffer->data[ch] + bps * (in_leftover + i), - 0, bps); - } - } - c->buffer->nb_samples += c->padding_size; - c->final_padding_samples = c->padding_size; - c->final_padding_filled = 1; - } - - - /* calculate output size and reallocate output buffer if needed */ - /* TODO: try to calculate this without the dummy resample() run */ - if (!dst->read_only && dst->allow_realloc) { - out_samples = resample(c, NULL, NULL, NULL, c->buffer->nb_samples, - INT_MAX, 0, nearest_neighbour); - ret = ff_audio_data_realloc(dst, out_samples); - if (ret < 0) { - av_log(c->avr, AV_LOG_ERROR, "error reallocating output\n"); - return ret; - } - } - - /* resample each channel plane */ - for (ch = 0; ch < c->buffer->channels; ch++) { - out_samples = resample(c, (void *)dst->data[ch], - (const void *)c->buffer->data[ch], &consumed, - c->buffer->nb_samples, dst->allocated_samples, - ch + 1 == c->buffer->channels, nearest_neighbour); - } - if (out_samples < 0) { - av_log(c->avr, AV_LOG_ERROR, "error during resampling\n"); - return out_samples; - } - - /* drain consumed samples from the internal buffer */ - ff_audio_data_drain(c->buffer, consumed); - c->initial_padding_samples = FFMAX(c->initial_padding_samples - consumed, 0); - - av_log(c->avr, AV_LOG_TRACE, "resampled %d in + %d leftover to %d out + %d leftover\n", - in_samples, in_leftover, out_samples, c->buffer->nb_samples); - - dst->nb_samples = out_samples; - return 0; -} - -int avresample_get_delay(AVAudioResampleContext *avr) -{ - ResampleContext *c = avr->resample; - - if (!avr->resample_needed || !avr->resample) - return 0; - - return FFMAX(c->buffer->nb_samples - c->padding_size, 0); -} diff --git a/libavresample/resample.h b/libavresample/resample.h deleted file mode 100644 index be9f562791..0000000000 --- a/libavresample/resample.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2004 Michael Niedermayer - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_RESAMPLE_H -#define AVRESAMPLE_RESAMPLE_H - -#include "avresample.h" -#include "internal.h" -#include "audio_data.h" - -struct ResampleContext { - AVAudioResampleContext *avr; - AudioData *buffer; - uint8_t *filter_bank; - int filter_length; - int ideal_dst_incr; - int dst_incr; - unsigned int index; - int frac; - int src_incr; - int compensation_distance; - int phase_shift; - int phase_mask; - int linear; - enum AVResampleFilterType filter_type; - int kaiser_beta; - void (*set_filter)(void *filter, double *tab, int phase, int tap_count); - void (*resample_one)(struct ResampleContext *c, void *dst0, - int dst_index, const void *src0, - unsigned int index, int frac); - void (*resample_nearest)(void *dst0, int dst_index, - const void *src0, unsigned int index); - int padding_size; - int initial_padding_filled; - int initial_padding_samples; - int final_padding_filled; - int final_padding_samples; -}; - -/** - * Allocate and initialize a ResampleContext. - * - * The parameters in the AVAudioResampleContext are used to initialize the - * ResampleContext. - * - * @param avr AVAudioResampleContext - * @return newly-allocated ResampleContext - */ -ResampleContext *ff_audio_resample_init(AVAudioResampleContext *avr); - -/** - * Free a ResampleContext. - * - * @param c ResampleContext - */ -void ff_audio_resample_free(ResampleContext **c); - -/** - * Resample audio data. - * - * Changes the sample rate. - * - * @par - * All samples in the source data may not be consumed depending on the - * resampling parameters and the size of the output buffer. The unconsumed - * samples are automatically added to the start of the source in the next call. - * If the destination data can be reallocated, that may be done in this function - * in order to fit all available output. If it cannot be reallocated, fewer - * input samples will be consumed in order to have the output fit in the - * destination data buffers. - * - * @param c ResampleContext - * @param dst destination audio data - * @param src source audio data - * @return 0 on success, negative AVERROR code on failure - */ -int ff_audio_resample(ResampleContext *c, AudioData *dst, AudioData *src); - -#endif /* AVRESAMPLE_RESAMPLE_H */ diff --git a/libavresample/resample_template.c b/libavresample/resample_template.c deleted file mode 100644 index 863852a3fd..0000000000 --- a/libavresample/resample_template.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2004 Michael Niedermayer - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include - -#include "libavutil/common.h" -#include "internal.h" - -#if defined(CONFIG_RESAMPLE_DBL) -#define SET_TYPE(func) func ## _dbl -#define FELEM double -#define FELEM2 double -#define FELEML double -#define OUT(d, v) d = v -#define DBL_TO_FELEM(d, v) d = v -#elif defined(CONFIG_RESAMPLE_FLT) -#define SET_TYPE(func) func ## _flt -#define FELEM float -#define FELEM2 float -#define FELEML float -#define OUT(d, v) d = v -#define DBL_TO_FELEM(d, v) d = v -#elif defined(CONFIG_RESAMPLE_S32) -#define SET_TYPE(func) func ## _s32 -#define FELEM int32_t -#define FELEM2 int64_t -#define FELEML int64_t -#define OUT(d, v) d = av_clipl_int32((v + (1 << 29)) >> 30) -#define DBL_TO_FELEM(d, v) d = av_clipl_int32(llrint(v * (1 << 30))); -#else -#define SET_TYPE(func) func ## _s16 -#define FELEM int16_t -#define FELEM2 int32_t -#define FELEML int64_t -#define OUT(d, v) d = av_clip_int16((v + (1 << 14)) >> 15) -#define DBL_TO_FELEM(d, v) d = av_clip_int16(lrint(v * (1 << 15))) -#endif - -static void SET_TYPE(resample_nearest)(void *dst0, int dst_index, const void *src0, unsigned int index) -{ - FELEM *dst = dst0; - const FELEM *src = src0; - dst[dst_index] = src[index]; -} - -static void SET_TYPE(resample_linear)(ResampleContext *c, void *dst0, int dst_index, - const void *src0, unsigned int index, int frac) -{ - FELEM *dst = dst0; - const FELEM *src = src0; - int i; - unsigned int sample_index = index >> c->phase_shift; - FELEM2 val = 0; - FELEM *filter = ((FELEM *)c->filter_bank) + - c->filter_length * (index & c->phase_mask); - FELEM2 v2 = 0; - - for (i = 0; i < c->filter_length; i++) { - val += src[sample_index + i] * (FELEM2)filter[i]; - v2 += src[sample_index + i] * (FELEM2)filter[i + c->filter_length]; - } - val += (v2 - val) * (FELEML)frac / c->src_incr; - - OUT(dst[dst_index], val); -} - -static void SET_TYPE(resample_one)(ResampleContext *c, - void *dst0, int dst_index, const void *src0, - unsigned int index, int frac) -{ - FELEM *dst = dst0; - const FELEM *src = src0; - int i; - unsigned int sample_index = index >> c->phase_shift; - FELEM2 val = 0; - FELEM *filter = ((FELEM *)c->filter_bank) + - c->filter_length * (index & c->phase_mask); - - for (i = 0; i < c->filter_length; i++) - val += src[sample_index + i] * (FELEM2)filter[i]; - - OUT(dst[dst_index], val); -} - -static void SET_TYPE(set_filter)(void *filter0, double *tab, int phase, - int tap_count) -{ - int i; - FELEM *filter = ((FELEM *)filter0) + phase * tap_count; - for (i = 0; i < tap_count; i++) { - DBL_TO_FELEM(filter[i], tab[i]); - } -} - -#undef SET_TYPE -#undef FELEM -#undef FELEM2 -#undef FELEML -#undef OUT -#undef DBL_TO_FELEM diff --git a/libavresample/tests/.gitignore b/libavresample/tests/.gitignore deleted file mode 100644 index 1e15871d54..0000000000 --- a/libavresample/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/avresample diff --git a/libavresample/tests/avresample.c b/libavresample/tests/avresample.c deleted file mode 100644 index 8c377bae84..0000000000 --- a/libavresample/tests/avresample.c +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright (c) 2002 Fabrice Bellard - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include - -#include "libavutil/avstring.h" -#include "libavutil/common.h" -#include "libavutil/lfg.h" -#include "libavutil/libm.h" -#include "libavutil/log.h" -#include "libavutil/mem.h" -#include "libavutil/opt.h" -#include "libavutil/samplefmt.h" - -#include "libavresample/avresample.h" - -static double dbl_rand(AVLFG *lfg) -{ - return 2.0 * (av_lfg_get(lfg) / (double)UINT_MAX) - 1.0; -} - -#define PUT_FUNC(name, fmt, type, expr) \ -static void put_sample_ ## name(void **data, enum AVSampleFormat sample_fmt,\ - int channels, int sample, int ch, \ - double v_dbl) \ -{ \ - type v = expr; \ - type **out = (type **)data; \ - if (av_sample_fmt_is_planar(sample_fmt)) \ - out[ch][sample] = v; \ - else \ - out[0][sample * channels + ch] = v; \ -} - -PUT_FUNC(u8, AV_SAMPLE_FMT_U8, uint8_t, av_clip_uint8 ( lrint(v_dbl * (1 << 7)) + 128)) -PUT_FUNC(s16, AV_SAMPLE_FMT_S16, int16_t, av_clip_int16 ( lrint(v_dbl * (1 << 15)))) -PUT_FUNC(s32, AV_SAMPLE_FMT_S32, int32_t, av_clipl_int32(llrint(v_dbl * (1U << 31)))) -PUT_FUNC(flt, AV_SAMPLE_FMT_FLT, float, v_dbl) -PUT_FUNC(dbl, AV_SAMPLE_FMT_DBL, double, v_dbl) - -static void put_sample(void **data, enum AVSampleFormat sample_fmt, - int channels, int sample, int ch, double v_dbl) -{ - switch (av_get_packed_sample_fmt(sample_fmt)) { - case AV_SAMPLE_FMT_U8: - put_sample_u8(data, sample_fmt, channels, sample, ch, v_dbl); - break; - case AV_SAMPLE_FMT_S16: - put_sample_s16(data, sample_fmt, channels, sample, ch, v_dbl); - break; - case AV_SAMPLE_FMT_S32: - put_sample_s32(data, sample_fmt, channels, sample, ch, v_dbl); - break; - case AV_SAMPLE_FMT_FLT: - put_sample_flt(data, sample_fmt, channels, sample, ch, v_dbl); - break; - case AV_SAMPLE_FMT_DBL: - put_sample_dbl(data, sample_fmt, channels, sample, ch, v_dbl); - break; - } -} - -static void audiogen(AVLFG *rnd, void **data, enum AVSampleFormat sample_fmt, - int channels, int sample_rate, int nb_samples) -{ - int i, ch, k; - double v, f, a, ampa; - double tabf1[AVRESAMPLE_MAX_CHANNELS]; - double tabf2[AVRESAMPLE_MAX_CHANNELS]; - double taba[AVRESAMPLE_MAX_CHANNELS]; - -#define PUT_SAMPLE put_sample(data, sample_fmt, channels, k, ch, v); - - k = 0; - - /* 1 second of single freq sine at 1000 Hz */ - a = 0; - for (i = 0; i < 1 * sample_rate && k < nb_samples; i++, k++) { - v = sin(a) * 0.30; - for (ch = 0; ch < channels; ch++) - PUT_SAMPLE - a += M_PI * 1000.0 * 2.0 / sample_rate; - } - - /* 1 second of varying frequency between 100 and 10000 Hz */ - a = 0; - for (i = 0; i < 1 * sample_rate && k < nb_samples; i++, k++) { - v = sin(a) * 0.30; - for (ch = 0; ch < channels; ch++) - PUT_SAMPLE - f = 100.0 + (((10000.0 - 100.0) * i) / sample_rate); - a += M_PI * f * 2.0 / sample_rate; - } - - /* 0.5 second of low amplitude white noise */ - for (i = 0; i < sample_rate / 2 && k < nb_samples; i++, k++) { - v = dbl_rand(rnd) * 0.30; - for (ch = 0; ch < channels; ch++) - PUT_SAMPLE - } - - /* 0.5 second of high amplitude white noise */ - for (i = 0; i < sample_rate / 2 && k < nb_samples; i++, k++) { - v = dbl_rand(rnd); - for (ch = 0; ch < channels; ch++) - PUT_SAMPLE - } - - /* 1 second of unrelated ramps for each channel */ - for (ch = 0; ch < channels; ch++) { - taba[ch] = 0; - tabf1[ch] = 100 + av_lfg_get(rnd) % 5000; - tabf2[ch] = 100 + av_lfg_get(rnd) % 5000; - } - for (i = 0; i < 1 * sample_rate && k < nb_samples; i++, k++) { - for (ch = 0; ch < channels; ch++) { - v = sin(taba[ch]) * 0.30; - PUT_SAMPLE - f = tabf1[ch] + (((tabf2[ch] - tabf1[ch]) * i) / sample_rate); - taba[ch] += M_PI * f * 2.0 / sample_rate; - } - } - - /* 2 seconds of 500 Hz with varying volume */ - a = 0; - ampa = 0; - for (i = 0; i < 2 * sample_rate && k < nb_samples; i++, k++) { - for (ch = 0; ch < channels; ch++) { - double amp = (1.0 + sin(ampa)) * 0.15; - if (ch & 1) - amp = 0.30 - amp; - v = sin(a) * amp; - PUT_SAMPLE - a += M_PI * 500.0 * 2.0 / sample_rate; - ampa += M_PI * 2.0 / sample_rate; - } - } -} - -/* formats, rates, and layouts are ordered for priority in testing. - e.g. 'avresample-test 4 2 2' will test all input/output combinations of - S16/FLTP/S16P/FLT, 48000/44100, and stereo/mono */ - -static const enum AVSampleFormat formats[] = { - AV_SAMPLE_FMT_S16, - AV_SAMPLE_FMT_FLTP, - AV_SAMPLE_FMT_S16P, - AV_SAMPLE_FMT_FLT, - AV_SAMPLE_FMT_S32P, - AV_SAMPLE_FMT_S32, - AV_SAMPLE_FMT_U8P, - AV_SAMPLE_FMT_U8, - AV_SAMPLE_FMT_DBLP, - AV_SAMPLE_FMT_DBL, -}; - -static const int rates[] = { - 48000, - 44100, - 16000 -}; - -static const uint64_t layouts[] = { - AV_CH_LAYOUT_STEREO, - AV_CH_LAYOUT_MONO, - AV_CH_LAYOUT_5POINT1, - AV_CH_LAYOUT_7POINT1, -}; - -int main(int argc, char **argv) -{ - AVAudioResampleContext *s; - AVLFG rnd; - int ret = 0; - uint8_t *in_buf = NULL; - uint8_t *out_buf = NULL; - unsigned int in_buf_size; - unsigned int out_buf_size; - uint8_t *in_data[AVRESAMPLE_MAX_CHANNELS] = { 0 }; - uint8_t *out_data[AVRESAMPLE_MAX_CHANNELS] = { 0 }; - int in_linesize; - int out_linesize; - uint64_t in_ch_layout; - int in_channels; - enum AVSampleFormat in_fmt; - int in_rate; - uint64_t out_ch_layout; - int out_channels; - enum AVSampleFormat out_fmt; - int out_rate; - int num_formats, num_rates, num_layouts; - int i, j, k, l, m, n; - - num_formats = 2; - num_rates = 2; - num_layouts = 2; - if (argc > 1) { - if (!av_strncasecmp(argv[1], "-h", 3)) { - av_log(NULL, AV_LOG_INFO, "Usage: avresample-test [ " - "[ []]]\n" - "Default is 2 2 2\n"); - return 0; - } - num_formats = strtol(argv[1], NULL, 0); - num_formats = av_clip(num_formats, 1, FF_ARRAY_ELEMS(formats)); - } - if (argc > 2) { - num_rates = strtol(argv[2], NULL, 0); - num_rates = av_clip(num_rates, 1, FF_ARRAY_ELEMS(rates)); - } - if (argc > 3) { - num_layouts = strtol(argv[3], NULL, 0); - num_layouts = av_clip(num_layouts, 1, FF_ARRAY_ELEMS(layouts)); - } - - av_log_set_level(AV_LOG_DEBUG); - - av_lfg_init(&rnd, 0xC0FFEE); - - in_buf_size = av_samples_get_buffer_size(&in_linesize, 8, 48000 * 6, - AV_SAMPLE_FMT_DBLP, 0); - out_buf_size = in_buf_size; - - in_buf = av_malloc(in_buf_size); - if (!in_buf) - goto end; - out_buf = av_malloc(out_buf_size); - if (!out_buf) - goto end; - - s = avresample_alloc_context(); - if (!s) { - av_log(NULL, AV_LOG_ERROR, "Error allocating AVAudioResampleContext\n"); - ret = 1; - goto end; - } - - for (i = 0; i < num_formats; i++) { - in_fmt = formats[i]; - for (k = 0; k < num_layouts; k++) { - in_ch_layout = layouts[k]; - in_channels = av_get_channel_layout_nb_channels(in_ch_layout); - for (m = 0; m < num_rates; m++) { - in_rate = rates[m]; - - ret = av_samples_fill_arrays(in_data, &in_linesize, in_buf, - in_channels, in_rate * 6, - in_fmt, 0); - if (ret < 0) { - av_log(s, AV_LOG_ERROR, "failed in_data fill arrays\n"); - goto end; - } - audiogen(&rnd, (void **)in_data, in_fmt, in_channels, in_rate, in_rate * 6); - - for (j = 0; j < num_formats; j++) { - out_fmt = formats[j]; - for (l = 0; l < num_layouts; l++) { - out_ch_layout = layouts[l]; - out_channels = av_get_channel_layout_nb_channels(out_ch_layout); - for (n = 0; n < num_rates; n++) { - out_rate = rates[n]; - - av_log(NULL, AV_LOG_INFO, "%s to %s, %d to %d channels, %d Hz to %d Hz\n", - av_get_sample_fmt_name(in_fmt), av_get_sample_fmt_name(out_fmt), - in_channels, out_channels, in_rate, out_rate); - - ret = av_samples_fill_arrays(out_data, &out_linesize, - out_buf, out_channels, - out_rate * 6, out_fmt, 0); - if (ret < 0) { - av_log(s, AV_LOG_ERROR, "failed out_data fill arrays\n"); - goto end; - } - - av_opt_set_int(s, "in_channel_layout", in_ch_layout, 0); - av_opt_set_int(s, "in_sample_fmt", in_fmt, 0); - av_opt_set_int(s, "in_sample_rate", in_rate, 0); - av_opt_set_int(s, "out_channel_layout", out_ch_layout, 0); - av_opt_set_int(s, "out_sample_fmt", out_fmt, 0); - av_opt_set_int(s, "out_sample_rate", out_rate, 0); - - av_opt_set_int(s, "internal_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); - - ret = avresample_open(s); - if (ret < 0) { - av_log(s, AV_LOG_ERROR, "Error opening context\n"); - goto end; - } - - ret = avresample_convert(s, out_data, out_linesize, out_rate * 6, - in_data, in_linesize, in_rate * 6); - if (ret < 0) { - char errbuf[256]; - av_strerror(ret, errbuf, sizeof(errbuf)); - av_log(NULL, AV_LOG_ERROR, "%s\n", errbuf); - goto end; - } - av_log(NULL, AV_LOG_INFO, "Converted %d samples to %d samples\n", - in_rate * 6, ret); - if (avresample_get_delay(s) > 0) - av_log(NULL, AV_LOG_INFO, "%d delay samples not converted\n", - avresample_get_delay(s)); - if (avresample_available(s) > 0) - av_log(NULL, AV_LOG_INFO, "%d samples available for output\n", - avresample_available(s)); - av_log(NULL, AV_LOG_INFO, "\n"); - - avresample_close(s); - } - } - } - } - } - } - - ret = 0; - -end: - av_freep(&in_buf); - av_freep(&out_buf); - avresample_free(&s); - return ret; -} diff --git a/libavresample/utils.c b/libavresample/utils.c deleted file mode 100644 index b4fb906556..0000000000 --- a/libavresample/utils.c +++ /dev/null @@ -1,793 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavutil/common.h" -#include "libavutil/dict.h" -// #include "libavutil/error.h" -#include "libavutil/frame.h" -#include "libavutil/log.h" -#include "libavutil/mem.h" -#include "libavutil/opt.h" - -#include "avresample.h" -#include "internal.h" -#include "audio_data.h" -#include "audio_convert.h" -#include "audio_mix.h" -#include "resample.h" - -int avresample_open(AVAudioResampleContext *avr) -{ - int ret; - - if (avresample_is_open(avr)) { - av_log(avr, AV_LOG_ERROR, "The resampling context is already open.\n"); - return AVERROR(EINVAL); - } - - /* set channel mixing parameters */ - avr->in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout); - if (avr->in_channels <= 0 || avr->in_channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(avr, AV_LOG_ERROR, "Invalid input channel layout: %"PRIu64"\n", - avr->in_channel_layout); - return AVERROR(EINVAL); - } - avr->out_channels = av_get_channel_layout_nb_channels(avr->out_channel_layout); - if (avr->out_channels <= 0 || avr->out_channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(avr, AV_LOG_ERROR, "Invalid output channel layout: %"PRIu64"\n", - avr->out_channel_layout); - return AVERROR(EINVAL); - } - avr->resample_channels = FFMIN(avr->in_channels, avr->out_channels); - avr->downmix_needed = avr->in_channels > avr->out_channels; - avr->upmix_needed = avr->out_channels > avr->in_channels || - (!avr->downmix_needed && (avr->mix_matrix || - avr->in_channel_layout != avr->out_channel_layout)); - avr->mixing_needed = avr->downmix_needed || avr->upmix_needed; - - /* set resampling parameters */ - avr->resample_needed = avr->in_sample_rate != avr->out_sample_rate || - avr->force_resampling; - - /* select internal sample format if not specified by the user */ - if (avr->internal_sample_fmt == AV_SAMPLE_FMT_NONE && - (avr->mixing_needed || avr->resample_needed)) { - enum AVSampleFormat in_fmt = av_get_planar_sample_fmt(avr->in_sample_fmt); - enum AVSampleFormat out_fmt = av_get_planar_sample_fmt(avr->out_sample_fmt); - int max_bps = FFMAX(av_get_bytes_per_sample(in_fmt), - av_get_bytes_per_sample(out_fmt)); - if (max_bps <= 2) { - avr->internal_sample_fmt = AV_SAMPLE_FMT_S16P; - } else if (avr->mixing_needed) { - avr->internal_sample_fmt = AV_SAMPLE_FMT_FLTP; - } else { - if (max_bps <= 4) { - if (in_fmt == AV_SAMPLE_FMT_S32P || - out_fmt == AV_SAMPLE_FMT_S32P) { - if (in_fmt == AV_SAMPLE_FMT_FLTP || - out_fmt == AV_SAMPLE_FMT_FLTP) { - /* if one is s32 and the other is flt, use dbl */ - avr->internal_sample_fmt = AV_SAMPLE_FMT_DBLP; - } else { - /* if one is s32 and the other is s32, s16, or u8, use s32 */ - avr->internal_sample_fmt = AV_SAMPLE_FMT_S32P; - } - } else { - /* if one is flt and the other is flt, s16 or u8, use flt */ - avr->internal_sample_fmt = AV_SAMPLE_FMT_FLTP; - } - } else { - /* if either is dbl, use dbl */ - avr->internal_sample_fmt = AV_SAMPLE_FMT_DBLP; - } - } - av_log(avr, AV_LOG_DEBUG, "Using %s as internal sample format\n", - av_get_sample_fmt_name(avr->internal_sample_fmt)); - } - - /* we may need to add an extra conversion in order to remap channels if - the output format is not planar */ - if (avr->use_channel_map && !avr->mixing_needed && !avr->resample_needed && - !ff_sample_fmt_is_planar(avr->out_sample_fmt, avr->out_channels)) { - avr->internal_sample_fmt = av_get_planar_sample_fmt(avr->out_sample_fmt); - } - - /* set sample format conversion parameters */ - if (avr->resample_needed || avr->mixing_needed) - avr->in_convert_needed = avr->in_sample_fmt != avr->internal_sample_fmt; - else - avr->in_convert_needed = avr->use_channel_map && - !ff_sample_fmt_is_planar(avr->out_sample_fmt, avr->out_channels); - - if (avr->resample_needed || avr->mixing_needed || avr->in_convert_needed) - avr->out_convert_needed = avr->internal_sample_fmt != avr->out_sample_fmt; - else - avr->out_convert_needed = avr->in_sample_fmt != avr->out_sample_fmt; - - avr->in_copy_needed = !avr->in_convert_needed && (avr->mixing_needed || - (avr->use_channel_map && avr->resample_needed)); - - if (avr->use_channel_map) { - if (avr->in_copy_needed) { - avr->remap_point = REMAP_IN_COPY; - av_log(avr, AV_LOG_TRACE, "remap channels during in_copy\n"); - } else if (avr->in_convert_needed) { - avr->remap_point = REMAP_IN_CONVERT; - av_log(avr, AV_LOG_TRACE, "remap channels during in_convert\n"); - } else if (avr->out_convert_needed) { - avr->remap_point = REMAP_OUT_CONVERT; - av_log(avr, AV_LOG_TRACE, "remap channels during out_convert\n"); - } else { - avr->remap_point = REMAP_OUT_COPY; - av_log(avr, AV_LOG_TRACE, "remap channels during out_copy\n"); - } - -#ifdef DEBUG - { - int ch; - av_log(avr, AV_LOG_TRACE, "output map: "); - if (avr->ch_map_info.do_remap) - for (ch = 0; ch < avr->in_channels; ch++) - av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_map[ch]); - else - av_log(avr, AV_LOG_TRACE, "n/a"); - av_log(avr, AV_LOG_TRACE, "\n"); - av_log(avr, AV_LOG_TRACE, "copy map: "); - if (avr->ch_map_info.do_copy) - for (ch = 0; ch < avr->in_channels; ch++) - av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_copy[ch]); - else - av_log(avr, AV_LOG_TRACE, "n/a"); - av_log(avr, AV_LOG_TRACE, "\n"); - av_log(avr, AV_LOG_TRACE, "zero map: "); - if (avr->ch_map_info.do_zero) - for (ch = 0; ch < avr->in_channels; ch++) - av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_zero[ch]); - else - av_log(avr, AV_LOG_TRACE, "n/a"); - av_log(avr, AV_LOG_TRACE, "\n"); - av_log(avr, AV_LOG_TRACE, "input map: "); - for (ch = 0; ch < avr->in_channels; ch++) - av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.input_map[ch]); - av_log(avr, AV_LOG_TRACE, "\n"); - } -#endif - } else - avr->remap_point = REMAP_NONE; - - /* allocate buffers */ - if (avr->in_copy_needed || avr->in_convert_needed) { - avr->in_buffer = ff_audio_data_alloc(FFMAX(avr->in_channels, avr->out_channels), - 0, avr->internal_sample_fmt, - "in_buffer"); - if (!avr->in_buffer) { - ret = AVERROR(EINVAL); - goto error; - } - } - if (avr->resample_needed) { - avr->resample_out_buffer = ff_audio_data_alloc(avr->out_channels, - 1024, avr->internal_sample_fmt, - "resample_out_buffer"); - if (!avr->resample_out_buffer) { - ret = AVERROR(EINVAL); - goto error; - } - } - if (avr->out_convert_needed) { - avr->out_buffer = ff_audio_data_alloc(avr->out_channels, 0, - avr->out_sample_fmt, "out_buffer"); - if (!avr->out_buffer) { - ret = AVERROR(EINVAL); - goto error; - } - } - avr->out_fifo = av_audio_fifo_alloc(avr->out_sample_fmt, avr->out_channels, - 1024); - if (!avr->out_fifo) { - ret = AVERROR(ENOMEM); - goto error; - } - - /* setup contexts */ - if (avr->in_convert_needed) { - avr->ac_in = ff_audio_convert_alloc(avr, avr->internal_sample_fmt, - avr->in_sample_fmt, avr->in_channels, - avr->in_sample_rate, - avr->remap_point == REMAP_IN_CONVERT); - if (!avr->ac_in) { - ret = AVERROR(ENOMEM); - goto error; - } - } - if (avr->out_convert_needed) { - enum AVSampleFormat src_fmt; - if (avr->in_convert_needed) - src_fmt = avr->internal_sample_fmt; - else - src_fmt = avr->in_sample_fmt; - avr->ac_out = ff_audio_convert_alloc(avr, avr->out_sample_fmt, src_fmt, - avr->out_channels, - avr->out_sample_rate, - avr->remap_point == REMAP_OUT_CONVERT); - if (!avr->ac_out) { - ret = AVERROR(ENOMEM); - goto error; - } - } - if (avr->resample_needed) { - avr->resample = ff_audio_resample_init(avr); - if (!avr->resample) { - ret = AVERROR(ENOMEM); - goto error; - } - } - if (avr->mixing_needed) { - avr->am = ff_audio_mix_alloc(avr); - if (!avr->am) { - ret = AVERROR(ENOMEM); - goto error; - } - } - - return 0; - -error: - avresample_close(avr); - return ret; -} - -int avresample_is_open(AVAudioResampleContext *avr) -{ - return !!avr->out_fifo; -} - -void avresample_close(AVAudioResampleContext *avr) -{ - ff_audio_data_free(&avr->in_buffer); - ff_audio_data_free(&avr->resample_out_buffer); - ff_audio_data_free(&avr->out_buffer); - av_audio_fifo_free(avr->out_fifo); - avr->out_fifo = NULL; - ff_audio_convert_free(&avr->ac_in); - ff_audio_convert_free(&avr->ac_out); - ff_audio_resample_free(&avr->resample); - ff_audio_mix_free(&avr->am); - av_freep(&avr->mix_matrix); - - avr->use_channel_map = 0; -} - -void avresample_free(AVAudioResampleContext **avr) -{ - if (!*avr) - return; - avresample_close(*avr); - av_opt_free(*avr); - av_freep(avr); -} - -static int handle_buffered_output(AVAudioResampleContext *avr, - AudioData *output, AudioData *converted) -{ - int ret; - - if (!output || av_audio_fifo_size(avr->out_fifo) > 0 || - (converted && output->allocated_samples < converted->nb_samples)) { - if (converted) { - /* if there are any samples in the output FIFO or if the - user-supplied output buffer is not large enough for all samples, - we add to the output FIFO */ - av_log(avr, AV_LOG_TRACE, "[FIFO] add %s to out_fifo\n", converted->name); - ret = ff_audio_data_add_to_fifo(avr->out_fifo, converted, 0, - converted->nb_samples); - if (ret < 0) - return ret; - } - - /* if the user specified an output buffer, read samples from the output - FIFO to the user output */ - if (output && output->allocated_samples > 0) { - av_log(avr, AV_LOG_TRACE, "[FIFO] read from out_fifo to output\n"); - av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); - return ff_audio_data_read_from_fifo(avr->out_fifo, output, - output->allocated_samples); - } - } else if (converted) { - /* copy directly to output if it is large enough or there is not any - data in the output FIFO */ - av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", converted->name); - output->nb_samples = 0; - ret = ff_audio_data_copy(output, converted, - avr->remap_point == REMAP_OUT_COPY ? - &avr->ch_map_info : NULL); - if (ret < 0) - return ret; - av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); - return output->nb_samples; - } - av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); - return 0; -} - -int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, - uint8_t **output, int out_plane_size, - int out_samples, - uint8_t * const *input, - int in_plane_size, int in_samples) -{ - AudioData input_buffer; - AudioData output_buffer; - AudioData *current_buffer; - int ret, direct_output; - - /* reset internal buffers */ - if (avr->in_buffer) { - avr->in_buffer->nb_samples = 0; - ff_audio_data_set_channels(avr->in_buffer, - avr->in_buffer->allocated_channels); - } - if (avr->resample_out_buffer) { - avr->resample_out_buffer->nb_samples = 0; - ff_audio_data_set_channels(avr->resample_out_buffer, - avr->resample_out_buffer->allocated_channels); - } - if (avr->out_buffer) { - avr->out_buffer->nb_samples = 0; - ff_audio_data_set_channels(avr->out_buffer, - avr->out_buffer->allocated_channels); - } - - av_log(avr, AV_LOG_TRACE, "[start conversion]\n"); - - /* initialize output_buffer with output data */ - direct_output = output && av_audio_fifo_size(avr->out_fifo) == 0; - if (output) { - ret = ff_audio_data_init(&output_buffer, output, out_plane_size, - avr->out_channels, out_samples, - avr->out_sample_fmt, 0, "output"); - if (ret < 0) - return ret; - output_buffer.nb_samples = 0; - } - - if (input) { - /* initialize input_buffer with input data */ - ret = ff_audio_data_init(&input_buffer, input, in_plane_size, - avr->in_channels, in_samples, - avr->in_sample_fmt, 1, "input"); - if (ret < 0) - return ret; - current_buffer = &input_buffer; - - if (avr->upmix_needed && !avr->in_convert_needed && !avr->resample_needed && - !avr->out_convert_needed && direct_output && out_samples >= in_samples) { - /* in some rare cases we can copy input to output and upmix - directly in the output buffer */ - av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", current_buffer->name); - ret = ff_audio_data_copy(&output_buffer, current_buffer, - avr->remap_point == REMAP_OUT_COPY ? - &avr->ch_map_info : NULL); - if (ret < 0) - return ret; - current_buffer = &output_buffer; - } else if (avr->remap_point == REMAP_OUT_COPY && - (!direct_output || out_samples < in_samples)) { - /* if remapping channels during output copy, we may need to - * use an intermediate buffer in order to remap before adding - * samples to the output fifo */ - av_log(avr, AV_LOG_TRACE, "[copy] %s to out_buffer\n", current_buffer->name); - ret = ff_audio_data_copy(avr->out_buffer, current_buffer, - &avr->ch_map_info); - if (ret < 0) - return ret; - current_buffer = avr->out_buffer; - } else if (avr->in_copy_needed || avr->in_convert_needed) { - /* if needed, copy or convert input to in_buffer, and downmix if - applicable */ - if (avr->in_convert_needed) { - ret = ff_audio_data_realloc(avr->in_buffer, - current_buffer->nb_samples); - if (ret < 0) - return ret; - av_log(avr, AV_LOG_TRACE, "[convert] %s to in_buffer\n", current_buffer->name); - ret = ff_audio_convert(avr->ac_in, avr->in_buffer, - current_buffer); - if (ret < 0) - return ret; - } else { - av_log(avr, AV_LOG_TRACE, "[copy] %s to in_buffer\n", current_buffer->name); - ret = ff_audio_data_copy(avr->in_buffer, current_buffer, - avr->remap_point == REMAP_IN_COPY ? - &avr->ch_map_info : NULL); - if (ret < 0) - return ret; - } - ff_audio_data_set_channels(avr->in_buffer, avr->in_channels); - if (avr->downmix_needed) { - av_log(avr, AV_LOG_TRACE, "[downmix] in_buffer\n"); - ret = ff_audio_mix(avr->am, avr->in_buffer); - if (ret < 0) - return ret; - } - current_buffer = avr->in_buffer; - } - } else { - /* flush resampling buffer and/or output FIFO if input is NULL */ - if (!avr->resample_needed) - return handle_buffered_output(avr, output ? &output_buffer : NULL, - NULL); - current_buffer = NULL; - } - - if (avr->resample_needed) { - AudioData *resample_out; - - if (!avr->out_convert_needed && direct_output && out_samples > 0) - resample_out = &output_buffer; - else - resample_out = avr->resample_out_buffer; - av_log(avr, AV_LOG_TRACE, "[resample] %s to %s\n", - current_buffer ? current_buffer->name : "null", - resample_out->name); - ret = ff_audio_resample(avr->resample, resample_out, - current_buffer); - if (ret < 0) - return ret; - - /* if resampling did not produce any samples, just return 0 */ - if (resample_out->nb_samples == 0) { - av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); - return 0; - } - - current_buffer = resample_out; - } - - if (avr->upmix_needed) { - av_log(avr, AV_LOG_TRACE, "[upmix] %s\n", current_buffer->name); - ret = ff_audio_mix(avr->am, current_buffer); - if (ret < 0) - return ret; - } - - /* if we resampled or upmixed directly to output, return here */ - if (current_buffer == &output_buffer) { - av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); - return current_buffer->nb_samples; - } - - if (avr->out_convert_needed) { - if (direct_output && out_samples >= current_buffer->nb_samples) { - /* convert directly to output */ - av_log(avr, AV_LOG_TRACE, "[convert] %s to output\n", current_buffer->name); - ret = ff_audio_convert(avr->ac_out, &output_buffer, current_buffer); - if (ret < 0) - return ret; - - av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); - return output_buffer.nb_samples; - } else { - ret = ff_audio_data_realloc(avr->out_buffer, - current_buffer->nb_samples); - if (ret < 0) - return ret; - av_log(avr, AV_LOG_TRACE, "[convert] %s to out_buffer\n", current_buffer->name); - ret = ff_audio_convert(avr->ac_out, avr->out_buffer, - current_buffer); - if (ret < 0) - return ret; - current_buffer = avr->out_buffer; - } - } - - return handle_buffered_output(avr, output ? &output_buffer : NULL, - current_buffer); -} - -int avresample_config(AVAudioResampleContext *avr, AVFrame *out, AVFrame *in) -{ - if (avresample_is_open(avr)) { - avresample_close(avr); - } - - if (in) { - avr->in_channel_layout = in->channel_layout; - avr->in_sample_rate = in->sample_rate; - avr->in_sample_fmt = in->format; - } - - if (out) { - avr->out_channel_layout = out->channel_layout; - avr->out_sample_rate = out->sample_rate; - avr->out_sample_fmt = out->format; - } - - return 0; -} - -static int config_changed(AVAudioResampleContext *avr, - AVFrame *out, AVFrame *in) -{ - int ret = 0; - - if (in) { - if (avr->in_channel_layout != in->channel_layout || - avr->in_sample_rate != in->sample_rate || - avr->in_sample_fmt != in->format) { - ret |= AVERROR_INPUT_CHANGED; - } - } - - if (out) { - if (avr->out_channel_layout != out->channel_layout || - avr->out_sample_rate != out->sample_rate || - avr->out_sample_fmt != out->format) { - ret |= AVERROR_OUTPUT_CHANGED; - } - } - - return ret; -} - -static inline int convert_frame(AVAudioResampleContext *avr, - AVFrame *out, AVFrame *in) -{ - int ret; - uint8_t **out_data = NULL, **in_data = NULL; - int out_linesize = 0, in_linesize = 0; - int out_nb_samples = 0, in_nb_samples = 0; - - if (out) { - out_data = out->extended_data; - out_linesize = out->linesize[0]; - out_nb_samples = out->nb_samples; - } - - if (in) { - in_data = in->extended_data; - in_linesize = in->linesize[0]; - in_nb_samples = in->nb_samples; - } - - ret = avresample_convert(avr, out_data, out_linesize, - out_nb_samples, - in_data, in_linesize, - in_nb_samples); - - if (ret < 0) { - if (out) - out->nb_samples = 0; - return ret; - } - - if (out) - out->nb_samples = ret; - - return 0; -} - -static inline int available_samples(AVFrame *out) -{ - int samples; - int bytes_per_sample = av_get_bytes_per_sample(out->format); - if (!bytes_per_sample) - return AVERROR(EINVAL); - - samples = out->linesize[0] / bytes_per_sample; - if (av_sample_fmt_is_planar(out->format)) { - return samples; - } else { - int channels = av_get_channel_layout_nb_channels(out->channel_layout); - return samples / channels; - } -} - -int avresample_convert_frame(AVAudioResampleContext *avr, - AVFrame *out, AVFrame *in) -{ - int ret, setup = 0; - - if (!avresample_is_open(avr)) { - if ((ret = avresample_config(avr, out, in)) < 0) - return ret; - if ((ret = avresample_open(avr)) < 0) - return ret; - setup = 1; - } else { - // return as is or reconfigure for input changes? - if ((ret = config_changed(avr, out, in))) - return ret; - } - - if (out) { - if (!out->linesize[0]) { - out->nb_samples = avresample_get_out_samples(avr, in->nb_samples); - if ((ret = av_frame_get_buffer(out, 0)) < 0) { - if (setup) - avresample_close(avr); - return ret; - } - } else { - if (!out->nb_samples) - out->nb_samples = available_samples(out); - } - } - - return convert_frame(avr, out, in); -} - -int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix, - int stride) -{ - int in_channels, out_channels, i, o; - - if (avr->am) - return ff_audio_mix_get_matrix(avr->am, matrix, stride); - - in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout); - out_channels = av_get_channel_layout_nb_channels(avr->out_channel_layout); - - if ( in_channels <= 0 || in_channels > AVRESAMPLE_MAX_CHANNELS || - out_channels <= 0 || out_channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(avr, AV_LOG_ERROR, "Invalid channel layouts\n"); - return AVERROR(EINVAL); - } - - if (!avr->mix_matrix) { - av_log(avr, AV_LOG_ERROR, "matrix is not set\n"); - return AVERROR(EINVAL); - } - - for (o = 0; o < out_channels; o++) - for (i = 0; i < in_channels; i++) - matrix[o * stride + i] = avr->mix_matrix[o * in_channels + i]; - - return 0; -} - -int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix, - int stride) -{ - int in_channels, out_channels, i, o; - - if (avr->am) - return ff_audio_mix_set_matrix(avr->am, matrix, stride); - - in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout); - out_channels = av_get_channel_layout_nb_channels(avr->out_channel_layout); - - if ( in_channels <= 0 || in_channels > AVRESAMPLE_MAX_CHANNELS || - out_channels <= 0 || out_channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(avr, AV_LOG_ERROR, "Invalid channel layouts\n"); - return AVERROR(EINVAL); - } - - if (avr->mix_matrix) - av_freep(&avr->mix_matrix); - avr->mix_matrix = av_malloc(in_channels * out_channels * - sizeof(*avr->mix_matrix)); - if (!avr->mix_matrix) - return AVERROR(ENOMEM); - - for (o = 0; o < out_channels; o++) - for (i = 0; i < in_channels; i++) - avr->mix_matrix[o * in_channels + i] = matrix[o * stride + i]; - - return 0; -} - -int avresample_set_channel_mapping(AVAudioResampleContext *avr, - const int *channel_map) -{ - ChannelMapInfo *info = &avr->ch_map_info; - int in_channels, ch, i; - - in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout); - if (in_channels <= 0 || in_channels > AVRESAMPLE_MAX_CHANNELS) { - av_log(avr, AV_LOG_ERROR, "Invalid input channel layout\n"); - return AVERROR(EINVAL); - } - - memset(info, 0, sizeof(*info)); - memset(info->input_map, -1, sizeof(info->input_map)); - - for (ch = 0; ch < in_channels; ch++) { - if (channel_map[ch] >= in_channels) { - av_log(avr, AV_LOG_ERROR, "Invalid channel map\n"); - return AVERROR(EINVAL); - } - if (channel_map[ch] < 0) { - info->channel_zero[ch] = 1; - info->channel_map[ch] = -1; - info->do_zero = 1; - } else if (info->input_map[channel_map[ch]] >= 0) { - info->channel_copy[ch] = info->input_map[channel_map[ch]]; - info->channel_map[ch] = -1; - info->do_copy = 1; - } else { - info->channel_map[ch] = channel_map[ch]; - info->input_map[channel_map[ch]] = ch; - info->do_remap = 1; - } - } - /* Fill-in unmapped input channels with unmapped output channels. - This is used when remapping during conversion from interleaved to - planar format. */ - for (ch = 0, i = 0; ch < in_channels && i < in_channels; ch++, i++) { - while (ch < in_channels && info->input_map[ch] >= 0) - ch++; - while (i < in_channels && info->channel_map[i] >= 0) - i++; - if (ch >= in_channels || i >= in_channels) - break; - info->input_map[ch] = i; - } - - avr->use_channel_map = 1; - return 0; -} - -int avresample_available(AVAudioResampleContext *avr) -{ - return av_audio_fifo_size(avr->out_fifo); -} - -int avresample_get_out_samples(AVAudioResampleContext *avr, int in_nb_samples) -{ - int64_t samples = avresample_get_delay(avr) + (int64_t)in_nb_samples; - - if (avr->resample_needed) { - samples = av_rescale_rnd(samples, - avr->out_sample_rate, - avr->in_sample_rate, - AV_ROUND_UP); - } - - samples += avresample_available(avr); - - if (samples > INT_MAX) - return AVERROR(EINVAL); - - return samples; -} - -int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples) -{ - if (!output) - return av_audio_fifo_drain(avr->out_fifo, nb_samples); - return av_audio_fifo_read(avr->out_fifo, (void**)output, nb_samples); -} - -unsigned avresample_version(void) -{ - return LIBAVRESAMPLE_VERSION_INT; -} - -const char *avresample_license(void) -{ -#define LICENSE_PREFIX "libavresample license: " - return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; -} - -const char *avresample_configuration(void) -{ - return FFMPEG_CONFIGURATION; -} diff --git a/libavresample/version.h b/libavresample/version.h deleted file mode 100644 index d5d3ea82b1..0000000000 --- a/libavresample/version.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVRESAMPLE_VERSION_H -#define AVRESAMPLE_VERSION_H - -/** - * @file - * @ingroup lavr - * Libavresample version macros. - */ - -#include "libavutil/version.h" - -#define LIBAVRESAMPLE_VERSION_MAJOR 4 -#define LIBAVRESAMPLE_VERSION_MINOR 0 -#define LIBAVRESAMPLE_VERSION_MICRO 0 - -#define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \ - LIBAVRESAMPLE_VERSION_MINOR, \ - LIBAVRESAMPLE_VERSION_MICRO) -#define LIBAVRESAMPLE_VERSION AV_VERSION(LIBAVRESAMPLE_VERSION_MAJOR, \ - LIBAVRESAMPLE_VERSION_MINOR, \ - LIBAVRESAMPLE_VERSION_MICRO) -#define LIBAVRESAMPLE_BUILD LIBAVRESAMPLE_VERSION_INT - -#define LIBAVRESAMPLE_IDENT "Lavr" AV_STRINGIFY(LIBAVRESAMPLE_VERSION) - -/** - * FF_API_* defines may be placed below to indicate public API that will be - * dropped at a future version bump. The defines themselves are not part of - * the public API and may change, break or disappear at any time. - */ - -#endif /* AVRESAMPLE_VERSION_H */ diff --git a/libavresample/x86/Makefile b/libavresample/x86/Makefile deleted file mode 100644 index 55b709ce36..0000000000 --- a/libavresample/x86/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS += x86/audio_convert_init.o \ - x86/audio_mix_init.o \ - x86/dither_init.o \ - -OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o - -X86ASM-OBJS += x86/audio_convert.o \ - x86/audio_mix.o \ - x86/dither.o \ diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm deleted file mode 100644 index c6a5015282..0000000000 --- a/libavresample/x86/audio_convert.asm +++ /dev/null @@ -1,1261 +0,0 @@ -;****************************************************************************** -;* x86 optimized Format Conversion Utils -;* Copyright (c) 2008 Loren Merritt -;* Copyright (c) 2012 Justin Ruggles -;* -;* This file is part of FFmpeg. -;* -;* FFmpeg is free software; you can redistribute it and/or -;* modify it under the terms of the GNU Lesser General Public -;* License as published by the Free Software Foundation; either -;* version 2.1 of the License, or (at your option) any later version. -;* -;* FFmpeg is distributed in the hope that it will be useful, -;* but WITHOUT ANY WARRANTY; without even the implied warranty of -;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;* Lesser General Public License for more details. -;* -;* You should have received a copy of the GNU Lesser General Public -;* License along with FFmpeg; if not, write to the Free Software -;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -;****************************************************************************** - -%include "libavutil/x86/x86util.asm" -%include "util.asm" - -SECTION_RODATA 32 - -pf_s32_inv_scale: times 8 dd 0x30000000 -pf_s32_scale: times 8 dd 0x4f000000 -pf_s32_clip: times 8 dd 0x4effffff -pf_s16_inv_scale: times 4 dd 0x38000000 -pf_s16_scale: times 4 dd 0x47000000 -pb_shuf_unpack_even: db -1, -1, 0, 1, -1, -1, 2, 3, -1, -1, 8, 9, -1, -1, 10, 11 -pb_shuf_unpack_odd: db -1, -1, 4, 5, -1, -1, 6, 7, -1, -1, 12, 13, -1, -1, 14, 15 -pb_interleave_words: SHUFFLE_MASK_W 0, 4, 1, 5, 2, 6, 3, 7 -pb_deinterleave_words: SHUFFLE_MASK_W 0, 2, 4, 6, 1, 3, 5, 7 -pw_zero_even: times 4 dw 0x0000, 0xffff - -SECTION .text - -;------------------------------------------------------------------------------ -; void ff_conv_s16_to_s32(int32_t *dst, const int16_t *src, int len); -;------------------------------------------------------------------------------ - -INIT_XMM sse2 -cglobal conv_s16_to_s32, 3,3,3, dst, src, len - lea lenq, [2*lend] - lea dstq, [dstq+2*lenq] - add srcq, lenq - neg lenq -.loop: - mova m2, [srcq+lenq] - pxor m0, m0 - pxor m1, m1 - punpcklwd m0, m2 - punpckhwd m1, m2 - mova [dstq+2*lenq ], m0 - mova [dstq+2*lenq+mmsize], m1 - add lenq, mmsize - jl .loop - REP_RET - -;------------------------------------------------------------------------------ -; void ff_conv_s16_to_flt(float *dst, const int16_t *src, int len); -;------------------------------------------------------------------------------ - -%macro CONV_S16_TO_FLT 0 -cglobal conv_s16_to_flt, 3,3,3, dst, src, len - lea lenq, [2*lend] - add srcq, lenq - lea dstq, [dstq + 2*lenq] - neg lenq - mova m2, [pf_s16_inv_scale] - ALIGN 16 -.loop: - mova m0, [srcq+lenq] - S16_TO_S32_SX 0, 1 - cvtdq2ps m0, m0 - cvtdq2ps m1, m1 - mulps m0, m2 - mulps m1, m2 - mova [dstq+2*lenq ], m0 - mova [dstq+2*lenq+mmsize], m1 - add lenq, mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16_TO_FLT -INIT_XMM sse4 -CONV_S16_TO_FLT - -;------------------------------------------------------------------------------ -; void ff_conv_s32_to_s16(int16_t *dst, const int32_t *src, int len); -;------------------------------------------------------------------------------ - -%macro CONV_S32_TO_S16 0 -cglobal conv_s32_to_s16, 3,3,4, dst, src, len - lea lenq, [2*lend] - lea srcq, [srcq+2*lenq] - add dstq, lenq - neg lenq -.loop: - mova m0, [srcq+2*lenq ] - mova m1, [srcq+2*lenq+ mmsize] - mova m2, [srcq+2*lenq+2*mmsize] - mova m3, [srcq+2*lenq+3*mmsize] - psrad m0, 16 - psrad m1, 16 - psrad m2, 16 - psrad m3, 16 - packssdw m0, m1 - packssdw m2, m3 - mova [dstq+lenq ], m0 - mova [dstq+lenq+mmsize], m2 - add lenq, mmsize*2 - jl .loop -%if mmsize == 8 - emms - RET -%else - REP_RET -%endif -%endmacro - -INIT_MMX mmx -CONV_S32_TO_S16 -INIT_XMM sse2 -CONV_S32_TO_S16 - -;------------------------------------------------------------------------------ -; void ff_conv_s32_to_flt(float *dst, const int32_t *src, int len); -;------------------------------------------------------------------------------ - -%macro CONV_S32_TO_FLT 0 -cglobal conv_s32_to_flt, 3,3,3, dst, src, len - lea lenq, [4*lend] - add srcq, lenq - add dstq, lenq - neg lenq - mova m0, [pf_s32_inv_scale] - ALIGN 16 -.loop: - cvtdq2ps m1, [srcq+lenq ] - cvtdq2ps m2, [srcq+lenq+mmsize] - mulps m1, m1, m0 - mulps m2, m2, m0 - mova [dstq+lenq ], m1 - mova [dstq+lenq+mmsize], m2 - add lenq, mmsize*2 - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S32_TO_FLT -%if HAVE_AVX_EXTERNAL -INIT_YMM avx -CONV_S32_TO_FLT -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_flt_to_s16(int16_t *dst, const float *src, int len); -;------------------------------------------------------------------------------ - -INIT_XMM sse2 -cglobal conv_flt_to_s16, 3,3,5, dst, src, len - lea lenq, [2*lend] - lea srcq, [srcq+2*lenq] - add dstq, lenq - neg lenq - mova m4, [pf_s16_scale] -.loop: - mova m0, [srcq+2*lenq ] - mova m1, [srcq+2*lenq+1*mmsize] - mova m2, [srcq+2*lenq+2*mmsize] - mova m3, [srcq+2*lenq+3*mmsize] - mulps m0, m4 - mulps m1, m4 - mulps m2, m4 - mulps m3, m4 - cvtps2dq m0, m0 - cvtps2dq m1, m1 - cvtps2dq m2, m2 - cvtps2dq m3, m3 - packssdw m0, m1 - packssdw m2, m3 - mova [dstq+lenq ], m0 - mova [dstq+lenq+mmsize], m2 - add lenq, mmsize*2 - jl .loop - REP_RET - -;------------------------------------------------------------------------------ -; void ff_conv_flt_to_s32(int32_t *dst, const float *src, int len); -;------------------------------------------------------------------------------ - -%macro CONV_FLT_TO_S32 0 -cglobal conv_flt_to_s32, 3,3,6, dst, src, len - lea lenq, [lend*4] - add srcq, lenq - add dstq, lenq - neg lenq - mova m4, [pf_s32_scale] - mova m5, [pf_s32_clip] -.loop: - mulps m0, m4, [srcq+lenq ] - mulps m1, m4, [srcq+lenq+1*mmsize] - mulps m2, m4, [srcq+lenq+2*mmsize] - mulps m3, m4, [srcq+lenq+3*mmsize] - minps m0, m0, m5 - minps m1, m1, m5 - minps m2, m2, m5 - minps m3, m3, m5 - cvtps2dq m0, m0 - cvtps2dq m1, m1 - cvtps2dq m2, m2 - cvtps2dq m3, m3 - mova [dstq+lenq ], m0 - mova [dstq+lenq+1*mmsize], m1 - mova [dstq+lenq+2*mmsize], m2 - mova [dstq+lenq+3*mmsize], m3 - add lenq, mmsize*4 - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_FLT_TO_S32 -%if HAVE_AVX_EXTERNAL -INIT_YMM avx -CONV_FLT_TO_S32 -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16p_to_s16_2ch(int16_t *dst, int16_t *const *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_S16P_TO_S16_2CH 0 -cglobal conv_s16p_to_s16_2ch, 3,4,5, dst, src0, len, src1 - mov src1q, [src0q+gprsize] - mov src0q, [src0q ] - lea lenq, [2*lend] - add src0q, lenq - add src1q, lenq - lea dstq, [dstq+2*lenq] - neg lenq -.loop: - mova m0, [src0q+lenq ] - mova m1, [src1q+lenq ] - mova m2, [src0q+lenq+mmsize] - mova m3, [src1q+lenq+mmsize] - SBUTTERFLY2 wd, 0, 1, 4 - SBUTTERFLY2 wd, 2, 3, 4 - mova [dstq+2*lenq+0*mmsize], m0 - mova [dstq+2*lenq+1*mmsize], m1 - mova [dstq+2*lenq+2*mmsize], m2 - mova [dstq+2*lenq+3*mmsize], m3 - add lenq, 2*mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16P_TO_S16_2CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16P_TO_S16_2CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16p_to_s16_6ch(int16_t *dst, int16_t *const *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -;------------------------------------------------------------------------------ -; NOTE: In the 6-channel functions, len could be used as an index on x86-64 -; instead of just a counter, which would avoid incrementing the -; pointers, but the extra complexity and amount of code is not worth -; the small gain. On x86-32 there are not enough registers to use len -; as an index without keeping two of the pointers on the stack and -; loading them in each iteration. -;------------------------------------------------------------------------------ - -%macro CONV_S16P_TO_S16_6CH 0 -%if ARCH_X86_64 -cglobal conv_s16p_to_s16_6ch, 3,8,7, dst, src0, len, src1, src2, src3, src4, src5 -%else -cglobal conv_s16p_to_s16_6ch, 2,7,7, dst, src0, src1, src2, src3, src4, src5 -%define lend dword r2m -%endif - mov src1q, [src0q+1*gprsize] - mov src2q, [src0q+2*gprsize] - mov src3q, [src0q+3*gprsize] - mov src4q, [src0q+4*gprsize] - mov src5q, [src0q+5*gprsize] - mov src0q, [src0q] - sub src1q, src0q - sub src2q, src0q - sub src3q, src0q - sub src4q, src0q - sub src5q, src0q -.loop: -%if cpuflag(sse2slow) - movq m0, [src0q ] ; m0 = 0, 6, 12, 18, x, x, x, x - movq m1, [src0q+src1q] ; m1 = 1, 7, 13, 19, x, x, x, x - movq m2, [src0q+src2q] ; m2 = 2, 8, 14, 20, x, x, x, x - movq m3, [src0q+src3q] ; m3 = 3, 9, 15, 21, x, x, x, x - movq m4, [src0q+src4q] ; m4 = 4, 10, 16, 22, x, x, x, x - movq m5, [src0q+src5q] ; m5 = 5, 11, 17, 23, x, x, x, x - ; unpack words: - punpcklwd m0, m1 ; m0 = 0, 1, 6, 7, 12, 13, 18, 19 - punpcklwd m2, m3 ; m2 = 4, 5, 10, 11, 16, 17, 22, 23 - punpcklwd m4, m5 ; m4 = 2, 3, 8, 9, 14, 15, 20, 21 - ; blend dwords - shufps m1, m0, m2, q2020 ; m1 = 0, 1, 12, 13, 2, 3, 14, 15 - shufps m0, m4, q2031 ; m0 = 6, 7, 18, 19, 4, 5, 16, 17 - shufps m2, m4, q3131 ; m2 = 8, 9, 20, 21, 10, 11, 22, 23 - ; shuffle dwords - pshufd m0, m0, q1302 ; m0 = 4, 5, 6, 7, 16, 17, 18, 19 - pshufd m1, m1, q3120 ; m1 = 0, 1, 2, 3, 12, 13, 14, 15 - pshufd m2, m2, q3120 ; m2 = 8, 9, 10, 11, 20, 21, 22, 23 - movq [dstq+0*mmsize/2], m1 - movq [dstq+1*mmsize/2], m0 - movq [dstq+2*mmsize/2], m2 - movhps [dstq+3*mmsize/2], m1 - movhps [dstq+4*mmsize/2], m0 - movhps [dstq+5*mmsize/2], m2 - add src0q, mmsize/2 - add dstq, mmsize*3 - sub lend, mmsize/4 -%else - mova m0, [src0q ] ; m0 = 0, 6, 12, 18, 24, 30, 36, 42 - mova m1, [src0q+src1q] ; m1 = 1, 7, 13, 19, 25, 31, 37, 43 - mova m2, [src0q+src2q] ; m2 = 2, 8, 14, 20, 26, 32, 38, 44 - mova m3, [src0q+src3q] ; m3 = 3, 9, 15, 21, 27, 33, 39, 45 - mova m4, [src0q+src4q] ; m4 = 4, 10, 16, 22, 28, 34, 40, 46 - mova m5, [src0q+src5q] ; m5 = 5, 11, 17, 23, 29, 35, 41, 47 - ; unpack words: - SBUTTERFLY2 wd, 0, 1, 6 ; m0 = 0, 1, 6, 7, 12, 13, 18, 19 - ; m1 = 24, 25, 30, 31, 36, 37, 42, 43 - SBUTTERFLY2 wd, 2, 3, 6 ; m2 = 2, 3, 8, 9, 14, 15, 20, 21 - ; m3 = 26, 27, 32, 33, 38, 39, 44, 45 - SBUTTERFLY2 wd, 4, 5, 6 ; m4 = 4, 5, 10, 11, 16, 17, 22, 23 - ; m5 = 28, 29, 34, 35, 40, 41, 46, 47 - ; blend dwords - shufps m6, m0, m2, q2020 ; m6 = 0, 1, 12, 13, 2, 3, 14, 15 - shufps m0, m4, q2031 ; m0 = 6, 7, 18, 19, 4, 5, 16, 17 - shufps m2, m4, q3131 ; m2 = 8, 9, 20, 21, 10, 11, 22, 23 - SWAP 4,6 ; m4 = 0, 1, 12, 13, 2, 3, 14, 15 - shufps m6, m1, m3, q2020 ; m6 = 24, 25, 36, 37, 26, 27, 38, 39 - shufps m1, m5, q2031 ; m1 = 30, 31, 42, 43, 28, 29, 40, 41 - shufps m3, m5, q3131 ; m3 = 32, 33, 44, 45, 34, 35, 46, 47 - SWAP 5,6 ; m5 = 24, 25, 36, 37, 26, 27, 38, 39 - ; shuffle dwords - pshufd m0, m0, q1302 ; m0 = 4, 5, 6, 7, 16, 17, 18, 19 - pshufd m2, m2, q3120 ; m2 = 8, 9, 10, 11, 20, 21, 22, 23 - pshufd m4, m4, q3120 ; m4 = 0, 1, 2, 3, 12, 13, 14, 15 - pshufd m1, m1, q1302 ; m1 = 28, 29, 30, 31, 40, 41, 42, 43 - pshufd m3, m3, q3120 ; m3 = 32, 33, 34, 35, 44, 45, 46, 47 - pshufd m5, m5, q3120 ; m5 = 24, 25, 26, 27, 36, 37, 38, 39 - ; shuffle qwords - punpcklqdq m6, m4, m0 ; m6 = 0, 1, 2, 3, 4, 5, 6, 7 - punpckhqdq m0, m2 ; m0 = 16, 17, 18, 19, 20, 21, 22, 23 - shufps m2, m4, q3210 ; m2 = 8, 9, 10, 11, 12, 13, 14, 15 - SWAP 4,6 ; m4 = 0, 1, 2, 3, 4, 5, 6, 7 - punpcklqdq m6, m5, m1 ; m6 = 24, 25, 26, 27, 28, 29, 30, 31 - punpckhqdq m1, m3 ; m1 = 40, 41, 42, 43, 44, 45, 46, 47 - shufps m3, m5, q3210 ; m3 = 32, 33, 34, 35, 36, 37, 38, 39 - SWAP 5,6 ; m5 = 24, 25, 26, 27, 28, 29, 30, 31 - mova [dstq+0*mmsize], m4 - mova [dstq+1*mmsize], m2 - mova [dstq+2*mmsize], m0 - mova [dstq+3*mmsize], m5 - mova [dstq+4*mmsize], m3 - mova [dstq+5*mmsize], m1 - add src0q, mmsize - add dstq, mmsize*6 - sub lend, mmsize/2 -%endif - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16P_TO_S16_6CH -INIT_XMM sse2slow -CONV_S16P_TO_S16_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16P_TO_S16_6CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16p_to_flt_2ch(float *dst, int16_t *const *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_S16P_TO_FLT_2CH 0 -cglobal conv_s16p_to_flt_2ch, 3,4,6, dst, src0, len, src1 - lea lenq, [2*lend] - mov src1q, [src0q+gprsize] - mov src0q, [src0q ] - lea dstq, [dstq+4*lenq] - add src0q, lenq - add src1q, lenq - neg lenq - mova m5, [pf_s32_inv_scale] -.loop: - mova m2, [src0q+lenq] ; m2 = 0, 2, 4, 6, 8, 10, 12, 14 - mova m4, [src1q+lenq] ; m4 = 1, 3, 5, 7, 9, 11, 13, 15 - SBUTTERFLY2 wd, 2, 4, 3 ; m2 = 0, 1, 2, 3, 4, 5, 6, 7 - ; m4 = 8, 9, 10, 11, 12, 13, 14, 15 - pxor m3, m3 - punpcklwd m0, m3, m2 ; m0 = 0, 1, 2, 3 - punpckhwd m1, m3, m2 ; m1 = 4, 5, 6, 7 - punpcklwd m2, m3, m4 ; m2 = 8, 9, 10, 11 - punpckhwd m3, m4 ; m3 = 12, 13, 14, 15 - cvtdq2ps m0, m0 - cvtdq2ps m1, m1 - cvtdq2ps m2, m2 - cvtdq2ps m3, m3 - mulps m0, m5 - mulps m1, m5 - mulps m2, m5 - mulps m3, m5 - mova [dstq+4*lenq ], m0 - mova [dstq+4*lenq+ mmsize], m1 - mova [dstq+4*lenq+2*mmsize], m2 - mova [dstq+4*lenq+3*mmsize], m3 - add lenq, mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16P_TO_FLT_2CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16P_TO_FLT_2CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16p_to_flt_6ch(float *dst, int16_t *const *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_S16P_TO_FLT_6CH 0 -%if ARCH_X86_64 -cglobal conv_s16p_to_flt_6ch, 3,8,8, dst, src, len, src1, src2, src3, src4, src5 -%else -cglobal conv_s16p_to_flt_6ch, 2,7,8, dst, src, src1, src2, src3, src4, src5 -%define lend dword r2m -%endif - mov src1q, [srcq+1*gprsize] - mov src2q, [srcq+2*gprsize] - mov src3q, [srcq+3*gprsize] - mov src4q, [srcq+4*gprsize] - mov src5q, [srcq+5*gprsize] - mov srcq, [srcq] - sub src1q, srcq - sub src2q, srcq - sub src3q, srcq - sub src4q, srcq - sub src5q, srcq - mova m7, [pf_s32_inv_scale] -%if cpuflag(ssse3) - %define unpack_even m6 - mova m6, [pb_shuf_unpack_even] -%if ARCH_X86_64 - %define unpack_odd m8 - mova m8, [pb_shuf_unpack_odd] -%else - %define unpack_odd [pb_shuf_unpack_odd] -%endif -%endif -.loop: - movq m0, [srcq ] ; m0 = 0, 6, 12, 18, x, x, x, x - movq m1, [srcq+src1q] ; m1 = 1, 7, 13, 19, x, x, x, x - movq m2, [srcq+src2q] ; m2 = 2, 8, 14, 20, x, x, x, x - movq m3, [srcq+src3q] ; m3 = 3, 9, 15, 21, x, x, x, x - movq m4, [srcq+src4q] ; m4 = 4, 10, 16, 22, x, x, x, x - movq m5, [srcq+src5q] ; m5 = 5, 11, 17, 23, x, x, x, x - ; unpack words: - punpcklwd m0, m1 ; m0 = 0, 1, 6, 7, 12, 13, 18, 19 - punpcklwd m2, m3 ; m2 = 2, 3, 8, 9, 14, 15, 20, 21 - punpcklwd m4, m5 ; m4 = 4, 5, 10, 11, 16, 17, 22, 23 - ; blend dwords - shufps m1, m4, m0, q3120 ; m1 = 4, 5, 16, 17, 6, 7, 18, 19 - shufps m0, m2, q2020 ; m0 = 0, 1, 12, 13, 2, 3, 14, 15 - shufps m2, m4, q3131 ; m2 = 8, 9, 20, 21, 10, 11, 22, 23 -%if cpuflag(ssse3) - pshufb m3, m0, unpack_odd ; m3 = 12, 13, 14, 15 - pshufb m0, unpack_even ; m0 = 0, 1, 2, 3 - pshufb m4, m1, unpack_odd ; m4 = 16, 17, 18, 19 - pshufb m1, unpack_even ; m1 = 4, 5, 6, 7 - pshufb m5, m2, unpack_odd ; m5 = 20, 21, 22, 23 - pshufb m2, unpack_even ; m2 = 8, 9, 10, 11 -%else - ; shuffle dwords - pshufd m0, m0, q3120 ; m0 = 0, 1, 2, 3, 12, 13, 14, 15 - pshufd m1, m1, q3120 ; m1 = 4, 5, 6, 7, 16, 17, 18, 19 - pshufd m2, m2, q3120 ; m2 = 8, 9, 10, 11, 20, 21, 22, 23 - pxor m6, m6 ; convert s16 in m0-m2 to s32 in m0-m5 - punpcklwd m3, m6, m0 ; m3 = 0, 1, 2, 3 - punpckhwd m4, m6, m0 ; m4 = 12, 13, 14, 15 - punpcklwd m0, m6, m1 ; m0 = 4, 5, 6, 7 - punpckhwd m5, m6, m1 ; m5 = 16, 17, 18, 19 - punpcklwd m1, m6, m2 ; m1 = 8, 9, 10, 11 - punpckhwd m6, m2 ; m6 = 20, 21, 22, 23 - SWAP 6,2,1,0,3,4,5 ; swap registers 3,0,1,4,5,6 to 0,1,2,3,4,5 -%endif - cvtdq2ps m0, m0 ; convert s32 to float - cvtdq2ps m1, m1 - cvtdq2ps m2, m2 - cvtdq2ps m3, m3 - cvtdq2ps m4, m4 - cvtdq2ps m5, m5 - mulps m0, m7 ; scale float from s32 range to [-1.0,1.0] - mulps m1, m7 - mulps m2, m7 - mulps m3, m7 - mulps m4, m7 - mulps m5, m7 - mova [dstq ], m0 - mova [dstq+ mmsize], m1 - mova [dstq+2*mmsize], m2 - mova [dstq+3*mmsize], m3 - mova [dstq+4*mmsize], m4 - mova [dstq+5*mmsize], m5 - add srcq, mmsize/2 - add dstq, mmsize*6 - sub lend, mmsize/4 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16P_TO_FLT_6CH -INIT_XMM ssse3 -CONV_S16P_TO_FLT_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16P_TO_FLT_6CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_fltp_to_s16_2ch(int16_t *dst, float *const *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_FLTP_TO_S16_2CH 0 -cglobal conv_fltp_to_s16_2ch, 3,4,3, dst, src0, len, src1 - lea lenq, [4*lend] - mov src1q, [src0q+gprsize] - mov src0q, [src0q ] - add dstq, lenq - add src0q, lenq - add src1q, lenq - neg lenq - mova m2, [pf_s16_scale] -%if cpuflag(ssse3) - mova m3, [pb_interleave_words] -%endif -.loop: - mulps m0, m2, [src0q+lenq] ; m0 = 0, 2, 4, 6 - mulps m1, m2, [src1q+lenq] ; m1 = 1, 3, 5, 7 - cvtps2dq m0, m0 - cvtps2dq m1, m1 -%if cpuflag(ssse3) - packssdw m0, m1 ; m0 = 0, 2, 4, 6, 1, 3, 5, 7 - pshufb m0, m3 ; m0 = 0, 1, 2, 3, 4, 5, 6, 7 -%else - packssdw m0, m0 ; m0 = 0, 2, 4, 6, x, x, x, x - packssdw m1, m1 ; m1 = 1, 3, 5, 7, x, x, x, x - punpcklwd m0, m1 ; m0 = 0, 1, 2, 3, 4, 5, 6, 7 -%endif - mova [dstq+lenq], m0 - add lenq, mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_FLTP_TO_S16_2CH -INIT_XMM ssse3 -CONV_FLTP_TO_S16_2CH - -;------------------------------------------------------------------------------ -; void ff_conv_fltp_to_s16_6ch(int16_t *dst, float *const *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_FLTP_TO_S16_6CH 0 -%if ARCH_X86_64 -cglobal conv_fltp_to_s16_6ch, 3,8,7, dst, src, len, src1, src2, src3, src4, src5 -%else -cglobal conv_fltp_to_s16_6ch, 2,7,7, dst, src, src1, src2, src3, src4, src5 -%define lend dword r2m -%endif - mov src1q, [srcq+1*gprsize] - mov src2q, [srcq+2*gprsize] - mov src3q, [srcq+3*gprsize] - mov src4q, [srcq+4*gprsize] - mov src5q, [srcq+5*gprsize] - mov srcq, [srcq] - sub src1q, srcq - sub src2q, srcq - sub src3q, srcq - sub src4q, srcq - sub src5q, srcq - movaps xmm6, [pf_s16_scale] -.loop: -%if cpuflag(sse2) - mulps m0, m6, [srcq ] - mulps m1, m6, [srcq+src1q] - mulps m2, m6, [srcq+src2q] - mulps m3, m6, [srcq+src3q] - mulps m4, m6, [srcq+src4q] - mulps m5, m6, [srcq+src5q] - cvtps2dq m0, m0 - cvtps2dq m1, m1 - cvtps2dq m2, m2 - cvtps2dq m3, m3 - cvtps2dq m4, m4 - cvtps2dq m5, m5 - packssdw m0, m3 ; m0 = 0, 6, 12, 18, 3, 9, 15, 21 - packssdw m1, m4 ; m1 = 1, 7, 13, 19, 4, 10, 16, 22 - packssdw m2, m5 ; m2 = 2, 8, 14, 20, 5, 11, 17, 23 - ; unpack words: - movhlps m3, m0 ; m3 = 3, 9, 15, 21, x, x, x, x - punpcklwd m0, m1 ; m0 = 0, 1, 6, 7, 12, 13, 18, 19 - punpckhwd m1, m2 ; m1 = 4, 5, 10, 11, 16, 17, 22, 23 - punpcklwd m2, m3 ; m2 = 2, 3, 8, 9, 14, 15, 20, 21 - ; blend dwords: - shufps m3, m0, m2, q2020 ; m3 = 0, 1, 12, 13, 2, 3, 14, 15 - shufps m0, m1, q2031 ; m0 = 6, 7, 18, 19, 4, 5, 16, 17 - shufps m2, m1, q3131 ; m2 = 8, 9, 20, 21, 10, 11, 22, 23 - ; shuffle dwords: - shufps m1, m2, m3, q3120 ; m1 = 8, 9, 10, 11, 12, 13, 14, 15 - shufps m3, m0, q0220 ; m3 = 0, 1, 2, 3, 4, 5, 6, 7 - shufps m0, m2, q3113 ; m0 = 16, 17, 18, 19, 20, 21, 22, 23 - mova [dstq+0*mmsize], m3 - mova [dstq+1*mmsize], m1 - mova [dstq+2*mmsize], m0 -%else ; sse - movlps xmm0, [srcq ] - movlps xmm1, [srcq+src1q] - movlps xmm2, [srcq+src2q] - movlps xmm3, [srcq+src3q] - movlps xmm4, [srcq+src4q] - movlps xmm5, [srcq+src5q] - mulps xmm0, xmm6 - mulps xmm1, xmm6 - mulps xmm2, xmm6 - mulps xmm3, xmm6 - mulps xmm4, xmm6 - mulps xmm5, xmm6 - cvtps2pi mm0, xmm0 - cvtps2pi mm1, xmm1 - cvtps2pi mm2, xmm2 - cvtps2pi mm3, xmm3 - cvtps2pi mm4, xmm4 - cvtps2pi mm5, xmm5 - packssdw mm0, mm3 ; m0 = 0, 6, 3, 9 - packssdw mm1, mm4 ; m1 = 1, 7, 4, 10 - packssdw mm2, mm5 ; m2 = 2, 8, 5, 11 - ; unpack words - pshufw mm3, mm0, q1032 ; m3 = 3, 9, 0, 6 - punpcklwd mm0, mm1 ; m0 = 0, 1, 6, 7 - punpckhwd mm1, mm2 ; m1 = 4, 5, 10, 11 - punpcklwd mm2, mm3 ; m2 = 2, 3, 8, 9 - ; unpack dwords - pshufw mm3, mm0, q1032 ; m3 = 6, 7, 0, 1 - punpckldq mm0, mm2 ; m0 = 0, 1, 2, 3 (final) - punpckhdq mm2, mm1 ; m2 = 8, 9, 10, 11 (final) - punpckldq mm1, mm3 ; m1 = 4, 5, 6, 7 (final) - mova [dstq+0*mmsize], mm0 - mova [dstq+1*mmsize], mm1 - mova [dstq+2*mmsize], mm2 -%endif - add srcq, mmsize - add dstq, mmsize*3 - sub lend, mmsize/4 - jg .loop -%if mmsize == 8 - emms - RET -%else - REP_RET -%endif -%endmacro - -INIT_MMX sse -CONV_FLTP_TO_S16_6CH -INIT_XMM sse2 -CONV_FLTP_TO_S16_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_FLTP_TO_S16_6CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_fltp_to_flt_2ch(float *dst, float *const *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_FLTP_TO_FLT_2CH 0 -cglobal conv_fltp_to_flt_2ch, 3,4,5, dst, src0, len, src1 - mov src1q, [src0q+gprsize] - mov src0q, [src0q] - lea lenq, [4*lend] - add src0q, lenq - add src1q, lenq - lea dstq, [dstq+2*lenq] - neg lenq -.loop: - mova m0, [src0q+lenq ] - mova m1, [src1q+lenq ] - mova m2, [src0q+lenq+mmsize] - mova m3, [src1q+lenq+mmsize] - SBUTTERFLYPS 0, 1, 4 - SBUTTERFLYPS 2, 3, 4 - mova [dstq+2*lenq+0*mmsize], m0 - mova [dstq+2*lenq+1*mmsize], m1 - mova [dstq+2*lenq+2*mmsize], m2 - mova [dstq+2*lenq+3*mmsize], m3 - add lenq, 2*mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse -CONV_FLTP_TO_FLT_2CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_FLTP_TO_FLT_2CH -%endif - -;----------------------------------------------------------------------------- -; void ff_conv_fltp_to_flt_6ch(float *dst, float *const *src, int len, -; int channels); -;----------------------------------------------------------------------------- - -%macro CONV_FLTP_TO_FLT_6CH 0 -cglobal conv_fltp_to_flt_6ch, 2,8,7, dst, src, src1, src2, src3, src4, src5, len -%if ARCH_X86_64 - mov lend, r2d -%else - %define lend dword r2m -%endif - mov src1q, [srcq+1*gprsize] - mov src2q, [srcq+2*gprsize] - mov src3q, [srcq+3*gprsize] - mov src4q, [srcq+4*gprsize] - mov src5q, [srcq+5*gprsize] - mov srcq, [srcq] - sub src1q, srcq - sub src2q, srcq - sub src3q, srcq - sub src4q, srcq - sub src5q, srcq -.loop: - mova m0, [srcq ] - mova m1, [srcq+src1q] - mova m2, [srcq+src2q] - mova m3, [srcq+src3q] - mova m4, [srcq+src4q] - mova m5, [srcq+src5q] -%if cpuflag(sse4) - SBUTTERFLYPS 0, 1, 6 - SBUTTERFLYPS 2, 3, 6 - SBUTTERFLYPS 4, 5, 6 - - blendps m6, m4, m0, 1100b - movlhps m0, m2 - movhlps m4, m2 - blendps m2, m5, m1, 1100b - movlhps m1, m3 - movhlps m5, m3 - - movaps [dstq ], m0 - movaps [dstq+16], m6 - movaps [dstq+32], m4 - movaps [dstq+48], m1 - movaps [dstq+64], m2 - movaps [dstq+80], m5 -%else ; mmx - SBUTTERFLY dq, 0, 1, 6 - SBUTTERFLY dq, 2, 3, 6 - SBUTTERFLY dq, 4, 5, 6 - - movq [dstq ], m0 - movq [dstq+ 8], m2 - movq [dstq+16], m4 - movq [dstq+24], m1 - movq [dstq+32], m3 - movq [dstq+40], m5 -%endif - add srcq, mmsize - add dstq, mmsize*6 - sub lend, mmsize/4 - jg .loop -%if mmsize == 8 - emms - RET -%else - REP_RET -%endif -%endmacro - -INIT_MMX mmx -CONV_FLTP_TO_FLT_6CH -INIT_XMM sse4 -CONV_FLTP_TO_FLT_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_FLTP_TO_FLT_6CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16_to_s16p_2ch(int16_t *const *dst, int16_t *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_S16_TO_S16P_2CH 0 -cglobal conv_s16_to_s16p_2ch, 3,4,4, dst0, src, len, dst1 - lea lenq, [2*lend] - mov dst1q, [dst0q+gprsize] - mov dst0q, [dst0q ] - lea srcq, [srcq+2*lenq] - add dst0q, lenq - add dst1q, lenq - neg lenq -%if cpuflag(ssse3) - mova m3, [pb_deinterleave_words] -%endif -.loop: - mova m0, [srcq+2*lenq ] ; m0 = 0, 1, 2, 3, 4, 5, 6, 7 - mova m1, [srcq+2*lenq+mmsize] ; m1 = 8, 9, 10, 11, 12, 13, 14, 15 -%if cpuflag(ssse3) - pshufb m0, m3 ; m0 = 0, 2, 4, 6, 1, 3, 5, 7 - pshufb m1, m3 ; m1 = 8, 10, 12, 14, 9, 11, 13, 15 - SBUTTERFLY2 qdq, 0, 1, 2 ; m0 = 0, 2, 4, 6, 8, 10, 12, 14 - ; m1 = 1, 3, 5, 7, 9, 11, 13, 15 -%else ; sse2 - pshuflw m0, m0, q3120 ; m0 = 0, 2, 1, 3, 4, 5, 6, 7 - pshufhw m0, m0, q3120 ; m0 = 0, 2, 1, 3, 4, 6, 5, 7 - pshuflw m1, m1, q3120 ; m1 = 8, 10, 9, 11, 12, 13, 14, 15 - pshufhw m1, m1, q3120 ; m1 = 8, 10, 9, 11, 12, 14, 13, 15 - DEINT2_PS 0, 1, 2 ; m0 = 0, 2, 4, 6, 8, 10, 12, 14 - ; m1 = 1, 3, 5, 7, 9, 11, 13, 15 -%endif - mova [dst0q+lenq], m0 - mova [dst1q+lenq], m1 - add lenq, mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16_TO_S16P_2CH -INIT_XMM ssse3 -CONV_S16_TO_S16P_2CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16_TO_S16P_2CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16_to_s16p_6ch(int16_t *const *dst, int16_t *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_S16_TO_S16P_6CH 0 -%if ARCH_X86_64 -cglobal conv_s16_to_s16p_6ch, 3,8,5, dst, src, len, dst1, dst2, dst3, dst4, dst5 -%else -cglobal conv_s16_to_s16p_6ch, 2,7,5, dst, src, dst1, dst2, dst3, dst4, dst5 -%define lend dword r2m -%endif - mov dst1q, [dstq+ gprsize] - mov dst2q, [dstq+2*gprsize] - mov dst3q, [dstq+3*gprsize] - mov dst4q, [dstq+4*gprsize] - mov dst5q, [dstq+5*gprsize] - mov dstq, [dstq ] - sub dst1q, dstq - sub dst2q, dstq - sub dst3q, dstq - sub dst4q, dstq - sub dst5q, dstq -.loop: - mova m0, [srcq+0*mmsize] ; m0 = 0, 1, 2, 3, 4, 5, 6, 7 - mova m3, [srcq+1*mmsize] ; m3 = 8, 9, 10, 11, 12, 13, 14, 15 - mova m2, [srcq+2*mmsize] ; m2 = 16, 17, 18, 19, 20, 21, 22, 23 - PALIGNR m1, m3, m0, 12, m4 ; m1 = 6, 7, 8, 9, 10, 11, x, x - shufps m3, m2, q1032 ; m3 = 12, 13, 14, 15, 16, 17, 18, 19 - psrldq m2, 4 ; m2 = 18, 19, 20, 21, 22, 23, x, x - SBUTTERFLY2 wd, 0, 1, 4 ; m0 = 0, 6, 1, 7, 2, 8, 3, 9 - ; m1 = 4, 10, 5, 11, x, x, x, x - SBUTTERFLY2 wd, 3, 2, 4 ; m3 = 12, 18, 13, 19, 14, 20, 15, 21 - ; m2 = 16, 22, 17, 23, x, x, x, x - SBUTTERFLY2 dq, 0, 3, 4 ; m0 = 0, 6, 12, 18, 1, 7, 13, 19 - ; m3 = 2, 8, 14, 20, 3, 9, 15, 21 - punpckldq m1, m2 ; m1 = 4, 10, 16, 22, 5, 11, 17, 23 - movq [dstq ], m0 - movhps [dstq+dst1q], m0 - movq [dstq+dst2q], m3 - movhps [dstq+dst3q], m3 - movq [dstq+dst4q], m1 - movhps [dstq+dst5q], m1 - add srcq, mmsize*3 - add dstq, mmsize/2 - sub lend, mmsize/4 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16_TO_S16P_6CH -INIT_XMM ssse3 -CONV_S16_TO_S16P_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16_TO_S16P_6CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16_to_fltp_2ch(float *const *dst, int16_t *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_S16_TO_FLTP_2CH 0 -cglobal conv_s16_to_fltp_2ch, 3,4,5, dst0, src, len, dst1 - lea lenq, [4*lend] - mov dst1q, [dst0q+gprsize] - mov dst0q, [dst0q ] - add srcq, lenq - add dst0q, lenq - add dst1q, lenq - neg lenq - mova m3, [pf_s32_inv_scale] - mova m4, [pw_zero_even] -.loop: - mova m1, [srcq+lenq] - pslld m0, m1, 16 - pand m1, m4 - cvtdq2ps m0, m0 - cvtdq2ps m1, m1 - mulps m0, m0, m3 - mulps m1, m1, m3 - mova [dst0q+lenq], m0 - mova [dst1q+lenq], m1 - add lenq, mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16_TO_FLTP_2CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16_TO_FLTP_2CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_s16_to_fltp_6ch(float *const *dst, int16_t *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_S16_TO_FLTP_6CH 0 -%if ARCH_X86_64 -cglobal conv_s16_to_fltp_6ch, 3,8,7, dst, src, len, dst1, dst2, dst3, dst4, dst5 -%else -cglobal conv_s16_to_fltp_6ch, 2,7,7, dst, src, dst1, dst2, dst3, dst4, dst5 -%define lend dword r2m -%endif - mov dst1q, [dstq+ gprsize] - mov dst2q, [dstq+2*gprsize] - mov dst3q, [dstq+3*gprsize] - mov dst4q, [dstq+4*gprsize] - mov dst5q, [dstq+5*gprsize] - mov dstq, [dstq ] - sub dst1q, dstq - sub dst2q, dstq - sub dst3q, dstq - sub dst4q, dstq - sub dst5q, dstq - mova m6, [pf_s16_inv_scale] -.loop: - mova m0, [srcq+0*mmsize] ; m0 = 0, 1, 2, 3, 4, 5, 6, 7 - mova m3, [srcq+1*mmsize] ; m3 = 8, 9, 10, 11, 12, 13, 14, 15 - mova m2, [srcq+2*mmsize] ; m2 = 16, 17, 18, 19, 20, 21, 22, 23 - PALIGNR m1, m3, m0, 12, m4 ; m1 = 6, 7, 8, 9, 10, 11, x, x - shufps m3, m2, q1032 ; m3 = 12, 13, 14, 15, 16, 17, 18, 19 - psrldq m2, 4 ; m2 = 18, 19, 20, 21, 22, 23, x, x - SBUTTERFLY2 wd, 0, 1, 4 ; m0 = 0, 6, 1, 7, 2, 8, 3, 9 - ; m1 = 4, 10, 5, 11, x, x, x, x - SBUTTERFLY2 wd, 3, 2, 4 ; m3 = 12, 18, 13, 19, 14, 20, 15, 21 - ; m2 = 16, 22, 17, 23, x, x, x, x - SBUTTERFLY2 dq, 0, 3, 4 ; m0 = 0, 6, 12, 18, 1, 7, 13, 19 - ; m3 = 2, 8, 14, 20, 3, 9, 15, 21 - punpckldq m1, m2 ; m1 = 4, 10, 16, 22, 5, 11, 17, 23 - S16_TO_S32_SX 0, 2 ; m0 = 0, 6, 12, 18 - ; m2 = 1, 7, 13, 19 - S16_TO_S32_SX 3, 4 ; m3 = 2, 8, 14, 20 - ; m4 = 3, 9, 15, 21 - S16_TO_S32_SX 1, 5 ; m1 = 4, 10, 16, 22 - ; m5 = 5, 11, 17, 23 - SWAP 1,2,3,4 - cvtdq2ps m0, m0 - cvtdq2ps m1, m1 - cvtdq2ps m2, m2 - cvtdq2ps m3, m3 - cvtdq2ps m4, m4 - cvtdq2ps m5, m5 - mulps m0, m6 - mulps m1, m6 - mulps m2, m6 - mulps m3, m6 - mulps m4, m6 - mulps m5, m6 - mova [dstq ], m0 - mova [dstq+dst1q], m1 - mova [dstq+dst2q], m2 - mova [dstq+dst3q], m3 - mova [dstq+dst4q], m4 - mova [dstq+dst5q], m5 - add srcq, mmsize*3 - add dstq, mmsize - sub lend, mmsize/4 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_S16_TO_FLTP_6CH -INIT_XMM ssse3 -CONV_S16_TO_FLTP_6CH -INIT_XMM sse4 -CONV_S16_TO_FLTP_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_S16_TO_FLTP_6CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_flt_to_s16p_2ch(int16_t *const *dst, float *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_FLT_TO_S16P_2CH 0 -cglobal conv_flt_to_s16p_2ch, 3,4,6, dst0, src, len, dst1 - lea lenq, [2*lend] - mov dst1q, [dst0q+gprsize] - mov dst0q, [dst0q ] - lea srcq, [srcq+4*lenq] - add dst0q, lenq - add dst1q, lenq - neg lenq - mova m5, [pf_s16_scale] -.loop: - mova m0, [srcq+4*lenq ] - mova m1, [srcq+4*lenq+ mmsize] - mova m2, [srcq+4*lenq+2*mmsize] - mova m3, [srcq+4*lenq+3*mmsize] - DEINT2_PS 0, 1, 4 - DEINT2_PS 2, 3, 4 - mulps m0, m0, m5 - mulps m1, m1, m5 - mulps m2, m2, m5 - mulps m3, m3, m5 - cvtps2dq m0, m0 - cvtps2dq m1, m1 - cvtps2dq m2, m2 - cvtps2dq m3, m3 - packssdw m0, m2 - packssdw m1, m3 - mova [dst0q+lenq], m0 - mova [dst1q+lenq], m1 - add lenq, mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_FLT_TO_S16P_2CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_FLT_TO_S16P_2CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_flt_to_s16p_6ch(int16_t *const *dst, float *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_FLT_TO_S16P_6CH 0 -%if ARCH_X86_64 -cglobal conv_flt_to_s16p_6ch, 3,8,7, dst, src, len, dst1, dst2, dst3, dst4, dst5 -%else -cglobal conv_flt_to_s16p_6ch, 2,7,7, dst, src, dst1, dst2, dst3, dst4, dst5 -%define lend dword r2m -%endif - mov dst1q, [dstq+ gprsize] - mov dst2q, [dstq+2*gprsize] - mov dst3q, [dstq+3*gprsize] - mov dst4q, [dstq+4*gprsize] - mov dst5q, [dstq+5*gprsize] - mov dstq, [dstq ] - sub dst1q, dstq - sub dst2q, dstq - sub dst3q, dstq - sub dst4q, dstq - sub dst5q, dstq - mova m6, [pf_s16_scale] -.loop: - mulps m0, m6, [srcq+0*mmsize] - mulps m3, m6, [srcq+1*mmsize] - mulps m1, m6, [srcq+2*mmsize] - mulps m4, m6, [srcq+3*mmsize] - mulps m2, m6, [srcq+4*mmsize] - mulps m5, m6, [srcq+5*mmsize] - cvtps2dq m0, m0 - cvtps2dq m1, m1 - cvtps2dq m2, m2 - cvtps2dq m3, m3 - cvtps2dq m4, m4 - cvtps2dq m5, m5 - packssdw m0, m3 ; m0 = 0, 1, 2, 3, 4, 5, 6, 7 - packssdw m1, m4 ; m1 = 8, 9, 10, 11, 12, 13, 14, 15 - packssdw m2, m5 ; m2 = 16, 17, 18, 19, 20, 21, 22, 23 - PALIGNR m3, m1, m0, 12, m4 ; m3 = 6, 7, 8, 9, 10, 11, x, x - shufps m1, m2, q1032 ; m1 = 12, 13, 14, 15, 16, 17, 18, 19 - psrldq m2, 4 ; m2 = 18, 19, 20, 21, 22, 23, x, x - SBUTTERFLY2 wd, 0, 3, 4 ; m0 = 0, 6, 1, 7, 2, 8, 3, 9 - ; m3 = 4, 10, 5, 11, x, x, x, x - SBUTTERFLY2 wd, 1, 2, 4 ; m1 = 12, 18, 13, 19, 14, 20, 15, 21 - ; m2 = 16, 22, 17, 23, x, x, x, x - SBUTTERFLY2 dq, 0, 1, 4 ; m0 = 0, 6, 12, 18, 1, 7, 13, 19 - ; m1 = 2, 8, 14, 20, 3, 9, 15, 21 - punpckldq m3, m2 ; m3 = 4, 10, 16, 22, 5, 11, 17, 23 - movq [dstq ], m0 - movhps [dstq+dst1q], m0 - movq [dstq+dst2q], m1 - movhps [dstq+dst3q], m1 - movq [dstq+dst4q], m3 - movhps [dstq+dst5q], m3 - add srcq, mmsize*6 - add dstq, mmsize/2 - sub lend, mmsize/4 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_FLT_TO_S16P_6CH -INIT_XMM ssse3 -CONV_FLT_TO_S16P_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_FLT_TO_S16P_6CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_flt_to_fltp_2ch(float *const *dst, float *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_FLT_TO_FLTP_2CH 0 -cglobal conv_flt_to_fltp_2ch, 3,4,3, dst0, src, len, dst1 - lea lenq, [4*lend] - mov dst1q, [dst0q+gprsize] - mov dst0q, [dst0q ] - lea srcq, [srcq+2*lenq] - add dst0q, lenq - add dst1q, lenq - neg lenq -.loop: - mova m0, [srcq+2*lenq ] - mova m1, [srcq+2*lenq+mmsize] - DEINT2_PS 0, 1, 2 - mova [dst0q+lenq], m0 - mova [dst1q+lenq], m1 - add lenq, mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse -CONV_FLT_TO_FLTP_2CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_FLT_TO_FLTP_2CH -%endif - -;------------------------------------------------------------------------------ -; void ff_conv_flt_to_fltp_6ch(float *const *dst, float *src, int len, -; int channels); -;------------------------------------------------------------------------------ - -%macro CONV_FLT_TO_FLTP_6CH 0 -%if ARCH_X86_64 -cglobal conv_flt_to_fltp_6ch, 3,8,7, dst, src, len, dst1, dst2, dst3, dst4, dst5 -%else -cglobal conv_flt_to_fltp_6ch, 2,7,7, dst, src, dst1, dst2, dst3, dst4, dst5 -%define lend dword r2m -%endif - mov dst1q, [dstq+ gprsize] - mov dst2q, [dstq+2*gprsize] - mov dst3q, [dstq+3*gprsize] - mov dst4q, [dstq+4*gprsize] - mov dst5q, [dstq+5*gprsize] - mov dstq, [dstq ] - sub dst1q, dstq - sub dst2q, dstq - sub dst3q, dstq - sub dst4q, dstq - sub dst5q, dstq -.loop: - mova m0, [srcq+0*mmsize] ; m0 = 0, 1, 2, 3 - mova m1, [srcq+1*mmsize] ; m1 = 4, 5, 6, 7 - mova m2, [srcq+2*mmsize] ; m2 = 8, 9, 10, 11 - mova m3, [srcq+3*mmsize] ; m3 = 12, 13, 14, 15 - mova m4, [srcq+4*mmsize] ; m4 = 16, 17, 18, 19 - mova m5, [srcq+5*mmsize] ; m5 = 20, 21, 22, 23 - - SBUTTERFLY2 dq, 0, 3, 6 ; m0 = 0, 12, 1, 13 - ; m3 = 2, 14, 3, 15 - SBUTTERFLY2 dq, 1, 4, 6 ; m1 = 4, 16, 5, 17 - ; m4 = 6, 18, 7, 19 - SBUTTERFLY2 dq, 2, 5, 6 ; m2 = 8, 20, 9, 21 - ; m5 = 10, 22, 11, 23 - SBUTTERFLY2 dq, 0, 4, 6 ; m0 = 0, 6, 12, 18 - ; m4 = 1, 7, 13, 19 - SBUTTERFLY2 dq, 3, 2, 6 ; m3 = 2, 8, 14, 20 - ; m2 = 3, 9, 15, 21 - SBUTTERFLY2 dq, 1, 5, 6 ; m1 = 4, 10, 16, 22 - ; m5 = 5, 11, 17, 23 - mova [dstq ], m0 - mova [dstq+dst1q], m4 - mova [dstq+dst2q], m3 - mova [dstq+dst3q], m2 - mova [dstq+dst4q], m1 - mova [dstq+dst5q], m5 - add srcq, mmsize*6 - add dstq, mmsize - sub lend, mmsize/4 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -CONV_FLT_TO_FLTP_6CH -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -CONV_FLT_TO_FLTP_6CH -%endif diff --git a/libavresample/x86/audio_convert_init.c b/libavresample/x86/audio_convert_init.c deleted file mode 100644 index 0af4222bea..0000000000 --- a/libavresample/x86/audio_convert_init.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "libavutil/cpu.h" -#include "libavutil/x86/cpu.h" -#include "libavresample/audio_convert.h" - -/* flat conversions */ - -void ff_conv_s16_to_s32_sse2(int16_t *dst, const int32_t *src, int len); - -void ff_conv_s16_to_flt_sse2(float *dst, const int16_t *src, int len); -void ff_conv_s16_to_flt_sse4(float *dst, const int16_t *src, int len); - -void ff_conv_s32_to_s16_mmx (int16_t *dst, const int32_t *src, int len); -void ff_conv_s32_to_s16_sse2(int16_t *dst, const int32_t *src, int len); - -void ff_conv_s32_to_flt_sse2(float *dst, const int32_t *src, int len); -void ff_conv_s32_to_flt_avx (float *dst, const int32_t *src, int len); - -void ff_conv_flt_to_s16_sse2(int16_t *dst, const float *src, int len); - -void ff_conv_flt_to_s32_sse2(int32_t *dst, const float *src, int len); -void ff_conv_flt_to_s32_avx (int32_t *dst, const float *src, int len); - -/* interleave conversions */ - -void ff_conv_s16p_to_s16_2ch_sse2(int16_t *dst, int16_t *const *src, - int len, int channels); -void ff_conv_s16p_to_s16_2ch_avx (int16_t *dst, int16_t *const *src, - int len, int channels); - -void ff_conv_s16p_to_s16_6ch_sse2(int16_t *dst, int16_t *const *src, - int len, int channels); -void ff_conv_s16p_to_s16_6ch_sse2slow(int16_t *dst, int16_t *const *src, - int len, int channels); -void ff_conv_s16p_to_s16_6ch_avx (int16_t *dst, int16_t *const *src, - int len, int channels); - -void ff_conv_s16p_to_flt_2ch_sse2(float *dst, int16_t *const *src, - int len, int channels); -void ff_conv_s16p_to_flt_2ch_avx (float *dst, int16_t *const *src, - int len, int channels); - -void ff_conv_s16p_to_flt_6ch_sse2 (float *dst, int16_t *const *src, - int len, int channels); -void ff_conv_s16p_to_flt_6ch_ssse3(float *dst, int16_t *const *src, - int len, int channels); -void ff_conv_s16p_to_flt_6ch_avx (float *dst, int16_t *const *src, - int len, int channels); - -void ff_conv_fltp_to_s16_2ch_sse2 (int16_t *dst, float *const *src, - int len, int channels); -void ff_conv_fltp_to_s16_2ch_ssse3(int16_t *dst, float *const *src, - int len, int channels); - -void ff_conv_fltp_to_s16_6ch_sse (int16_t *dst, float *const *src, - int len, int channels); -void ff_conv_fltp_to_s16_6ch_sse2(int16_t *dst, float *const *src, - int len, int channels); -void ff_conv_fltp_to_s16_6ch_avx (int16_t *dst, float *const *src, - int len, int channels); - -void ff_conv_fltp_to_flt_2ch_sse(float *dst, float *const *src, int len, - int channels); -void ff_conv_fltp_to_flt_2ch_avx(float *dst, float *const *src, int len, - int channels); - -void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int len, - int channels); -void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int len, - int channels); -void ff_conv_fltp_to_flt_6ch_avx (float *dst, float *const *src, int len, - int channels); - -/* deinterleave conversions */ - -void ff_conv_s16_to_s16p_2ch_sse2(int16_t *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_s16p_2ch_ssse3(int16_t *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_s16p_2ch_avx (int16_t *const *dst, int16_t *src, - int len, int channels); - -void ff_conv_s16_to_s16p_6ch_sse2 (int16_t *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_s16p_6ch_ssse3(int16_t *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_s16p_6ch_avx (int16_t *const *dst, int16_t *src, - int len, int channels); - -void ff_conv_s16_to_fltp_2ch_sse2(float *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_fltp_2ch_avx (float *const *dst, int16_t *src, - int len, int channels); - -void ff_conv_s16_to_fltp_6ch_sse2 (float *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_fltp_6ch_ssse3(float *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_fltp_6ch_sse4 (float *const *dst, int16_t *src, - int len, int channels); -void ff_conv_s16_to_fltp_6ch_avx (float *const *dst, int16_t *src, - int len, int channels); - -void ff_conv_flt_to_s16p_2ch_sse2(int16_t *const *dst, float *src, - int len, int channels); -void ff_conv_flt_to_s16p_2ch_avx (int16_t *const *dst, float *src, - int len, int channels); - -void ff_conv_flt_to_s16p_6ch_sse2 (int16_t *const *dst, float *src, - int len, int channels); -void ff_conv_flt_to_s16p_6ch_ssse3(int16_t *const *dst, float *src, - int len, int channels); -void ff_conv_flt_to_s16p_6ch_avx (int16_t *const *dst, float *src, - int len, int channels); - -void ff_conv_flt_to_fltp_2ch_sse(float *const *dst, float *src, int len, - int channels); -void ff_conv_flt_to_fltp_2ch_avx(float *const *dst, float *src, int len, - int channels); - -void ff_conv_flt_to_fltp_6ch_sse2(float *const *dst, float *src, int len, - int channels); -void ff_conv_flt_to_fltp_6ch_avx (float *const *dst, float *src, int len, - int channels); - -av_cold void ff_audio_convert_init_x86(AudioConvert *ac) -{ - int cpu_flags = av_get_cpu_flags(); - - if (EXTERNAL_MMX(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, - 0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, - 6, 1, 4, "MMX", ff_conv_fltp_to_flt_6ch_mmx); - } - if (EXTERNAL_SSE(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 6, 1, 2, "SSE", ff_conv_fltp_to_s16_6ch_sse); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, - 2, 16, 8, "SSE", ff_conv_fltp_to_flt_2ch_sse); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, - 2, 16, 4, "SSE", ff_conv_flt_to_fltp_2ch_sse); - } - if (EXTERNAL_SSE2(cpu_flags)) { - if (!(cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, - 0, 16, 16, "SSE2", ff_conv_s32_to_s16_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, - 6, 16, 8, "SSE2", ff_conv_s16p_to_s16_6ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 6, 16, 4, "SSE2", ff_conv_fltp_to_s16_6ch_sse2); - } else { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, - 6, 1, 4, "SSE2SLOW", ff_conv_s16p_to_s16_6ch_sse2slow); - } - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16, - 0, 16, 8, "SSE2", ff_conv_s16_to_s32_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, - 0, 16, 8, "SSE2", ff_conv_s16_to_flt_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32, - 0, 16, 8, "SSE2", ff_conv_s32_to_flt_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT, - 0, 16, 16, "SSE2", ff_conv_flt_to_s16_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT, - 0, 16, 16, "SSE2", ff_conv_flt_to_s32_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, - 2, 16, 16, "SSE2", ff_conv_s16p_to_s16_2ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, - 2, 16, 8, "SSE2", ff_conv_s16p_to_flt_2ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, - 6, 16, 4, "SSE2", ff_conv_s16p_to_flt_6ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 2, 16, 4, "SSE2", ff_conv_fltp_to_s16_2ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16, - 2, 16, 8, "SSE2", ff_conv_s16_to_s16p_2ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16, - 6, 16, 4, "SSE2", ff_conv_s16_to_s16p_6ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16, - 2, 16, 8, "SSE2", ff_conv_s16_to_fltp_2ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16, - 6, 16, 4, "SSE2", ff_conv_s16_to_fltp_6ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, - 2, 16, 8, "SSE2", ff_conv_flt_to_s16p_2ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, - 6, 16, 4, "SSE2", ff_conv_flt_to_s16p_6ch_sse2); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, - 6, 16, 4, "SSE2", ff_conv_flt_to_fltp_6ch_sse2); - } - if (EXTERNAL_SSSE3(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, - 6, 16, 4, "SSSE3", ff_conv_s16p_to_flt_6ch_ssse3); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 2, 16, 4, "SSSE3", ff_conv_fltp_to_s16_2ch_ssse3); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16, - 2, 16, 8, "SSSE3", ff_conv_s16_to_s16p_2ch_ssse3); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16, - 6, 16, 4, "SSSE3", ff_conv_s16_to_s16p_6ch_ssse3); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16, - 6, 16, 4, "SSSE3", ff_conv_s16_to_fltp_6ch_ssse3); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, - 6, 16, 4, "SSSE3", ff_conv_flt_to_s16p_6ch_ssse3); - } - if (EXTERNAL_SSE4(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, - 0, 16, 8, "SSE4", ff_conv_s16_to_flt_sse4); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, - 6, 16, 4, "SSE4", ff_conv_fltp_to_flt_6ch_sse4); - } - if (EXTERNAL_AVX_FAST(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32, - 0, 32, 16, "AVX", ff_conv_s32_to_flt_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT, - 0, 32, 32, "AVX", ff_conv_flt_to_s32_avx); - } - if (EXTERNAL_AVX(cpu_flags)) { - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, - 2, 16, 16, "AVX", ff_conv_s16p_to_s16_2ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, - 6, 16, 8, "AVX", ff_conv_s16p_to_s16_6ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, - 2, 16, 8, "AVX", ff_conv_s16p_to_flt_2ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, - 6, 16, 4, "AVX", ff_conv_s16p_to_flt_6ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, - 6, 16, 4, "AVX", ff_conv_fltp_to_s16_6ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, - 6, 16, 4, "AVX", ff_conv_fltp_to_flt_6ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16, - 2, 16, 8, "AVX", ff_conv_s16_to_s16p_2ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16, - 6, 16, 4, "AVX", ff_conv_s16_to_s16p_6ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16, - 2, 16, 8, "AVX", ff_conv_s16_to_fltp_2ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16, - 6, 16, 4, "AVX", ff_conv_s16_to_fltp_6ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, - 2, 16, 8, "AVX", ff_conv_flt_to_s16p_2ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, - 6, 16, 4, "AVX", ff_conv_flt_to_s16p_6ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, - 2, 16, 4, "AVX", ff_conv_flt_to_fltp_2ch_avx); - ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT, - 6, 16, 4, "AVX", ff_conv_flt_to_fltp_6ch_avx); - } -} diff --git a/libavresample/x86/audio_mix.asm b/libavresample/x86/audio_mix.asm deleted file mode 100644 index fe27d6a6c9..0000000000 --- a/libavresample/x86/audio_mix.asm +++ /dev/null @@ -1,511 +0,0 @@ -;****************************************************************************** -;* x86 optimized channel mixing -;* Copyright (c) 2012 Justin Ruggles -;* -;* This file is part of FFmpeg. -;* -;* FFmpeg is free software; you can redistribute it and/or -;* modify it under the terms of the GNU Lesser General Public -;* License as published by the Free Software Foundation; either -;* version 2.1 of the License, or (at your option) any later version. -;* -;* FFmpeg is distributed in the hope that it will be useful, -;* but WITHOUT ANY WARRANTY; without even the implied warranty of -;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;* Lesser General Public License for more details. -;* -;* You should have received a copy of the GNU Lesser General Public -;* License along with FFmpeg; if not, write to the Free Software -;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -;****************************************************************************** - -%include "libavutil/x86/x86util.asm" -%include "util.asm" - -SECTION .text - -;----------------------------------------------------------------------------- -; void ff_mix_2_to_1_fltp_flt(float **src, float **matrix, int len, -; int out_ch, int in_ch); -;----------------------------------------------------------------------------- - -%macro MIX_2_TO_1_FLTP_FLT 0 -cglobal mix_2_to_1_fltp_flt, 3,4,6, src, matrix, len, src1 - mov src1q, [srcq+gprsize] - mov srcq, [srcq ] - sub src1q, srcq - mov matrixq, [matrixq ] - VBROADCASTSS m4, [matrixq ] - VBROADCASTSS m5, [matrixq+4] - ALIGN 16 -.loop: - mulps m0, m4, [srcq ] - mulps m1, m5, [srcq+src1q ] - mulps m2, m4, [srcq+ mmsize] - mulps m3, m5, [srcq+src1q+mmsize] - addps m0, m0, m1 - addps m2, m2, m3 - mova [srcq ], m0 - mova [srcq+mmsize], m2 - add srcq, mmsize*2 - sub lend, mmsize*2/4 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse -MIX_2_TO_1_FLTP_FLT -%if HAVE_AVX_EXTERNAL -INIT_YMM avx -MIX_2_TO_1_FLTP_FLT -%endif - -;----------------------------------------------------------------------------- -; void ff_mix_2_to_1_s16p_flt(int16_t **src, float **matrix, int len, -; int out_ch, int in_ch); -;----------------------------------------------------------------------------- - -%macro MIX_2_TO_1_S16P_FLT 0 -cglobal mix_2_to_1_s16p_flt, 3,4,6, src, matrix, len, src1 - mov src1q, [srcq+gprsize] - mov srcq, [srcq] - sub src1q, srcq - mov matrixq, [matrixq ] - VBROADCASTSS m4, [matrixq ] - VBROADCASTSS m5, [matrixq+4] - ALIGN 16 -.loop: - mova m0, [srcq ] - mova m2, [srcq+src1q] - S16_TO_S32_SX 0, 1 - S16_TO_S32_SX 2, 3 - cvtdq2ps m0, m0 - cvtdq2ps m1, m1 - cvtdq2ps m2, m2 - cvtdq2ps m3, m3 - mulps m0, m4 - mulps m1, m4 - mulps m2, m5 - mulps m3, m5 - addps m0, m2 - addps m1, m3 - cvtps2dq m0, m0 - cvtps2dq m1, m1 - packssdw m0, m1 - mova [srcq], m0 - add srcq, mmsize - sub lend, mmsize/2 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -MIX_2_TO_1_S16P_FLT -INIT_XMM sse4 -MIX_2_TO_1_S16P_FLT - -;----------------------------------------------------------------------------- -; void ff_mix_2_to_1_s16p_q8(int16_t **src, int16_t **matrix, int len, -; int out_ch, int in_ch); -;----------------------------------------------------------------------------- - -INIT_XMM sse2 -cglobal mix_2_to_1_s16p_q8, 3,4,6, src, matrix, len, src1 - mov src1q, [srcq+gprsize] - mov srcq, [srcq] - sub src1q, srcq - mov matrixq, [matrixq] - movd m4, [matrixq] - movd m5, [matrixq] - SPLATW m4, m4, 0 - SPLATW m5, m5, 1 - pxor m0, m0 - punpcklwd m4, m0 - punpcklwd m5, m0 - ALIGN 16 -.loop: - mova m0, [srcq ] - mova m2, [srcq+src1q] - punpckhwd m1, m0, m0 - punpcklwd m0, m0 - punpckhwd m3, m2, m2 - punpcklwd m2, m2 - pmaddwd m0, m4 - pmaddwd m1, m4 - pmaddwd m2, m5 - pmaddwd m3, m5 - paddd m0, m2 - paddd m1, m3 - psrad m0, 8 - psrad m1, 8 - packssdw m0, m1 - mova [srcq], m0 - add srcq, mmsize - sub lend, mmsize/2 - jg .loop - REP_RET - -;----------------------------------------------------------------------------- -; void ff_mix_1_to_2_fltp_flt(float **src, float **matrix, int len, -; int out_ch, int in_ch); -;----------------------------------------------------------------------------- - -%macro MIX_1_TO_2_FLTP_FLT 0 -cglobal mix_1_to_2_fltp_flt, 3,5,4, src0, matrix0, len, src1, matrix1 - mov src1q, [src0q+gprsize] - mov src0q, [src0q] - sub src1q, src0q - mov matrix1q, [matrix0q+gprsize] - mov matrix0q, [matrix0q] - VBROADCASTSS m2, [matrix0q] - VBROADCASTSS m3, [matrix1q] - ALIGN 16 -.loop: - mova m0, [src0q] - mulps m1, m0, m3 - mulps m0, m0, m2 - mova [src0q ], m0 - mova [src0q+src1q], m1 - add src0q, mmsize - sub lend, mmsize/4 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse -MIX_1_TO_2_FLTP_FLT -%if HAVE_AVX_EXTERNAL -INIT_YMM avx -MIX_1_TO_2_FLTP_FLT -%endif - -;----------------------------------------------------------------------------- -; void ff_mix_1_to_2_s16p_flt(int16_t **src, float **matrix, int len, -; int out_ch, int in_ch); -;----------------------------------------------------------------------------- - -%macro MIX_1_TO_2_S16P_FLT 0 -cglobal mix_1_to_2_s16p_flt, 3,5,6, src0, matrix0, len, src1, matrix1 - mov src1q, [src0q+gprsize] - mov src0q, [src0q] - sub src1q, src0q - mov matrix1q, [matrix0q+gprsize] - mov matrix0q, [matrix0q] - VBROADCASTSS m4, [matrix0q] - VBROADCASTSS m5, [matrix1q] - ALIGN 16 -.loop: - mova m0, [src0q] - S16_TO_S32_SX 0, 2 - cvtdq2ps m0, m0 - cvtdq2ps m2, m2 - mulps m1, m0, m5 - mulps m0, m0, m4 - mulps m3, m2, m5 - mulps m2, m2, m4 - cvtps2dq m0, m0 - cvtps2dq m1, m1 - cvtps2dq m2, m2 - cvtps2dq m3, m3 - packssdw m0, m2 - packssdw m1, m3 - mova [src0q ], m0 - mova [src0q+src1q], m1 - add src0q, mmsize - sub lend, mmsize/2 - jg .loop - REP_RET -%endmacro - -INIT_XMM sse2 -MIX_1_TO_2_S16P_FLT -INIT_XMM sse4 -MIX_1_TO_2_S16P_FLT -%if HAVE_AVX_EXTERNAL -INIT_XMM avx -MIX_1_TO_2_S16P_FLT -%endif - -;----------------------------------------------------------------------------- -; void ff_mix_3_8_to_1_2_fltp/s16p_flt(float/int16_t **src, float **matrix, -; int len, int out_ch, int in_ch); -;----------------------------------------------------------------------------- - -%macro MIX_3_8_TO_1_2_FLT 3 ; %1 = in channels, %2 = out channels, %3 = s16p or fltp -; define some names to make the code clearer -%assign in_channels %1 -%assign out_channels %2 -%assign stereo out_channels - 1 -%ifidn %3, s16p - %assign is_s16 1 -%else - %assign is_s16 0 -%endif - -; determine how many matrix elements must go on the stack vs. mmregs -%assign matrix_elements in_channels * out_channels -%if is_s16 - %if stereo - %assign needed_mmregs 7 - %else - %assign needed_mmregs 5 - %endif -%else - %if stereo - %assign needed_mmregs 4 - %else - %assign needed_mmregs 3 - %endif -%endif -%assign matrix_elements_mm num_mmregs - needed_mmregs -%if matrix_elements < matrix_elements_mm - %assign matrix_elements_mm matrix_elements -%endif -%if matrix_elements_mm < matrix_elements - %assign matrix_elements_stack matrix_elements - matrix_elements_mm -%else - %assign matrix_elements_stack 0 -%endif -%assign matrix_stack_size matrix_elements_stack * mmsize - -%assign needed_stack_size -1 * matrix_stack_size -%if ARCH_X86_32 && in_channels >= 7 -%assign needed_stack_size needed_stack_size - 16 -%endif - -cglobal mix_%1_to_%2_%3_flt, 3,in_channels+2,needed_mmregs+matrix_elements_mm, needed_stack_size, src0, src1, len, src2, src3, src4, src5, src6, src7 - -; define src pointers on stack if needed -%if matrix_elements_stack > 0 && ARCH_X86_32 && in_channels >= 7 - %define src5m [rsp+matrix_stack_size+0] - %define src6m [rsp+matrix_stack_size+4] - %define src7m [rsp+matrix_stack_size+8] -%endif - -; load matrix pointers -%define matrix0q r1q -%define matrix1q r3q -%if stereo - mov matrix1q, [matrix0q+gprsize] -%endif - mov matrix0q, [matrix0q] - -; define matrix coeff names -%assign %%i 0 -%assign %%j needed_mmregs -%rep in_channels - %if %%i >= matrix_elements_mm - CAT_XDEFINE mx_stack_0_, %%i, 1 - CAT_XDEFINE mx_0_, %%i, [rsp+(%%i-matrix_elements_mm)*mmsize] - %else - CAT_XDEFINE mx_stack_0_, %%i, 0 - CAT_XDEFINE mx_0_, %%i, m %+ %%j - %assign %%j %%j+1 - %endif - %assign %%i %%i+1 -%endrep -%if stereo -%assign %%i 0 -%rep in_channels - %if in_channels + %%i >= matrix_elements_mm - CAT_XDEFINE mx_stack_1_, %%i, 1 - CAT_XDEFINE mx_1_, %%i, [rsp+(in_channels+%%i-matrix_elements_mm)*mmsize] - %else - CAT_XDEFINE mx_stack_1_, %%i, 0 - CAT_XDEFINE mx_1_, %%i, m %+ %%j - %assign %%j %%j+1 - %endif - %assign %%i %%i+1 -%endrep -%endif - -; load/splat matrix coeffs -%assign %%i 0 -%rep in_channels - %if mx_stack_0_ %+ %%i - VBROADCASTSS m0, [matrix0q+4*%%i] - mova mx_0_ %+ %%i, m0 - %else - VBROADCASTSS mx_0_ %+ %%i, [matrix0q+4*%%i] - %endif - %if stereo - %if mx_stack_1_ %+ %%i - VBROADCASTSS m0, [matrix1q+4*%%i] - mova mx_1_ %+ %%i, m0 - %else - VBROADCASTSS mx_1_ %+ %%i, [matrix1q+4*%%i] - %endif - %endif - %assign %%i %%i+1 -%endrep - -; load channel pointers to registers as offsets from the first channel pointer -%if ARCH_X86_64 - movsxd lenq, r2d -%endif - shl lenq, 2-is_s16 -%assign %%i 1 -%rep (in_channels - 1) - %if ARCH_X86_32 && in_channels >= 7 && %%i >= 5 - mov src5q, [src0q+%%i*gprsize] - add src5q, lenq - mov src %+ %%i %+ m, src5q - %else - mov src %+ %%i %+ q, [src0q+%%i*gprsize] - add src %+ %%i %+ q, lenq - %endif - %assign %%i %%i+1 -%endrep - mov src0q, [src0q] - add src0q, lenq - neg lenq -.loop: -; for x86-32 with 7-8 channels we do not have enough gp registers for all src -; pointers, so we have to load some of them from the stack each time -%define copy_src_from_stack ARCH_X86_32 && in_channels >= 7 && %%i >= 5 -%if is_s16 - ; mix with s16p input - mova m0, [src0q+lenq] - S16_TO_S32_SX 0, 1 - cvtdq2ps m0, m0 - cvtdq2ps m1, m1 - %if stereo - mulps m2, m0, mx_1_0 - mulps m3, m1, mx_1_0 - %endif - mulps m0, m0, mx_0_0 - mulps m1, m1, mx_0_0 -%assign %%i 1 -%rep (in_channels - 1) - %if copy_src_from_stack - %define src_ptr src5q - %else - %define src_ptr src %+ %%i %+ q - %endif - %if stereo - %if copy_src_from_stack - mov src_ptr, src %+ %%i %+ m - %endif - mova m4, [src_ptr+lenq] - S16_TO_S32_SX 4, 5 - cvtdq2ps m4, m4 - cvtdq2ps m5, m5 - FMULADD_PS m2, m4, mx_1_ %+ %%i, m2, m6 - FMULADD_PS m3, m5, mx_1_ %+ %%i, m3, m6 - FMULADD_PS m0, m4, mx_0_ %+ %%i, m0, m4 - FMULADD_PS m1, m5, mx_0_ %+ %%i, m1, m5 - %else - %if copy_src_from_stack - mov src_ptr, src %+ %%i %+ m - %endif - mova m2, [src_ptr+lenq] - S16_TO_S32_SX 2, 3 - cvtdq2ps m2, m2 - cvtdq2ps m3, m3 - FMULADD_PS m0, m2, mx_0_ %+ %%i, m0, m4 - FMULADD_PS m1, m3, mx_0_ %+ %%i, m1, m4 - %endif - %assign %%i %%i+1 -%endrep - %if stereo - cvtps2dq m2, m2 - cvtps2dq m3, m3 - packssdw m2, m3 - mova [src1q+lenq], m2 - %endif - cvtps2dq m0, m0 - cvtps2dq m1, m1 - packssdw m0, m1 - mova [src0q+lenq], m0 -%else - ; mix with fltp input - %if stereo || mx_stack_0_0 - mova m0, [src0q+lenq] - %endif - %if stereo - mulps m1, m0, mx_1_0 - %endif - %if stereo || mx_stack_0_0 - mulps m0, m0, mx_0_0 - %else - mulps m0, mx_0_0, [src0q+lenq] - %endif -%assign %%i 1 -%rep (in_channels - 1) - %if copy_src_from_stack - %define src_ptr src5q - mov src_ptr, src %+ %%i %+ m - %else - %define src_ptr src %+ %%i %+ q - %endif - ; avoid extra load for mono if matrix is in a mm register - %if stereo || mx_stack_0_ %+ %%i - mova m2, [src_ptr+lenq] - %endif - %if stereo - FMULADD_PS m1, m2, mx_1_ %+ %%i, m1, m3 - %endif - %if stereo || mx_stack_0_ %+ %%i - FMULADD_PS m0, m2, mx_0_ %+ %%i, m0, m2 - %else - FMULADD_PS m0, mx_0_ %+ %%i, [src_ptr+lenq], m0, m1 - %endif - %assign %%i %%i+1 -%endrep - mova [src0q+lenq], m0 - %if stereo - mova [src1q+lenq], m1 - %endif -%endif - - add lenq, mmsize - jl .loop -; zero ymm high halves -%if mmsize == 32 - vzeroupper -%endif - RET -%endmacro - -%macro MIX_3_8_TO_1_2_FLT_FUNCS 0 -%assign %%i 3 -%rep 6 - INIT_XMM sse - MIX_3_8_TO_1_2_FLT %%i, 1, fltp - MIX_3_8_TO_1_2_FLT %%i, 2, fltp - INIT_XMM sse2 - MIX_3_8_TO_1_2_FLT %%i, 1, s16p - MIX_3_8_TO_1_2_FLT %%i, 2, s16p - INIT_XMM sse4 - MIX_3_8_TO_1_2_FLT %%i, 1, s16p - MIX_3_8_TO_1_2_FLT %%i, 2, s16p - ; do not use ymm AVX or FMA4 in x86-32 for 6 or more channels due to stack alignment issues - %if HAVE_AVX_EXTERNAL - %if ARCH_X86_64 || %%i < 6 - INIT_YMM avx - %else - INIT_XMM avx - %endif - MIX_3_8_TO_1_2_FLT %%i, 1, fltp - MIX_3_8_TO_1_2_FLT %%i, 2, fltp - INIT_XMM avx - MIX_3_8_TO_1_2_FLT %%i, 1, s16p - MIX_3_8_TO_1_2_FLT %%i, 2, s16p - %endif - %if HAVE_FMA4_EXTERNAL - %if ARCH_X86_64 || %%i < 6 - INIT_YMM fma4 - %else - INIT_XMM fma4 - %endif - MIX_3_8_TO_1_2_FLT %%i, 1, fltp - MIX_3_8_TO_1_2_FLT %%i, 2, fltp - INIT_XMM fma4 - MIX_3_8_TO_1_2_FLT %%i, 1, s16p - MIX_3_8_TO_1_2_FLT %%i, 2, s16p - %endif - %assign %%i %%i+1 -%endrep -%endmacro - -MIX_3_8_TO_1_2_FLT_FUNCS diff --git a/libavresample/x86/audio_mix_init.c b/libavresample/x86/audio_mix_init.c deleted file mode 100644 index 9b86be2847..0000000000 --- a/libavresample/x86/audio_mix_init.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "libavutil/cpu.h" -#include "libavutil/x86/cpu.h" -#include "libavresample/audio_mix.h" - -void ff_mix_2_to_1_fltp_flt_sse(float **src, float **matrix, int len, - int out_ch, int in_ch); -void ff_mix_2_to_1_fltp_flt_avx(float **src, float **matrix, int len, - int out_ch, int in_ch); - -void ff_mix_2_to_1_s16p_flt_sse2(int16_t **src, float **matrix, int len, - int out_ch, int in_ch); -void ff_mix_2_to_1_s16p_flt_sse4(int16_t **src, float **matrix, int len, - int out_ch, int in_ch); - -void ff_mix_2_to_1_s16p_q8_sse2(int16_t **src, int16_t **matrix, - int len, int out_ch, int in_ch); - -void ff_mix_1_to_2_fltp_flt_sse(float **src, float **matrix, int len, - int out_ch, int in_ch); -void ff_mix_1_to_2_fltp_flt_avx(float **src, float **matrix, int len, - int out_ch, int in_ch); - -void ff_mix_1_to_2_s16p_flt_sse2(int16_t **src, float **matrix, int len, - int out_ch, int in_ch); -void ff_mix_1_to_2_s16p_flt_sse4(int16_t **src, float **matrix, int len, - int out_ch, int in_ch); -void ff_mix_1_to_2_s16p_flt_avx (int16_t **src, float **matrix, int len, - int out_ch, int in_ch); - -#define DEFINE_MIX_3_8_TO_1_2(chan) \ -void ff_mix_ ## chan ## _to_1_fltp_flt_sse(float **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ -void ff_mix_ ## chan ## _to_2_fltp_flt_sse(float **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ - \ -void ff_mix_ ## chan ## _to_1_s16p_flt_sse2(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ -void ff_mix_ ## chan ## _to_2_s16p_flt_sse2(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ - \ -void ff_mix_ ## chan ## _to_1_s16p_flt_sse4(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ -void ff_mix_ ## chan ## _to_2_s16p_flt_sse4(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ - \ -void ff_mix_ ## chan ## _to_1_fltp_flt_avx(float **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ -void ff_mix_ ## chan ## _to_2_fltp_flt_avx(float **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ - \ -void ff_mix_ ## chan ## _to_1_s16p_flt_avx(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ -void ff_mix_ ## chan ## _to_2_s16p_flt_avx(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ - \ -void ff_mix_ ## chan ## _to_1_fltp_flt_fma4(float **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ -void ff_mix_ ## chan ## _to_2_fltp_flt_fma4(float **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ - \ -void ff_mix_ ## chan ## _to_1_s16p_flt_fma4(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); \ -void ff_mix_ ## chan ## _to_2_s16p_flt_fma4(int16_t **src, \ - float **matrix, int len, \ - int out_ch, int in_ch); - -DEFINE_MIX_3_8_TO_1_2(3) -DEFINE_MIX_3_8_TO_1_2(4) -DEFINE_MIX_3_8_TO_1_2(5) -DEFINE_MIX_3_8_TO_1_2(6) -DEFINE_MIX_3_8_TO_1_2(7) -DEFINE_MIX_3_8_TO_1_2(8) - -#define SET_MIX_3_8_TO_1_2(chan) \ - if (EXTERNAL_SSE(cpu_flags)) { \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ - chan, 1, 16, 4, "SSE", \ - ff_mix_ ## chan ## _to_1_fltp_flt_sse); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ - chan, 2, 16, 4, "SSE", \ - ff_mix_## chan ##_to_2_fltp_flt_sse); \ - } \ - if (EXTERNAL_SSE2(cpu_flags)) { \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 1, 16, 8, "SSE2", \ - ff_mix_ ## chan ## _to_1_s16p_flt_sse2); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 2, 16, 8, "SSE2", \ - ff_mix_ ## chan ## _to_2_s16p_flt_sse2); \ - } \ - if (EXTERNAL_SSE4(cpu_flags)) { \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 1, 16, 8, "SSE4", \ - ff_mix_ ## chan ## _to_1_s16p_flt_sse4); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 2, 16, 8, "SSE4", \ - ff_mix_ ## chan ## _to_2_s16p_flt_sse4); \ - } \ - if (EXTERNAL_AVX(cpu_flags)) { \ - int ptr_align = 32; \ - int smp_align = 8; \ - if (ARCH_X86_32 || chan >= 6) { \ - ptr_align = 16; \ - smp_align = 4; \ - } \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ - chan, 1, ptr_align, smp_align, "AVX", \ - ff_mix_ ## chan ## _to_1_fltp_flt_avx); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ - chan, 2, ptr_align, smp_align, "AVX", \ - ff_mix_ ## chan ## _to_2_fltp_flt_avx); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 1, 16, 8, "AVX", \ - ff_mix_ ## chan ## _to_1_s16p_flt_avx); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 2, 16, 8, "AVX", \ - ff_mix_ ## chan ## _to_2_s16p_flt_avx); \ - } \ - if (EXTERNAL_FMA4(cpu_flags)) { \ - int ptr_align = 32; \ - int smp_align = 8; \ - if (ARCH_X86_32 || chan >= 6) { \ - ptr_align = 16; \ - smp_align = 4; \ - } \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ - chan, 1, ptr_align, smp_align, "FMA4", \ - ff_mix_ ## chan ## _to_1_fltp_flt_fma4); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\ - chan, 2, ptr_align, smp_align, "FMA4", \ - ff_mix_ ## chan ## _to_2_fltp_flt_fma4); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 1, 16, 8, "FMA4", \ - ff_mix_ ## chan ## _to_1_s16p_flt_fma4); \ - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\ - chan, 2, 16, 8, "FMA4", \ - ff_mix_ ## chan ## _to_2_s16p_flt_fma4); \ - } - -av_cold void ff_audio_mix_init_x86(AudioMix *am) -{ - int cpu_flags = av_get_cpu_flags(); - - if (EXTERNAL_SSE(cpu_flags)) { - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 2, 1, 16, 8, "SSE", ff_mix_2_to_1_fltp_flt_sse); - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 1, 2, 16, 4, "SSE", ff_mix_1_to_2_fltp_flt_sse); - } - if (EXTERNAL_SSE2(cpu_flags)) { - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, - 2, 1, 16, 8, "SSE2", ff_mix_2_to_1_s16p_flt_sse2); - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_Q8, - 2, 1, 16, 8, "SSE2", ff_mix_2_to_1_s16p_q8_sse2); - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, - 1, 2, 16, 8, "SSE2", ff_mix_1_to_2_s16p_flt_sse2); - } - if (EXTERNAL_SSE4(cpu_flags)) { - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, - 2, 1, 16, 8, "SSE4", ff_mix_2_to_1_s16p_flt_sse4); - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, - 1, 2, 16, 8, "SSE4", ff_mix_1_to_2_s16p_flt_sse4); - } - if (EXTERNAL_AVX_FAST(cpu_flags)) { - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 2, 1, 32, 16, "AVX", ff_mix_2_to_1_fltp_flt_avx); - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT, - 1, 2, 32, 8, "AVX", ff_mix_1_to_2_fltp_flt_avx); - } - if (EXTERNAL_AVX(cpu_flags)) { - ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT, - 1, 2, 16, 8, "AVX", ff_mix_1_to_2_s16p_flt_avx); - } - - SET_MIX_3_8_TO_1_2(3) - SET_MIX_3_8_TO_1_2(4) - SET_MIX_3_8_TO_1_2(5) - SET_MIX_3_8_TO_1_2(6) - SET_MIX_3_8_TO_1_2(7) - SET_MIX_3_8_TO_1_2(8) -} diff --git a/libavresample/x86/dither.asm b/libavresample/x86/dither.asm deleted file mode 100644 index d677c7179a..0000000000 --- a/libavresample/x86/dither.asm +++ /dev/null @@ -1,117 +0,0 @@ -;****************************************************************************** -;* x86 optimized dithering format conversion -;* Copyright (c) 2012 Justin Ruggles -;* -;* This file is part of FFmpeg. -;* -;* FFmpeg is free software; you can redistribute it and/or -;* modify it under the terms of the GNU Lesser General Public -;* License as published by the Free Software Foundation; either -;* version 2.1 of the License, or (at your option) any later version. -;* -;* FFmpeg is distributed in the hope that it will be useful, -;* but WITHOUT ANY WARRANTY; without even the implied warranty of -;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;* Lesser General Public License for more details. -;* -;* You should have received a copy of the GNU Lesser General Public -;* License along with FFmpeg; if not, write to the Free Software -;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -;****************************************************************************** - -%include "libavutil/x86/x86util.asm" - -SECTION_RODATA 32 - -; 1.0f / (2.0f * INT32_MAX) -pf_dither_scale: times 8 dd 2.32830643762e-10 - -pf_s16_scale: times 4 dd 32753.0 - -SECTION .text - -;------------------------------------------------------------------------------ -; void ff_quantize(int16_t *dst, float *src, float *dither, int len); -;------------------------------------------------------------------------------ - -INIT_XMM sse2 -cglobal quantize, 4,4,3, dst, src, dither, len - lea lenq, [2*lend] - add dstq, lenq - lea srcq, [srcq+2*lenq] - lea ditherq, [ditherq+2*lenq] - neg lenq - mova m2, [pf_s16_scale] -.loop: - mulps m0, m2, [srcq+2*lenq] - mulps m1, m2, [srcq+2*lenq+mmsize] - addps m0, [ditherq+2*lenq] - addps m1, [ditherq+2*lenq+mmsize] - cvtps2dq m0, m0 - cvtps2dq m1, m1 - packssdw m0, m1 - mova [dstq+lenq], m0 - add lenq, mmsize - jl .loop - REP_RET - -;------------------------------------------------------------------------------ -; void ff_dither_int_to_float_rectangular(float *dst, int *src, int len) -;------------------------------------------------------------------------------ - -%macro DITHER_INT_TO_FLOAT_RECTANGULAR 0 -cglobal dither_int_to_float_rectangular, 3,3,3, dst, src, len - lea lenq, [4*lend] - add srcq, lenq - add dstq, lenq - neg lenq - mova m0, [pf_dither_scale] -.loop: - cvtdq2ps m1, [srcq+lenq] - cvtdq2ps m2, [srcq+lenq+mmsize] - mulps m1, m1, m0 - mulps m2, m2, m0 - mova [dstq+lenq], m1 - mova [dstq+lenq+mmsize], m2 - add lenq, 2*mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -DITHER_INT_TO_FLOAT_RECTANGULAR -INIT_YMM avx -DITHER_INT_TO_FLOAT_RECTANGULAR - -;------------------------------------------------------------------------------ -; void ff_dither_int_to_float_triangular(float *dst, int *src0, int len) -;------------------------------------------------------------------------------ - -%macro DITHER_INT_TO_FLOAT_TRIANGULAR 0 -cglobal dither_int_to_float_triangular, 3,4,5, dst, src0, len, src1 - lea lenq, [4*lend] - lea src1q, [src0q+2*lenq] - add src0q, lenq - add dstq, lenq - neg lenq - mova m0, [pf_dither_scale] -.loop: - cvtdq2ps m1, [src0q+lenq] - cvtdq2ps m2, [src0q+lenq+mmsize] - cvtdq2ps m3, [src1q+lenq] - cvtdq2ps m4, [src1q+lenq+mmsize] - addps m1, m1, m3 - addps m2, m2, m4 - mulps m1, m1, m0 - mulps m2, m2, m0 - mova [dstq+lenq], m1 - mova [dstq+lenq+mmsize], m2 - add lenq, 2*mmsize - jl .loop - REP_RET -%endmacro - -INIT_XMM sse2 -DITHER_INT_TO_FLOAT_TRIANGULAR -INIT_YMM avx -DITHER_INT_TO_FLOAT_TRIANGULAR diff --git a/libavresample/x86/dither_init.c b/libavresample/x86/dither_init.c deleted file mode 100644 index ad157b96b1..0000000000 --- a/libavresample/x86/dither_init.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012 Justin Ruggles - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "libavutil/cpu.h" -#include "libavutil/x86/cpu.h" -#include "libavresample/dither.h" - -void ff_quantize_sse2(int16_t *dst, const float *src, float *dither, int len); - -void ff_dither_int_to_float_rectangular_sse2(float *dst, int *src, int len); -void ff_dither_int_to_float_rectangular_avx(float *dst, int *src, int len); - -void ff_dither_int_to_float_triangular_sse2(float *dst, int *src0, int len); -void ff_dither_int_to_float_triangular_avx(float *dst, int *src0, int len); - -av_cold void ff_dither_init_x86(DitherDSPContext *ddsp, - enum AVResampleDitherMethod method) -{ - int cpu_flags = av_get_cpu_flags(); - - if (EXTERNAL_SSE2(cpu_flags)) { - ddsp->quantize = ff_quantize_sse2; - ddsp->ptr_align = 16; - ddsp->samples_align = 8; - } - - if (method == AV_RESAMPLE_DITHER_RECTANGULAR) { - if (EXTERNAL_SSE2(cpu_flags)) { - ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_sse2; - } - if (EXTERNAL_AVX_FAST(cpu_flags)) { - ddsp->dither_int_to_float = ff_dither_int_to_float_rectangular_avx; - } - } else { - if (EXTERNAL_SSE2(cpu_flags)) { - ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_sse2; - } - if (EXTERNAL_AVX_FAST(cpu_flags)) { - ddsp->dither_int_to_float = ff_dither_int_to_float_triangular_avx; - } - } -} diff --git a/libavresample/x86/util.asm b/libavresample/x86/util.asm deleted file mode 100644 index 187a4a21ba..0000000000 --- a/libavresample/x86/util.asm +++ /dev/null @@ -1,41 +0,0 @@ -;****************************************************************************** -;* x86 utility macros for libavresample -;* Copyright (c) 2012 Justin Ruggles -;* -;* This file is part of FFmpeg. -;* -;* FFmpeg is free software; you can redistribute it and/or -;* modify it under the terms of the GNU Lesser General Public -;* License as published by the Free Software Foundation; either -;* version 2.1 of the License, or (at your option) any later version. -;* -;* FFmpeg is distributed in the hope that it will be useful, -;* but WITHOUT ANY WARRANTY; without even the implied warranty of -;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;* Lesser General Public License for more details. -;* -;* You should have received a copy of the GNU Lesser General Public -;* License along with FFmpeg; if not, write to the Free Software -;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -;****************************************************************************** - -%macro S16_TO_S32_SX 2 ; src/low dst, high dst -%if cpuflag(sse4) - pmovsxwd m%2, m%1 - psrldq m%1, 8 - pmovsxwd m%1, m%1 - SWAP %1, %2 -%else - mova m%2, m%1 - punpckhwd m%2, m%2 - punpcklwd m%1, m%1 - psrad m%2, 16 - psrad m%1, 16 -%endif -%endmacro - -%macro DEINT2_PS 3 ; src0/even dst, src1/odd dst, temp - shufps m%3, m%1, m%2, q3131 - shufps m%1, m%2, q2020 - SWAP %2,%3 -%endmacro diff --git a/libavresample/x86/w64xmmtest.c b/libavresample/x86/w64xmmtest.c deleted file mode 100644 index 0f42bd185c..0000000000 --- a/libavresample/x86/w64xmmtest.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * check XMM registers for clobbers on Win64 - * Copyright (c) 2013 Martin Storsjo - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavresample/avresample.h" -#include "libavutil/x86/w64xmmtest.h" - -wrap(avresample_convert(AVAudioResampleContext *avr, uint8_t **output, - int out_plane_size, int out_samples, uint8_t **input, - int in_plane_size, int in_samples)) -{ - testxmmclobbers(avresample_convert, avr, output, out_plane_size, - out_samples, input, in_plane_size, in_samples); -} diff --git a/tests/Makefile b/tests/Makefile index 7844901e53..d726484b3a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -157,7 +157,6 @@ include $(SRC_PATH)/tests/fate/indeo.mak include $(SRC_PATH)/tests/fate/libavcodec.mak include $(SRC_PATH)/tests/fate/libavdevice.mak include $(SRC_PATH)/tests/fate/libavformat.mak -include $(SRC_PATH)/tests/fate/libavresample.mak include $(SRC_PATH)/tests/fate/libavutil.mak include $(SRC_PATH)/tests/fate/libswresample.mak include $(SRC_PATH)/tests/fate/libswscale.mak diff --git a/tests/fate.sh b/tests/fate.sh index 0edee7f22e..fc604559cc 100755 --- a/tests/fate.sh +++ b/tests/fate.sh @@ -48,7 +48,6 @@ configure()( --samples="${samples}" \ --enable-gpl \ --enable-memory-poisoning \ - --enable-avresample \ ${ignore_tests:+--ignore-tests="$ignore_tests"} \ ${arch:+--arch=$arch} \ ${cpu:+--cpu="$cpu"} \ diff --git a/tests/fate/libavresample.mak b/tests/fate/libavresample.mak deleted file mode 100644 index da5cbb35f7..0000000000 --- a/tests/fate/libavresample.mak +++ /dev/null @@ -1,68 +0,0 @@ -CROSS_TEST = $(foreach I,$(1), \ - $(foreach J,$(1), \ - $(if $(filter-out $(I),$(J)), \ - $(eval $(call $(2),$(I),$(J),$(3),$(4),$(5))), \ - ))) - -MIX_CHANNELS = 1 2 3 4 5 6 7 8 - -define MIX -FATE_LAVR_MIX += fate-lavr-mix-$(3)-$(1)-$(2) -fate-lavr-mix-$(3)-$(1)-$(2): tests/data/asynth-44100-$(1).wav -fate-lavr-mix-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-44100-$(1).wav -ac $(2) -mix_coeff_type $(3) -internal_sample_fmt $(4) -f s16le -af atrim=end_sample=1024 - -fate-lavr-mix-$(3)-$(1)-$(2): CMP = oneoff -fate-lavr-mix-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-mix-$(3)-$(1)-$(2) -endef - -$(call CROSS_TEST,$(MIX_CHANNELS),MIX,q8,s16p) -$(call CROSS_TEST,$(MIX_CHANNELS),MIX,q15,s16p) -$(call CROSS_TEST,$(MIX_CHANNELS),MIX,flt,fltp) - -# test output zeroing with skipped corresponding input -FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, CHANNELMAP RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-lavr-mix-output-zero -fate-lavr-mix-output-zero: tests/data/filtergraphs/lavr_mix_output_zero tests/data/asynth-44100-4.wav -fate-lavr-mix-output-zero: CMP = oneoff -fate-lavr-mix-output-zero: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-44100-4.wav -filter_script $(TARGET_PATH)/tests/data/filtergraphs/lavr_mix_output_zero -f s16le - -fate-lavr-mix-output-zero: REF = $(SAMPLES)/lavr/lavr-mix-output-zero - -FATE_LAVR_MIX-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_MIX) -fate-lavr-mix: $(FATE_LAVR_MIX-yes) -#FATE_LAVR += $(FATE_LAVR_MIX-yes) - -SAMPLERATES = 2626 8000 44100 48000 96000 - -define RESAMPLE -FATE_LAVR_RESAMPLE += fate-lavr-resample-$(3)-$(1)-$(2) -fate-lavr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav -fate-lavr-resample-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -ar $(2) -internal_sample_fmt $(3) -f $(4) -af atrim=end_sample=10240 - -fate-lavr-resample-$(3)-$(1)-$(2): CMP = oneoff -fate-lavr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5) -fate-lavr-resample-$(3)-$(1)-$(2): FUZZ = 6 -fate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)-v3 -endef - -$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le,s16) -$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s32p,s32le,s16) -$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,fltp,f32le,f32) -$(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,dblp,f64le,f64) - -FATE_LAVR_RESAMPLE += fate-lavr-resample-linear -fate-lavr-resample-linear: tests/data/asynth-44100-1.wav -fate-lavr-resample-linear: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-44100-1.wav -ar 48000 -filter_size 32 -linear_interp 1 -f s16le -af atrim=end_sample=10240 - -fate-lavr-resample-linear: CMP = oneoff -fate-lavr-resample-linear: CMP_UNIT = s16 -fate-lavr-resample-linear: REF = $(SAMPLES)/lavr/lavr-resample-linear - -FATE_LAVR_RESAMPLE += fate-lavr-resample-nearest -fate-lavr-resample-nearest: tests/data/asynth-48000-1.wav -fate-lavr-resample-nearest: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-48000-1.wav -ar 44100 -filter_size 0 -phase_shift 0 -f s16le -af atrim=end_sample=10240 - -fate-lavr-resample-nearest: CMP = oneoff -fate-lavr-resample-nearest: CMP_UNIT = s16 -fate-lavr-resample-nearest: REF = $(SAMPLES)/lavr/lavr-resample-nearest - -FATE_LAVR_RESAMPLE-$(call FILTERDEMDECENCMUX, RESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_LAVR_RESAMPLE) -fate-lavr-resample: $(FATE_LAVR_RESAMPLE-yes) -#FATE_LAVR += $(FATE_LAVR_RESAMPLE-yes) - -FATE_SAMPLES_AVCONV += $(FATE_LAVR) -fate-lavr: $(FATE_LAVR) diff --git a/tools/gen-rc b/tools/gen-rc index d9ca37e9ff..a28b013aae 100755 --- a/tools/gen-rc +++ b/tools/gen-rc @@ -43,7 +43,6 @@ EOF # gen-rc libavdevice "FFmpeg device handling library" # gen-rc libavfilter "FFmpeg audio/video filtering library" # gen-rc libpostproc "FFmpeg postprocessing library" -# gen-rc libavresample "Libav audio resampling library" # gen-rc libswscale "FFmpeg image rescaling library" # gen-rc libswresample "FFmpeg audio resampling library" diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 80da7afcb8..334c47a2c8 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -30,7 +30,7 @@ * build the fuzz target. Choose the value of FFMPEG_CODEC (e.g. AV_CODEC_ID_DVD_SUBTITLE) and choose one of FUZZ_FFMPEG_VIDEO, FUZZ_FFMPEG_AUDIO, FUZZ_FFMPEG_SUBTITLE. - clang -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp tools/target_dec_fuzzer.c -o target_dec_fuzzer -I. -DFFMPEG_CODEC=AV_CODEC_ID_MPEG1VIDEO -DFUZZ_FFMPEG_VIDEO ../../libfuzzer/libFuzzer.a -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -ldl -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb -lxcb-shape -lxcb -lX11 -lasound -lm -lbz2 -lz -pthread + clang -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp tools/target_dec_fuzzer.c -o target_dec_fuzzer -I. -DFFMPEG_CODEC=AV_CODEC_ID_MPEG1VIDEO -DFUZZ_FFMPEG_VIDEO ../../libfuzzer/libFuzzer.a -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -ldl -lxcb -lxcb-shm -lxcb -lxcb-xfixes -lxcb -lxcb-shape -lxcb -lX11 -lasound -lm -lbz2 -lz -pthread * create a corpus directory and put some samples there (empty dir is ok too): mkdir CORPUS && cp some-files CORPUS From patchwork Mon Apr 19 14:10:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27051 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp565013iob; Mon, 19 Apr 2021 07:22:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/2bkNUPPSuGhoWiNRWlw+uekJcJ3kX1KTGaaswmQEkzjOJTLPFq76933vFPc5T5VquM4A X-Received: by 2002:aa7:dbd3:: with SMTP id v19mr25773750edt.314.1618842159682; Mon, 19 Apr 2021 07:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842159; cv=none; d=google.com; s=arc-20160816; b=AWmMLEuBAcm4/pK/+dpFAa/XOZyk0qrs3YAx8rP1jVirM8R7csH/ZPGe0SGZXqms5p E+98KYe6IAYLwlWE8Ygt64Nou1GF2Gqt5UK7Zv2vq6HryO3AfpitqqiBMoepzVyUHVtw heNmA83MUFfehbhDGfGL8l3PsjaWtAVLydLRwryQkdir9xEoUpjVfNs8koZHEXGHVR/q qEpTdGEeNi55SYfSwRxTOiKvrmh7KPi9ZnEt2ku5rbGPLHwgQ5gsp6/i0b8CQbgE+0Ns YjR+PRgj7vQvPX2QOKFqbMZ9S8s28fHwrG3Kgat3W3ogBWvnUAUt+fAbzFbTs2qmy6gw td8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=4wv5tIpSNNJ+QPP5xtkKQQakLnUENH9UpRzBtYabjE8=; b=Mej09IPPniQ5rrZQfAzkS4gxqoKsOQiz3wUqKb8D57vRAPJaQavIQ4zUxgAnttL5Zc HjuPdx7t6dJuxI9BoYJxx7dl/JBFr0ppLpF2EZlDT6ChXi931z4mHBq1FTroQufal8V4 9Fa7psTZBl/U5mR6ahHVawa1TtxjzPiNgZ0Xz3rOJ/YVb2FmZKK9xt3KeM86PwZ6pRjm 4+iMIx7/Jnzc+1sX0B9lC0GOo2uYSVyjaVkKnDZxpDecXeJEZou76tzJCXSw940AtwlX FIOvYDyoZL/26nI1H9tId8aA8Tgx6e+AsDUp3ABrSGJcWcbf8d9NfR2EXA6fvQvZvQOx iGEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=nbURBSxR; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d1si1883840eds.356.2021.04.19.07.22.39; Mon, 19 Apr 2021 07:22:39 -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=@gmail.com header.s=20161025 header.b=nbURBSxR; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 499B2680967; Mon, 19 Apr 2021 17:12:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E4AC680967 for ; Mon, 19 Apr 2021 17:12:34 +0300 (EEST) Received: by mail-qv1-f42.google.com with SMTP id i3so11376736qvj.7 for ; Mon, 19 Apr 2021 07:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4qt5YKv7SbN3LYIHtmwF1f0KPP3O5FRLL5Q1uLWmx38=; b=nbURBSxR2ID3YSCud+jwztvyWTq8+DXz7ksUXjxVU38QsMHSI9j4iDl0zOkWRyt/Z1 KleQdyHPTkhNQsyjrFQhoulGJNsAt4VShTNhqGljKAZ8YDILuLJbGyWHeCqEPYC5etmI rVMx0zXlzvohi7o7zk8cFa6NU/2avve99dSQAp7pEjs7hnjRAjlpUm39cqJVohU57XSs Fxkwude1B4Si5HM/dYNov5njZHy2fxwcauIvmGzSer5MrlI9pzXn2DhxhEwC96FQw9wS mGIgEvSEdmekRu3Gjbt+ndHR0NZg2tjXwh8E/rmPX4lxNGksye+WUJ9M8cliuXKSKQq2 XVaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4qt5YKv7SbN3LYIHtmwF1f0KPP3O5FRLL5Q1uLWmx38=; b=le1oa1gX2EZTpStrSLUigThW+pSoXAQINgAaZ8VJGj6rMlZom4lUnr0zNCzuYhdRvj PMMTtBqSR3Fz+H1UkRtXEo3QA0TwbG3Lle4a5rlhjjMWhP1CdAHyLVatqjdYHnuorU2K PLWeWa5m0qaMHIWTmoebG0UytMeN90dNXkQfc05ugi1AvwHXjN4dkcHKclroLBpJhS3x TDNVRAmHEHAWB81uRra3SuAKZfyQfslubY2kD73NlmoAL7y3NNinYx0VnCk/RBuWt4Vb 7ohSXuFEknNpZC0hT3RHSNYKNi2TELX85bGfLFbf0ae+5xnmNNp0/OoJ1kafygVpZURI 6vhQ== X-Gm-Message-State: AOAM533QtuvRy/grV2OzNIvnhF0Sbhz9K28q+zkrHrSiT8oxToV9et9c h/ekNZ8OrPczK0EC2r1kF86dcbunZ7c= X-Received: by 2002:a0c:c488:: with SMTP id u8mr21280686qvi.47.1618841553694; Mon, 19 Apr 2021 07:12:33 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:32 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:10 -0300 Message-Id: <20210419141024.8174-74-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 73/87] avformat/avformat: Constify AVFormatContext.*_codec pointers 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 2MUPkuiLqb5M From: Andreas Rheinhardt This also allows to exclusively use pointers to const AVCodec in fftools/ffmpeg_opt.c. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 3 +++ fftools/ffmpeg_opt.c | 4 ++-- libavformat/avformat.h | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index e9fa7ddf64..2522978952 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,9 @@ API changes, most recent first: 2021-04-17 - xxxxxxxxxx - lavu 56.73.100 - frame.h detection_bbox.h Add AV_FRAME_DATA_DETECTION_BBOXES +2021-04-14 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h + Constified AVFormatContext.*_codec. + 2021-04-14 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h Constified the pointers to AVInputFormats and AVOutputFormats in AVFormatContext, avformat_alloc_output_context2(), diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 9e26de5a94..e66141f3ab 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -737,11 +737,11 @@ static int opt_recording_timestamp(void *optctx, const char *opt, const char *ar return 0; } -static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder) +static const AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder) { const AVCodecDescriptor *desc; const char *codec_string = encoder ? "encoder" : "decoder"; - AVCodec *codec; + const AVCodec *codec; codec = encoder ? avcodec_find_encoder_by_name(name) : diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 3834c9869f..23bdaa207b 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1598,7 +1598,7 @@ typedef struct AVFormatContext { * the same codec_id. * Demuxing: Set by user */ - AVCodec *video_codec; + const AVCodec *video_codec; /** * Forced audio codec. @@ -1606,7 +1606,7 @@ typedef struct AVFormatContext { * the same codec_id. * Demuxing: Set by user */ - AVCodec *audio_codec; + const AVCodec *audio_codec; /** * Forced subtitle codec. @@ -1614,7 +1614,7 @@ typedef struct AVFormatContext { * the same codec_id. * Demuxing: Set by user */ - AVCodec *subtitle_codec; + const AVCodec *subtitle_codec; /** * Forced data codec. @@ -1622,7 +1622,7 @@ typedef struct AVFormatContext { * the same codec_id. * Demuxing: Set by user */ - AVCodec *data_codec; + const AVCodec *data_codec; /** * Number of bytes to be written as padding in a metadata header. From patchwork Mon Apr 19 14:10:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27059 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp565437iob; Mon, 19 Apr 2021 07:23:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCxdK0hYBuM0kyjk1nSFlwvCUlnpfa0h4I7UGNbAgvOVJEb4mgjeIVMr3TAaCVvFVI7B1r X-Received: by 2002:a17:906:b7c4:: with SMTP id fy4mr22073175ejb.489.1618842192800; Mon, 19 Apr 2021 07:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842192; cv=none; d=google.com; s=arc-20160816; b=F9oLHOHSLIzCK57t4HYUS92bYpyzjYljHXPAqfteE4kRW3FpDTtp6kvsDvR4HfDyFR OadUOoMFVzthfkuqQsRj2gmO8UtY8n3bLp/Z3E686qgoHVBfv6cNvPDjSAP9v54kIcq7 dy1fTAw4SG0AIjOgNowx4JTDyNRQI5BS4An4S/ael1nIUBRBRka9b4Zg+ksqc90+/sOD Bl0qmxDyyIzJeoqqbnaRYtkA+cRHiqXtl6aPHl516OP5ezBHfT7W3uyWKUQF73SxnONt HkcxHLWzMC63iCgZd6284Lc96WDDKVV1JKGEHOjGylnbOAsXsxUzpl0bUD37jMJNYoa4 KNyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=SdzHSTikEqu6DD0pci7kwdOCYrVIwcT/FBwg2gkqsXA=; b=sqkwj/P9wcNVf/67b8EST1ZS2EfPrVxrde3eNHuHDhtZlY+M9G2h/GjgSZZUCYuKgg 1TEqoXSdqKFo1lcFM1q/wUZ0Rc1x7tB4PfHixtj5D/1MFnbXD8lSG5WFxKOCtSXgCShI zQqif5t01dJoXZvLJvLTihKGvIC/nlMYVRf3iQDvnmcXnrT+hTcO7nz9ZnQ4P58nlqGN 7eP/gB6/yhayX0kq9nMbN4qVtCoaX5bf3WwZtGhFRfIOTvrBmGHnNfPmuNXYHSFJio+m SuIzUs8xEGK3l8R6Z2wxI/lV91GLTfNek+ebthHtH6zK2CZMHn9/iLB2nPoqpJMigBrW YYPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=pt0i5XzL; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hb9si9847489ejb.304.2021.04.19.07.23.12; Mon, 19 Apr 2021 07:23:12 -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=@gmail.com header.s=20161025 header.b=pt0i5XzL; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70668689E50; Mon, 19 Apr 2021 17:12:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 86B8A680906 for ; Mon, 19 Apr 2021 17:12:36 +0300 (EEST) Received: by mail-qv1-f41.google.com with SMTP id i3so11376770qvj.7 for ; Mon, 19 Apr 2021 07:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=J+d4Wxl1j85gpvMShTF4sQnTAfWWOulTNdoXbXzn4/M=; b=pt0i5XzLH57Bd8mRu1uxU/bc2SP+zZfI6HrV6hDpJ87xNowedUNv/jwF3X1/i0bxx2 T9S87Tx7QpUHsvxj5Geq9wqm8mukYj17xYqh7bE8V496tSfHT9S8slirumt0aaCFF5Tv Bf3OxtfIVp4Vy5s/qVM8M83U+b1aCLP/1Nl5UdM4OFJk6G6HPxdncZNXw+HBUzVnwMTH aXIn82oGDsjWyFgKHst8QAJihLJRMxj5fAmK3XfbM6G8OCcJqZScEJ4vvfMa6NPUfyR3 zrgmboqP9CvvqOuIwoAZakjgMzt6L5r53ogI/jO5MC3Q8PiqaHJN4N5jkNICY2s32odL yUMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J+d4Wxl1j85gpvMShTF4sQnTAfWWOulTNdoXbXzn4/M=; b=Alwhm/syWqSW3C4zTeEs8JTSa+DCXqjPRcYRtULmbiW6W9lW5nMjXfpjSDp5FlKipZ a125I32qA0iM9xkWScvuv8SbXJzFgikaQM2WsdNljH+GBdHR/2zh2Ukeb6FNRVqNUEeA /TdfYuBC1nfAupYwbOAWUqyHHCcLaGJapXqDtK9tCNx7+RBTGBfVcEngj0bXBgsbnBbM cAWGiGa68Lly2T1zftK+9ZnJ+b0cPlsX5OclFufXMOpfA2BIx/AJ0aHu/V6A/IjBTteP 7UeXbHSEISznuejrPi0a9nrVTZVCIhIB3UMs+RyuYb6bqWh0zlYONrXcbVx1P2dRrpK7 CrBg== X-Gm-Message-State: AOAM531Kw0npVIw+o2VCcVEDEoNqo9PJzFNHXkS0P0AO0golMQ/KlBMG pNT5RI0S4U+Q2LwUYeLgqx6zM/H6CLc= X-Received: by 2002:ad4:538a:: with SMTP id i10mr21721107qvv.9.1618841554828; Mon, 19 Apr 2021 07:12:34 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:34 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:11 -0300 Message-Id: <20210419141024.8174-75-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 74/87] avcodec/codec, allcodecs: Constify the AVCodec 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: fXS0uHZe9oqZ From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 5 +++++ libavcodec/allcodecs.c | 18 +++++++++--------- libavcodec/codec.h | 8 ++++---- tools/target_dec_fuzzer.c | 8 ++++---- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 2522978952..a823a4419c 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,11 @@ API changes, most recent first: 2021-04-17 - xxxxxxxxxx - lavu 56.73.100 - frame.h detection_bbox.h Add AV_FRAME_DATA_DETECTION_BBOXES +2021-04-14 - xxxxxxxxxx - lavc yyyyyyyyy - codec.h + avcodec_find_encoder_by_name(), avcodec_find_encoder(), + avcodec_find_decoder_by_name() and avcodec_find_decoder() + now return a pointer to const AVCodec. + 2021-04-14 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h Constified AVFormatContext.*_codec. diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index cf6fe2055b..e60ac5ce78 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -872,7 +872,7 @@ static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) } } -static AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) +static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) { const AVCodec *p, *experimental = NULL; void *i = 0; @@ -886,24 +886,24 @@ static AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) if (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL && !experimental) { experimental = p; } else - return (AVCodec*)p; + return p; } } - return (AVCodec*)experimental; + return experimental; } -AVCodec *avcodec_find_encoder(enum AVCodecID id) +const AVCodec *avcodec_find_encoder(enum AVCodecID id) { return find_codec(id, av_codec_is_encoder); } -AVCodec *avcodec_find_decoder(enum AVCodecID id) +const AVCodec *avcodec_find_decoder(enum AVCodecID id) { return find_codec(id, av_codec_is_decoder); } -static AVCodec *find_codec_by_name(const char *name, int (*x)(const AVCodec *)) +static const AVCodec *find_codec_by_name(const char *name, int (*x)(const AVCodec *)) { void *i = 0; const AVCodec *p; @@ -915,18 +915,18 @@ static AVCodec *find_codec_by_name(const char *name, int (*x)(const AVCodec *)) if (!x(p)) continue; if (strcmp(name, p->name) == 0) - return (AVCodec*)p; + return p; } return NULL; } -AVCodec *avcodec_find_encoder_by_name(const char *name) +const AVCodec *avcodec_find_encoder_by_name(const char *name) { return find_codec_by_name(name, av_codec_is_encoder); } -AVCodec *avcodec_find_decoder_by_name(const char *name) +const AVCodec *avcodec_find_decoder_by_name(const char *name) { return find_codec_by_name(name, av_codec_is_decoder); } diff --git a/libavcodec/codec.h b/libavcodec/codec.h index c95078491d..c8653e3b31 100644 --- a/libavcodec/codec.h +++ b/libavcodec/codec.h @@ -367,7 +367,7 @@ const AVCodec *av_codec_iterate(void **opaque); * @param id AVCodecID of the requested decoder * @return A decoder if one was found, NULL otherwise. */ -AVCodec *avcodec_find_decoder(enum AVCodecID id); +const AVCodec *avcodec_find_decoder(enum AVCodecID id); /** * Find a registered decoder with the specified name. @@ -375,7 +375,7 @@ AVCodec *avcodec_find_decoder(enum AVCodecID id); * @param name name of the requested decoder * @return A decoder if one was found, NULL otherwise. */ -AVCodec *avcodec_find_decoder_by_name(const char *name); +const AVCodec *avcodec_find_decoder_by_name(const char *name); /** * Find a registered encoder with a matching codec ID. @@ -383,7 +383,7 @@ AVCodec *avcodec_find_decoder_by_name(const char *name); * @param id AVCodecID of the requested encoder * @return An encoder if one was found, NULL otherwise. */ -AVCodec *avcodec_find_encoder(enum AVCodecID id); +const AVCodec *avcodec_find_encoder(enum AVCodecID id); /** * Find a registered encoder with the specified name. @@ -391,7 +391,7 @@ AVCodec *avcodec_find_encoder(enum AVCodecID id); * @param name name of the requested encoder * @return An encoder if one was found, NULL otherwise. */ -AVCodec *avcodec_find_encoder_by_name(const char *name); +const AVCodec *avcodec_find_encoder_by_name(const char *name); /** * @return a non-zero number if codec is an encoder, zero otherwise */ diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 334c47a2c8..f52eba92b1 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -59,7 +59,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); -extern AVCodec * codec_list[]; +extern const AVCodec * codec_list[]; static void error(const char *err) { @@ -67,10 +67,10 @@ static void error(const char *err) exit(1); } -static AVCodec *c = NULL; -static AVCodec *AVCodecInitialize(enum AVCodecID codec_id) +static const AVCodec *c = NULL; +static const AVCodec *AVCodecInitialize(enum AVCodecID codec_id) { - AVCodec *res; + const AVCodec *res; res = avcodec_find_decoder(codec_id); if (!res) From patchwork Mon Apr 19 14:10:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27050 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp565603iob; Mon, 19 Apr 2021 07:23:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHLNjbB1vhZLBs0MBp+mZgAm+epfA+gnwmUp9Tik/KxILJwHrYosNA0uLkp3w1l+5PU6E0 X-Received: by 2002:a05:6402:22f9:: with SMTP id dn25mr25692097edb.171.1618842204522; Mon, 19 Apr 2021 07:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842204; cv=none; d=google.com; s=arc-20160816; b=TjoHOTEiA+6463eb1mcir1snNmxk6scYD2163NXrEn46iUXZw1XgUtaK4ISs6T6WZ2 sxNawOC2e98uAT3TqmWQp4HZOdhKwCA6jsvmHl/dDXcUvO2q40/1hEGFmbGwh0A2jH2X bbvlXgF6fID8SBbU0QmD+1ra1+3t5fdwCr/8zn/bTd4cD8vDGRT5a657afPupJpiy358 vQZLBEngpmEHUKJjetehumQcoZCDGbtxL1iqF0WamKSRWLWNgFIMA9BaiZr1Ri1NF1MX qTk9innVM9oKX/BHbRll4UrEht+uEMRi80OLBnPRZWMSAKOhN6e8d1BEBz7jkbQ6avuV KELg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=RWixd5UkkA8J6TPwNZcZKfR3iOa17igLRIWle2VrHb4=; b=VtQhWOxZoABnIkGoyLfT33IRdlnxymUwecrRm1lV+lPCW7EhlOZ2spHWj86tP0BsGl 9PrHydWPpwb3bjW+cCGKZQKK9f87WLy09quG6JA0w0VqXedLzGtlmah3weRuHQOfLnQY Gl45Jyw6Sa5yQKldLYVXnxvC6jZ7kz1dt6LxvGeiNwUnt18koMf2N6R/YW+FjcZQxoE8 BaWHfR1OkDpe6YwoAfmVPsv9bEOwcC7Fua1tdN44zKI7dDiUVRiapmmRHKzmTxHI23ve FXEyU4l6S20KGrJoyVUc9s8ydfp6TcpdHR1eHy5Zoz7R2pq5B6xbm0wjFw3hSyV/+vBo zlPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=CcZ7sT2r; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ca6si8542497edb.84.2021.04.19.07.23.24; Mon, 19 Apr 2021 07:23: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=@gmail.com header.s=20161025 header.b=CcZ7sT2r; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6E1C1689E93; Mon, 19 Apr 2021 17:12:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6856B689E41 for ; Mon, 19 Apr 2021 17:12:38 +0300 (EEST) Received: by mail-qk1-f179.google.com with SMTP id v7so7774268qkj.13 for ; Mon, 19 Apr 2021 07:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YezphWr61fyATQU5m5DmKRhPETXCBPP9Tm2uwoAyeuA=; b=CcZ7sT2rW+P224u+83uzIy4k7pqcLBslfupJ1Zpj8OKdanzSz1QLs8KwJ/hok+gZck O2j+y4bYqPJoeiLGItuqV+w/KhXWUUAYm3hv+eYJAZN03OoixOGXRKxA0HOQ3dTMoyeR P43Eknqb0AECfF7+1/QnIVGIU359p0M+Gd6jITZWWnwXKPGwd89BJ94ckB7ycvBSJADS z1aVeOUlMPjKFNVsU3hufij40lEXUY0vfNS0FymE7bcqHrGMaonIf+8YakFfehs6dcoV prIhB0ceykhHFLAUxndxyOVwf08WfDJ2X5rdTjt7ZAuQfFd4GrDMYceLJFWfBr7MZDPj l30w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YezphWr61fyATQU5m5DmKRhPETXCBPP9Tm2uwoAyeuA=; b=cSwjuHxmGKezQ8oX9os9EvolmstaLkjp2EP7Fmj5cj90DcOwIQFPJYf/9X+ntDcK2K CWZq/ehoCZb5DFA9fuy/7N1uMcqBwI4jh79UL0pYMtCBREWco/BfWxwhhxYSlNAE7TZ9 7OQUqvF5xYo9XcIg1BXa5JXYJaCi43kORAxif6KBgKYmN91WQEgHgFzjK6gUYXuSZk0q lk8lC7MZhaagjZAXg3V9xNWibZiVF5IrRXCmdhvdhCc45VZMWq7mJ+DCpJcn8LPwhXjc xdS0u7xwnrtyfXGQaGXguC1GcYgc3GQD1J9VQw3tkgcWsDMJTj/kNZfjUEV75dH9mGRq WlXg== X-Gm-Message-State: AOAM533D1OIoaeYEnE0ivgY+vj8p8PhEwMCpFBu4wGH0gGAzMzuRqS8l e8nX1GYGCq6tW+H9y4E2+CCQXNJN8ms= X-Received: by 2002:a37:a6d2:: with SMTP id p201mr8257766qke.146.1618841557077; Mon, 19 Apr 2021 07:12:37 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:35 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:12 -0300 Message-Id: <20210419141024.8174-76-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 75/87] avformat/avformat, utils: Make av_find_best_stream const-correct 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: uo/hw0Wv6Jkx From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 4 ++++ libavformat/avformat.h | 2 +- libavformat/utils.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index a823a4419c..d19b817660 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,10 @@ API changes, most recent first: 2021-04-17 - xxxxxxxxxx - lavu 56.73.100 - frame.h detection_bbox.h Add AV_FRAME_DATA_DETECTION_BBOXES +2021-04-14 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h + av_find_best_stream now uses a const AVCodec ** parameter + for the returned decoder. + 2021-04-14 - xxxxxxxxxx - lavc yyyyyyyyy - codec.h avcodec_find_encoder_by_name(), avcodec_find_encoder(), avcodec_find_decoder_by_name() and avcodec_find_decoder() diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 23bdaa207b..28069d45dc 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2070,7 +2070,7 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, - AVCodec **decoder_ret, + const AVCodec **decoder_ret, int flags); /** diff --git a/libavformat/utils.c b/libavformat/utils.c index 7078891dc0..2f66f539a6 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4200,7 +4200,7 @@ AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, - AVCodec **decoder_ret, int flags) + const AVCodec **decoder_ret, int flags) { int i, nb_streams = ic->nb_streams; int ret = AVERROR_STREAM_NOT_FOUND; @@ -4260,7 +4260,7 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, } } if (decoder_ret) - *decoder_ret = (AVCodec*)best_decoder; + *decoder_ret = best_decoder; return ret; } From patchwork Mon Apr 19 14:10:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27052 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp565810iob; Mon, 19 Apr 2021 07:23:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyngrqPxyADcn3Yepl/8Ai9h2E6hghth586iuKKLsiQ87RwTg7Lh6d+U7bZxa0yIz1C68i2 X-Received: by 2002:a50:f395:: with SMTP id g21mr26480260edm.238.1618842218881; Mon, 19 Apr 2021 07:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842218; cv=none; d=google.com; s=arc-20160816; b=K601WKIdwog0xn+5/ThCdy2SOkgQqGcpls/nUdTvRT9Yw27e14uVHR9uoXgJPjt8+j J4sPcOBMu3YbFg1fBayvuNJe2i75Nyq8VZBYD9pA2w2SDgI6ISI6JTZAdveU096FlckP WoCn/pDtFIBx/Ilx4B6csJRPMCXrofFNs8MNKHgKJ2Nii36CGihOvBxJ/mqLy00YE+Pr 1bDW2jpN9Lm9PRNBzKUF+eaAJReDwFE18+3FRD0A0R4xOdCjN00n3agyIFxbXZmjM4PI JNmU1o3Xdvax9ETSNvAEF8CVAoiWPj/AbG4CC4Vkojt+pf10bQ46YJnNAO314yNJ2RhE GysA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=f99rXr/p0ykK4qiXT8Gsv8a0NLZnUOgYdK7S84+cV90=; b=y+FQw4uleFxpyGdVT4kfa+PLLN1f/D1nqX4MGJK2ySj7Pel3Q4U5U4jMAPEv3GiqrC DRCK/ExKhdRIe4yZP77aVMPCqCfAKKdhIhQ9XeEUj179xiu/xyV8KelH9GZ9TE5pjTAP +BVxbsXA5m/ao2Yw0Fra/Iinmv+I1v3MT41UetX1UvamV0ZwX/CUjzrE1JdyDtZ4kp+/ XdvJmj9tiEMnSjdh8b40tonzpMecQwd+aGCYuskuY43hytCZfxpzOtcf9Wa8Za4AHZR6 N14fWYYBiR7fM1VjaS43Ije/GFqYybHhywVjnafJAvbIvyPAre94eOXEgfF/dmeF/l3r 8CvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=sqF07IN7; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q4si11794303edn.527.2021.04.19.07.23.38; Mon, 19 Apr 2021 07:23:38 -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=@gmail.com header.s=20161025 header.b=sqF07IN7; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6A309689EC9; Mon, 19 Apr 2021 17:12:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 84BB1689E53 for ; Mon, 19 Apr 2021 17:12:39 +0300 (EEST) Received: by mail-qk1-f176.google.com with SMTP id o5so35884083qkb.0 for ; Mon, 19 Apr 2021 07:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uuaIix8msinugCzZZ4bWR3EWA4A47ueQXAo01p7CBVU=; b=sqF07IN7xZnSCg+GVBM1JXvvWZbFW9EnznCnOHLOi+2HNlXIabAhgaWIFb+nhHDyya MchvKM5rKbB9NM4/VK9KclNxng0NoGXOKcIFXxh5t+AJaaQOixH92XQalqcHFANotS1w h/7K/mcLftbhqwN9XJJmSLj+6S0kELQD1tmhCLPTegejC199rAr7AwIMNzd3rS9S5i3B cNYF4Ie0Gbtep6c1IjQRkYz94/HrxQh20Sruqi+C4u1eN+qVsLjHpMnxHPoBVSGkgjtg 14XJwgMuFRDQMZ7zShaNKns0c7LllYYPLSQIVraNVhb+wVJJlUteC69u5K9M+7f1BNWM ZNdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uuaIix8msinugCzZZ4bWR3EWA4A47ueQXAo01p7CBVU=; b=hOcgvkcVd2eWDQ1i0MhmqI7EUb7do2HwLWk7IZw5qIWGenWFx9eSnkJlwUDntXpg8r 1CHzKEGrpymAUX5U9YPpa89uVuCzKDIAUe4xDnb00y9F0miZzYt/nXTl3dy1Z+NwoP21 42vVAKwN1Sh6oRIdMOaRd4aYDD5fK0zDGikQyU4H8nz93DYHat3/0UlYEREf3X+67Y+y Uk8RojtUtTRi+71MWQzV7lBadfDY4fXq9TJFen69brs8NASjeISIDhsfls9/aqxLfGc8 dkShi7K3+7Pt9sCovijJ+0c4fwpXPg8wpyYgom7jAPxzrpH2Ud6ohdhDDGSjWM2p9VvW 1uEQ== X-Gm-Message-State: AOAM532EGP34K6IkSOGnZiYQMX1jZf44+1+aqZxTswgvnQ6aqVYl1vmL EtoCQXOU0URpTMy8nFQ5eVnnKp7y8aA= X-Received: by 2002:a05:620a:1522:: with SMTP id n2mr6463960qkk.298.1618841558178; Mon, 19 Apr 2021 07:12:38 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:37 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:13 -0300 Message-Id: <20210419141024.8174-77-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 76/87] avdevice/avdevice: Constify avdevice_list_input_sources/output_sinks 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /mLSVqYMKeyK From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 4 ++++ fftools/cmdutils.c | 4 ++-- libavdevice/avdevice.c | 4 ++-- libavdevice/avdevice.h | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index d19b817660..443cb84b27 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,10 @@ API changes, most recent first: 2021-04-17 - xxxxxxxxxx - lavu 56.73.100 - frame.h detection_bbox.h Add AV_FRAME_DATA_DETECTION_BBOXES +2021-04-14 - xxxxxxxxxx - lavd yyyyyyyyy - avdevice.h + avdevice_list_input_sources and avdevice_list_output_sinks now accept + pointers to const AVInputFormat resp. const AVOutputFormat. + 2021-04-14 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h av_find_best_stream now uses a const AVCodec ** parameter for the returned decoder. diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 1db5e8cdd9..822fa8df45 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -2205,7 +2205,7 @@ double get_rotation(AVStream *st) } #if CONFIG_AVDEVICE -static int print_device_sources(AVInputFormat *fmt, AVDictionary *opts) +static int print_device_sources(const AVInputFormat *fmt, AVDictionary *opts) { int ret, i; AVDeviceInfoList *device_list = NULL; @@ -2235,7 +2235,7 @@ static int print_device_sources(AVInputFormat *fmt, AVDictionary *opts) return ret; } -static int print_device_sinks(AVOutputFormat *fmt, AVDictionary *opts) +static int print_device_sinks(const AVOutputFormat *fmt, AVDictionary *opts) { int ret, i; AVDeviceInfoList *device_list = NULL; diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 554debcf06..22b7595ab1 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -120,7 +120,7 @@ static int list_devices_for_context(AVFormatContext *s, AVDictionary *options, return ret; } -int avdevice_list_input_sources(AVInputFormat *device, const char *device_name, +int avdevice_list_input_sources(const AVInputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list) { AVFormatContext *s = NULL; @@ -131,7 +131,7 @@ int avdevice_list_input_sources(AVInputFormat *device, const char *device_name, return list_devices_for_context(s, device_options, device_list); } -int avdevice_list_output_sinks(AVOutputFormat *device, const char *device_name, +int avdevice_list_output_sinks(const AVOutputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list) { AVFormatContext *s = NULL; diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index 85a4dcc6df..d0b0f23f5d 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -507,9 +507,9 @@ void avdevice_free_list_devices(AVDeviceInfoList **device_list); * @return count of autodetected devices, negative on error. * @note device argument takes precedence over device_name when both are set. */ -int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name, +int avdevice_list_input_sources(const AVInputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list); -int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name, +int avdevice_list_output_sinks(const AVOutputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list); /** From patchwork Mon Apr 19 14:10:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27063 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp566005iob; Mon, 19 Apr 2021 07:23:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3+s8JY4Yqf84h39BrjwKpmFvvnJ75ESLl9Koqivwtv/G6F/3zevoCRhNPEsw/wdsQP/4m X-Received: by 2002:a05:6402:31f0:: with SMTP id dy16mr19200618edb.161.1618842232740; Mon, 19 Apr 2021 07:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842232; cv=none; d=google.com; s=arc-20160816; b=k0fNqRHXJB8eUOC4/UIDuwBNPj5XIcMEd30KbHJ6b/dglHCvwwNnhstq+8dRBK0gHM y9HHbeiJilpk7l0v208Co9GO6IIWe3bZg6Qn0HG8urSH7OrlqS8hZQ0tbtpdi2rHXuhb B50jZZKZ60tiQjdsSoIIN8B1W8q0zApq0tpYIeEsvtHq76L0vpzesq8RN0mmatfRfS7g fOr3ejr1QwvvNrW6VTH8AwcWMHeY1fvnbVLax1Y/st5zG/LdZN8YdfyKKbUumYkLCMFJ kUIJkKQdsg+Gv6fNhZ48qKnt5nnTd/qQMNaEMl1zruNye7h3i+eANRGY5rsn3BlhTS3X r4Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=R+71md3E1KOBjOYPmnmlG6Ho2U9fOaxsgHgTrqd2g3w=; b=FMvEjHsXI63x4GqX8t5Q4hgzR1LPHQF/Ki0eYZ5q+M+jLObktCCsaLSBrfzLXKNyIW Ie5fLQdu2RWCJoNYfpd7OH3r3wQylDlts0VzpUY/f+aGsVR6wsDrByDMuaN4l69tPuJQ iC/ZjbmNDmESHTzQzKYH8NQS6JWHr7PaxDEB2mI65Mo00S8R+mlwloryUrN3dRPL7WTs jdf9J2jneOxTuf7Ty/6RKjSyX66CPR2DcMGYlBOswMjLCef0rRLYwjPVwS35hnU5OvNX deXXM7p8flenVefKGK1OaG9M+HeZkw7KiEiyOVzUEQwykszi/77Ep1mV/RJ1kyI6kYnb BOxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="UNFv/F1i"; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id jt15si6031223ejb.406.2021.04.19.07.23.52; Mon, 19 Apr 2021 07:23:52 -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=@gmail.com header.s=20161025 header.b="UNFv/F1i"; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8726F689EE9; Mon, 19 Apr 2021 17:12:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ECC49689E5B for ; Mon, 19 Apr 2021 17:12:40 +0300 (EEST) Received: by mail-qv1-f49.google.com with SMTP id 30so16899903qva.9 for ; Mon, 19 Apr 2021 07:12:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=HTtGmAXU+jonsRg7q5IQD5kx3zTilcKkz+ZPeq9NAno=; b=UNFv/F1iGTNddayTCvDzeuNJxGlgFZAUVxDoMHL0hr6G7rO2lBPvu1QDqk0858QT6b j6H+ymSzvCBtlvlC6luarWG9vhts2h37mf6+Xi3FhLSxi2ImvbgfJEfkCFSGOU51wriB 2GicqSTPFjBqTNKSsnWi2+z3a5jPm6k0lAALrgpe9UAjmXG3lchaKdfCqF9PRIamdJhI GhgpzLmTuqLmWSf83vBatPE8PQ+NSLrNA7Ij29QS40la/WyHh2MkntI2jAz57DTQMgAL 5CvlOHGc6a3kqDGHNmIdd6JX8YiQshjrFMHqECzJ3FPmFEPcUNerFn8j4U+xT9VTv9ep s8bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HTtGmAXU+jonsRg7q5IQD5kx3zTilcKkz+ZPeq9NAno=; b=ll8xPWTICdq1ckkOXKnGgzhuEfDIUmzk7s2uAfJo8AVsLl19UTwxKmUMmQpQ9GqTL9 jdM1ZmhDW6lP3UsB8ORkM6h1XGLx07iySwzW5Z4fRX1R+Se6i9/QcV/E2hHlmEc2198D C+gT9xo85vBGV29RUsbkdnWRmW2boGQXhaezLRJ3lbPvpILueHmRtrX+irNT53rqWIzR vXdf1ZqBofw0YsVoRroSoFdyyPRERyhvz8LLOR5xe2fVijRRyOzZ/C2u+I7n3kQ0WDLL DmDpsWLKvBn0m6Ksy9QA+S1FFBAxmFGPVzumz8nbaSull7/CxAdzKqTgNc+XgpZKgk43 qlNA== X-Gm-Message-State: AOAM533ggnPY2jHqhMAR0+zQ0VvJqzC7D6zDM8DJhCxBvOqqyb0F/LUe HtEnpyvtermzW8Plll4TRlSMZl08/3k= X-Received: by 2002:ad4:576e:: with SMTP id r14mr21943847qvx.13.1618841559283; Mon, 19 Apr 2021 07:12:39 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:39 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:14 -0300 Message-Id: <20210419141024.8174-78-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 77/87] avdevice/avdevice: Constify av_*_device_next 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Xmy1wflnZt51 From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 4 ++++ fftools/cmdutils.c | 4 ++-- libavdevice/alldevices.c | 16 ++++++++-------- libavdevice/avdevice.h | 8 ++++---- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 443cb84b27..f405cd789c 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,10 @@ API changes, most recent first: 2021-04-17 - xxxxxxxxxx - lavu 56.73.100 - frame.h detection_bbox.h Add AV_FRAME_DATA_DETECTION_BBOXES +2021-04-14 - xxxxxxxxxx - lavd yyyyyyyyy - avdevice.h + The av_*_device_next API functions now accept and return + pointers to const AVInputFormat resp. AVOutputFormat. + 2021-04-14 - xxxxxxxxxx - lavd yyyyyyyyy - avdevice.h avdevice_list_input_sources and avdevice_list_output_sinks now accept pointers to const AVInputFormat resp. const AVOutputFormat. diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 822fa8df45..4148285971 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -2289,7 +2289,7 @@ static int show_sinks_sources_parse_arg(const char *arg, char **dev, AVDictionar int show_sources(void *optctx, const char *opt, const char *arg) { - AVInputFormat *fmt = NULL; + const AVInputFormat *fmt = NULL; char *dev = NULL; AVDictionary *opts = NULL; int ret = 0; @@ -2327,7 +2327,7 @@ int show_sources(void *optctx, const char *opt, const char *arg) int show_sinks(void *optctx, const char *opt, const char *arg) { - AVOutputFormat *fmt = NULL; + const AVOutputFormat *fmt = NULL; char *dev = NULL; AVDictionary *opts = NULL; int ret = 0; diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 92b27a1d14..f65317018a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -68,7 +68,7 @@ void avdevice_register_all(void) avpriv_register_devices(outdev_list, indev_list); } -static void *next_input(const AVInputFormat *prev, AVClassCategory c2) +static const void *next_input(const AVInputFormat *prev, AVClassCategory c2) { const AVClass *pc; const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_INPUT; @@ -91,10 +91,10 @@ static void *next_input(const AVInputFormat *prev, AVClassCategory c2) continue; category = pc->category; } while (category != c1 && category != c2); - return (AVInputFormat *)fmt; + return fmt; } -static void *next_output(const AVOutputFormat *prev, AVClassCategory c2) +static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2) { const AVClass *pc; const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_OUTPUT; @@ -117,25 +117,25 @@ static void *next_output(const AVOutputFormat *prev, AVClassCategory c2) continue; category = pc->category; } while (category != c1 && category != c2); - return (AVOutputFormat *)fmt; + return fmt; } -AVInputFormat *av_input_audio_device_next(AVInputFormat *d) +const AVInputFormat *av_input_audio_device_next(const AVInputFormat *d) { return next_input(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT); } -AVInputFormat *av_input_video_device_next(AVInputFormat *d) +const AVInputFormat *av_input_video_device_next(const AVInputFormat *d) { return next_input(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT); } -AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d) +const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d) { return next_output(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT); } -AVOutputFormat *av_output_video_device_next(AVOutputFormat *d) +const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d) { return next_output(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT); } diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index d0b0f23f5d..8370bbc7f2 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -77,7 +77,7 @@ void avdevice_register_all(void); * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. */ -AVInputFormat *av_input_audio_device_next(AVInputFormat *d); +const AVInputFormat *av_input_audio_device_next(const AVInputFormat *d); /** * Video input devices iterator. @@ -86,7 +86,7 @@ AVInputFormat *av_input_audio_device_next(AVInputFormat *d); * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. */ -AVInputFormat *av_input_video_device_next(AVInputFormat *d); +const AVInputFormat *av_input_video_device_next(const AVInputFormat *d); /** * Audio output devices iterator. @@ -95,7 +95,7 @@ AVInputFormat *av_input_video_device_next(AVInputFormat *d); * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. */ -AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d); +const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d); /** * Video output devices iterator. @@ -104,7 +104,7 @@ AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d); * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. */ -AVOutputFormat *av_output_video_device_next(AVOutputFormat *d); +const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d); typedef struct AVDeviceRect { int x; /**< x coordinate of top left corner */ From patchwork Mon Apr 19 14:10:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27154 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1101745yba; Mon, 19 Apr 2021 07:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywtO2ZjoafjsQZvztQfJGQkvZl+B3NbVMAcIWWqHrM7pm8W4ytJLrSAEgPPknviWJlIfp3 X-Received: by 2002:a17:906:7c82:: with SMTP id w2mr22481986ejo.448.1618842261150; Mon, 19 Apr 2021 07:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842261; cv=none; d=google.com; s=arc-20160816; b=b6lXbt41TV/rhKz6TG07+JSg819PoeBIjRQxB7KguAllsxvmMDqvbe9Jtc6LUXI315 JS8a3KvGpsEcJBo0oc3BGmIZxcRvRQZ4eZAwzeli2lbOVRARYCl2pmkXLDF8PBrLfWtf 2NglZgMQn1FJoX1M48+YsIcSZ4kyTOOhmmkFQR0QOqyWBOmxXuIl3HjVgYTCBgJjp6pe z5iU6VQO6W66Bjva63sTpJvERMSZsQtBv4Hazt1kShetm+9qCYXuAa2ENiunTNUS13bd Zt/Gy00sZGv0qUETJympwB6Ya8m31e386ameHr/3orh/nCsKmGc+POy90YIbDAGwFqlb ykyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=Nd+RPjpO31d1JSSliWQmPl/SrEuX77VbD740x0I7FiQ=; b=TJhrQms8b91cQHC6PZ9EezMK83qSFUIj9QAWt/tVls2wd6/967IgQFqhhf9UsqLrGV lmlS/EElHz8ABOTcXoMDkS6CcCC/pRc6Mix5O5VHLyfClqsiHMMpy+edqKnUY0IE08LE CzzlhnElB/MPlYAg8QNAyuhIzuoDeCeJrj4Jsr6nLf9JwrVs/gAjhQ4fVxlURgdgcYld v70ZpXcm2zBBLhVoHNssi4SGXzb4/LycQAXWHwqJfU2bZWKLhNzAxEVYvTpmxkYnuvO9 tP72A+U+NA6cI8/SOPVnC6NF3ykkLh+0YN0Fk5797fsoiZotKTi8e3swHRm5M+E3nnnn btAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=BHuPN5tn; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v4si12820998edc.411.2021.04.19.07.24.20; Mon, 19 Apr 2021 07:24: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=@gmail.com header.s=20161025 header.b=BHuPN5tn; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F3C0F689F27; Mon, 19 Apr 2021 17:12:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 06533689F0D for ; Mon, 19 Apr 2021 17:12:44 +0300 (EEST) Received: by mail-qk1-f180.google.com with SMTP id o5so35884425qkb.0 for ; Mon, 19 Apr 2021 07:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FLUDsN5oTtFM95ibJSmjTrn8SnnzGfHOQZ4ukYe/JKo=; b=BHuPN5tn6SkOH7z/N6Ef1Q+XMFIzfc+fYHyAy+3Hf+8uWjTTmbAy5TWJv3NWM1SUAP Z7lPWcGX6AQiyTA21zGk50aFkdrvGFuU0SCEgnLEc8DG0LBeTkoMfIgyhElj5DSonbzE 2lHDvCjlYhWt8rDkzoqQAxsXnt0yYQ4ZRyc5NkWVq+4MFlZBWINljBEip60aH9AhUhUA db9oHQEKQoKzTjwEzYGcIABYEgrK4OJtc5wyXz0yO4troLWRBFl9BhBg1mFSRQacvIjZ dsoW+o6vr6zvI5QzkhP+5xvmKZpK51eryatgVFKN1zWTv33sJJ+46Jh2NgEo1E6O7SZk N9Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FLUDsN5oTtFM95ibJSmjTrn8SnnzGfHOQZ4ukYe/JKo=; b=muL8RT8NS+FpVBxig3lJUFOAh4StnSWz+MhjZhVxaF57MEgkvYfZs2H9rqwTBCLo6G B+R2IEAypDILAiJ6okXxkjhotH6M0RvOJ7bgJdw4zZ862jLrPt7EUVrcjNRRkKvZJKNu KJpPVjY5kEXnJINv2HRZYCNcdbvsCcQQMBVsAy7bSAclzyfc0jUTtpj3CDHRAda9n8sI SEprHG6QkNxxvdbsOZ8VsRngooym2cxJGnONd62vZzcHNontNmFOnqLdaTAPBEsvcymg tP/+IvPIf0vkzg7fGuDD2Q/6996ANsOzGwfFa6qx28RttEi1RT5eQeMoeTpC1OB8j2mX jXxg== X-Gm-Message-State: AOAM5304jIz1Ugrmgm9AwrFFy+/7uKWi3R7fK32GCuyygMEAaCKEbnBl /yo1Tfpqwbb9EiC1Uap70y3QMHDj/os= X-Received: by 2002:a05:620a:2058:: with SMTP id d24mr3502850qka.469.1618841562320; Mon, 19 Apr 2021 07:12:42 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:41 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:15 -0300 Message-Id: <20210419141024.8174-79-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 78/87] avcodec: Constify AVCodecs 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ViK8bEu0ww8B Content-Length: 348227 From: Andreas Rheinhardt Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt --- libavcodec/012v.c | 2 +- libavcodec/4xm.c | 2 +- libavcodec/8bps.c | 2 +- libavcodec/8svx.c | 4 +- libavcodec/a64multienc.c | 4 +- libavcodec/aacdec.c | 4 +- libavcodec/aacdec_fixed.c | 2 +- libavcodec/aacenc.c | 2 +- libavcodec/aasc.c | 2 +- libavcodec/ac3dec_fixed.c | 2 +- libavcodec/ac3dec_float.c | 4 +- libavcodec/ac3enc_fixed.c | 2 +- libavcodec/ac3enc_float.c | 2 +- libavcodec/adpcm.c | 2 +- libavcodec/adpcmenc.c | 2 +- libavcodec/adxdec.c | 2 +- libavcodec/adxenc.c | 2 +- libavcodec/agm.c | 2 +- libavcodec/aic.c | 2 +- libavcodec/alac.c | 2 +- libavcodec/alacenc.c | 2 +- libavcodec/aliaspixdec.c | 2 +- libavcodec/aliaspixenc.c | 2 +- libavcodec/allcodecs.c | 1563 ++++++++++++++------------- libavcodec/alsdec.c | 2 +- libavcodec/amfenc_h264.c | 2 +- libavcodec/amfenc_hevc.c | 2 +- libavcodec/amrnbdec.c | 2 +- libavcodec/amrwbdec.c | 2 +- libavcodec/anm.c | 2 +- libavcodec/ansi.c | 2 +- libavcodec/apedec.c | 2 +- libavcodec/aptxdec.c | 4 +- libavcodec/aptxenc.c | 4 +- libavcodec/arbc.c | 2 +- libavcodec/argo.c | 2 +- libavcodec/assdec.c | 4 +- libavcodec/assenc.c | 4 +- libavcodec/asvdec.c | 4 +- libavcodec/asvenc.c | 4 +- libavcodec/atrac1.c | 2 +- libavcodec/atrac3.c | 4 +- libavcodec/atrac3plusdec.c | 4 +- libavcodec/atrac9dec.c | 2 +- libavcodec/audiotoolboxdec.c | 2 +- libavcodec/audiotoolboxenc.c | 2 +- libavcodec/aura.c | 2 +- libavcodec/av1dec.c | 2 +- libavcodec/avrndec.c | 2 +- libavcodec/avs.c | 2 +- libavcodec/avuidec.c | 2 +- libavcodec/avuienc.c | 2 +- libavcodec/bethsoftvideo.c | 2 +- libavcodec/bfi.c | 2 +- libavcodec/bink.c | 2 +- libavcodec/binkaudio.c | 4 +- libavcodec/bintext.c | 6 +- libavcodec/bitpacked.c | 2 +- libavcodec/bmp.c | 2 +- libavcodec/bmpenc.c | 2 +- libavcodec/bmvaudio.c | 2 +- libavcodec/bmvvideo.c | 2 +- libavcodec/brenderpix.c | 2 +- libavcodec/c93.c | 2 +- libavcodec/cavsdec.c | 2 +- libavcodec/ccaption_dec.c | 2 +- libavcodec/cdgraphics.c | 2 +- libavcodec/cdtoons.c | 2 +- libavcodec/cdxl.c | 2 +- libavcodec/cfhd.c | 2 +- libavcodec/cfhdenc.c | 2 +- libavcodec/cinepak.c | 2 +- libavcodec/cinepakenc.c | 2 +- libavcodec/clearvideo.c | 2 +- libavcodec/cljrdec.c | 2 +- libavcodec/cljrenc.c | 2 +- libavcodec/cllc.c | 2 +- libavcodec/cngdec.c | 2 +- libavcodec/cngenc.c | 2 +- libavcodec/cook.c | 2 +- libavcodec/cpia.c | 2 +- libavcodec/cri.c | 2 +- libavcodec/crystalhd.c | 2 +- libavcodec/cscd.c | 2 +- libavcodec/cuviddec.c | 2 +- libavcodec/cyuv.c | 4 +- libavcodec/dcadec.c | 2 +- libavcodec/dcaenc.c | 2 +- libavcodec/dds.c | 2 +- libavcodec/dfa.c | 2 +- libavcodec/diracdec.c | 2 +- libavcodec/dnxhddec.c | 2 +- libavcodec/dnxhdenc.c | 2 +- libavcodec/dolby_e.c | 2 +- libavcodec/dpcm.c | 2 +- libavcodec/dpx.c | 2 +- libavcodec/dpxenc.c | 2 +- libavcodec/dsddec.c | 2 +- libavcodec/dsicinaudio.c | 2 +- libavcodec/dsicinvideo.c | 2 +- libavcodec/dss_sp.c | 2 +- libavcodec/dstdec.c | 2 +- libavcodec/dvaudiodec.c | 2 +- libavcodec/dvbsubdec.c | 2 +- libavcodec/dvbsubenc.c | 2 +- libavcodec/dvdec.c | 2 +- libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/dvenc.c | 2 +- libavcodec/dxa.c | 2 +- libavcodec/dxtory.c | 2 +- libavcodec/dxv.c | 2 +- libavcodec/eac3enc.c | 2 +- libavcodec/eacmv.c | 2 +- libavcodec/eamad.c | 2 +- libavcodec/eatgq.c | 2 +- libavcodec/eatgv.c | 2 +- libavcodec/eatqi.c | 2 +- libavcodec/escape124.c | 2 +- libavcodec/escape130.c | 2 +- libavcodec/evrcdec.c | 2 +- libavcodec/exr.c | 2 +- libavcodec/exrenc.c | 2 +- libavcodec/fastaudio.c | 2 +- libavcodec/ffv1dec.c | 2 +- libavcodec/ffv1enc.c | 2 +- libavcodec/ffwavesynth.c | 2 +- libavcodec/fic.c | 2 +- libavcodec/fitsdec.c | 2 +- libavcodec/fitsenc.c | 2 +- libavcodec/flacdec.c | 2 +- libavcodec/flacenc.c | 2 +- libavcodec/flashsv.c | 4 +- libavcodec/flashsv2enc.c | 2 +- libavcodec/flashsvenc.c | 2 +- libavcodec/flicvideo.c | 2 +- libavcodec/flvdec.c | 2 +- libavcodec/flvenc.c | 2 +- libavcodec/fmvc.c | 2 +- libavcodec/fraps.c | 2 +- libavcodec/frwu.c | 2 +- libavcodec/g2meet.c | 2 +- libavcodec/g722dec.c | 2 +- libavcodec/g722enc.c | 2 +- libavcodec/g723_1dec.c | 2 +- libavcodec/g723_1enc.c | 2 +- libavcodec/g726.c | 8 +- libavcodec/g729dec.c | 4 +- libavcodec/gdv.c | 2 +- libavcodec/gif.c | 2 +- libavcodec/gifdec.c | 2 +- libavcodec/gsmdec.c | 4 +- libavcodec/h261dec.c | 2 +- libavcodec/h261enc.c | 2 +- libavcodec/h263dec.c | 4 +- libavcodec/h264dec.c | 2 +- libavcodec/hapdec.c | 2 +- libavcodec/hapenc.c | 2 +- libavcodec/hcadec.c | 2 +- libavcodec/hcom.c | 2 +- libavcodec/hevcdec.c | 2 +- libavcodec/hnm4video.c | 2 +- libavcodec/hq_hqa.c | 2 +- libavcodec/hqx.c | 2 +- libavcodec/huffyuvdec.c | 6 +- libavcodec/huffyuvenc.c | 4 +- libavcodec/idcinvideo.c | 2 +- libavcodec/iff.c | 2 +- libavcodec/ilbcdec.c | 2 +- libavcodec/imc.c | 4 +- libavcodec/imm4.c | 2 +- libavcodec/imm5.c | 2 +- libavcodec/imx.c | 2 +- libavcodec/indeo2.c | 2 +- libavcodec/indeo3.c | 2 +- libavcodec/indeo4.c | 2 +- libavcodec/indeo5.c | 2 +- libavcodec/intelh263dec.c | 2 +- libavcodec/interplayacm.c | 2 +- libavcodec/interplayvideo.c | 2 +- libavcodec/j2kenc.c | 2 +- libavcodec/jacosubdec.c | 2 +- libavcodec/jpeg2000dec.c | 2 +- libavcodec/jpeglsdec.c | 2 +- libavcodec/jpeglsenc.c | 2 +- libavcodec/jvdec.c | 2 +- libavcodec/kgv1dec.c | 2 +- libavcodec/kmvc.c | 2 +- libavcodec/lagarith.c | 2 +- libavcodec/lcldec.c | 4 +- libavcodec/lclenc.c | 2 +- libavcodec/libaomdec.c | 2 +- libavcodec/libaribb24.c | 2 +- libavcodec/libcelt_dec.c | 2 +- libavcodec/libcodec2.c | 4 +- libavcodec/libdav1d.c | 2 +- libavcodec/libdavs2.c | 2 +- libavcodec/libfdk-aacdec.c | 2 +- libavcodec/libfdk-aacenc.c | 2 +- libavcodec/libgsmdec.c | 4 +- libavcodec/libgsmenc.c | 4 +- libavcodec/libilbc.c | 4 +- libavcodec/libkvazaar.c | 2 +- libavcodec/libmp3lame.c | 2 +- libavcodec/libopencore-amr.c | 6 +- libavcodec/libopenh264dec.c | 2 +- libavcodec/libopenh264enc.c | 2 +- libavcodec/libopenjpegdec.c | 2 +- libavcodec/libopenjpegenc.c | 2 +- libavcodec/libopusdec.c | 2 +- libavcodec/libopusenc.c | 2 +- libavcodec/librav1e.c | 2 +- libavcodec/librsvgdec.c | 2 +- libavcodec/libshine.c | 2 +- libavcodec/libspeexdec.c | 2 +- libavcodec/libspeexenc.c | 2 +- libavcodec/libsvtav1.c | 2 +- libavcodec/libtheoraenc.c | 2 +- libavcodec/libtwolame.c | 2 +- libavcodec/libuavs3d.c | 2 +- libavcodec/libvo-amrwbenc.c | 2 +- libavcodec/libvorbisdec.c | 2 +- libavcodec/libvorbisenc.c | 2 +- libavcodec/libvpxdec.c | 2 +- libavcodec/libvpxenc.c | 2 +- libavcodec/libwebpenc.c | 2 +- libavcodec/libwebpenc_animencoder.c | 2 +- libavcodec/libx264.c | 7 +- libavcodec/libxavs.c | 2 +- libavcodec/libxavs2.c | 2 +- libavcodec/libxvid.c | 2 +- libavcodec/libzvbi-teletextdec.c | 2 +- libavcodec/ljpegenc.c | 2 +- libavcodec/loco.c | 2 +- libavcodec/lscrdec.c | 2 +- libavcodec/m101.c | 2 +- libavcodec/mace.c | 4 +- libavcodec/magicyuv.c | 2 +- libavcodec/magicyuvenc.c | 2 +- libavcodec/mdec.c | 2 +- libavcodec/mediacodecdec.c | 2 +- libavcodec/metasound.c | 2 +- libavcodec/mfenc.c | 2 +- libavcodec/microdvddec.c | 2 +- libavcodec/midivid.c | 2 +- libavcodec/mimic.c | 2 +- libavcodec/mjpegbdec.c | 2 +- libavcodec/mjpegdec.c | 6 +- libavcodec/mjpegenc.c | 4 +- libavcodec/mlpdec.c | 4 +- libavcodec/mlpenc.c | 4 +- libavcodec/mmaldec.c | 2 +- libavcodec/mmvideo.c | 2 +- libavcodec/mobiclip.c | 2 +- libavcodec/motionpixels.c | 2 +- libavcodec/movtextdec.c | 2 +- libavcodec/movtextenc.c | 2 +- libavcodec/mpc7.c | 2 +- libavcodec/mpc8.c | 2 +- libavcodec/mpeg12dec.c | 8 +- libavcodec/mpeg12enc.c | 4 +- libavcodec/mpeg4videodec.c | 2 +- libavcodec/mpeg4videoenc.c | 2 +- libavcodec/mpegaudiodec_fixed.c | 10 +- libavcodec/mpegaudiodec_float.c | 10 +- libavcodec/mpegaudioenc_fixed.c | 2 +- libavcodec/mpegaudioenc_float.c | 2 +- libavcodec/mpegvideo_enc.c | 10 +- libavcodec/mpl2dec.c | 2 +- libavcodec/mscc.c | 4 +- libavcodec/msmpeg4dec.c | 8 +- libavcodec/msp2dec.c | 2 +- libavcodec/msrle.c | 2 +- libavcodec/mss1.c | 2 +- libavcodec/mss2.c | 2 +- libavcodec/mss3.c | 2 +- libavcodec/mss4.c | 2 +- libavcodec/msvideo1.c | 2 +- libavcodec/msvideo1enc.c | 2 +- libavcodec/mv30.c | 2 +- libavcodec/mvcdec.c | 4 +- libavcodec/mvha.c | 2 +- libavcodec/mwsc.c | 2 +- libavcodec/mxpegdec.c | 2 +- libavcodec/nellymoserdec.c | 2 +- libavcodec/nellymoserenc.c | 2 +- libavcodec/notchlc.c | 2 +- libavcodec/nuv.c | 2 +- libavcodec/nvenc_h264.c | 2 +- libavcodec/nvenc_hevc.c | 2 +- libavcodec/omx.c | 4 +- libavcodec/on2avc.c | 2 +- libavcodec/opusdec.c | 2 +- libavcodec/opusenc.c | 2 +- libavcodec/pafaudio.c | 2 +- libavcodec/pafvideo.c | 2 +- libavcodec/pamenc.c | 2 +- libavcodec/pcm-bluray.c | 2 +- libavcodec/pcm-dvd.c | 2 +- libavcodec/pcm-dvdenc.c | 2 +- libavcodec/pcm.c | 4 +- libavcodec/pcx.c | 2 +- libavcodec/pcxenc.c | 2 +- libavcodec/pgssubdec.c | 2 +- libavcodec/pgxdec.c | 2 +- libavcodec/photocd.c | 2 +- libavcodec/pictordec.c | 2 +- libavcodec/pixlet.c | 2 +- libavcodec/pngdec.c | 4 +- libavcodec/pngenc.c | 4 +- libavcodec/pnmdec.c | 12 +- libavcodec/pnmenc.c | 10 +- libavcodec/proresdec2.c | 2 +- libavcodec/proresenc_anatoliy.c | 4 +- libavcodec/proresenc_kostya.c | 2 +- libavcodec/prosumer.c | 2 +- libavcodec/psd.c | 2 +- libavcodec/ptx.c | 2 +- libavcodec/qcelpdec.c | 2 +- libavcodec/qdm2.c | 2 +- libavcodec/qdmc.c | 2 +- libavcodec/qdrw.c | 2 +- libavcodec/qpeg.c | 2 +- libavcodec/qsvdec.c | 2 +- libavcodec/qsvenc_h264.c | 2 +- libavcodec/qsvenc_hevc.c | 2 +- libavcodec/qsvenc_jpeg.c | 2 +- libavcodec/qsvenc_mpeg2.c | 2 +- libavcodec/qsvenc_vp9.c | 2 +- libavcodec/qtrle.c | 2 +- libavcodec/qtrleenc.c | 2 +- libavcodec/r210dec.c | 6 +- libavcodec/r210enc.c | 6 +- libavcodec/ra144dec.c | 2 +- libavcodec/ra144enc.c | 2 +- libavcodec/ra288.c | 2 +- libavcodec/ralf.c | 2 +- libavcodec/rasc.c | 2 +- libavcodec/rawdec.c | 2 +- libavcodec/rawenc.c | 2 +- libavcodec/realtextdec.c | 2 +- libavcodec/rkmppdec.c | 2 +- libavcodec/rl2.c | 2 +- libavcodec/roqaudioenc.c | 2 +- libavcodec/roqvideodec.c | 2 +- libavcodec/roqvideoenc.c | 2 +- libavcodec/rpza.c | 2 +- libavcodec/rpzaenc.c | 2 +- libavcodec/rscc.c | 2 +- libavcodec/rv10.c | 4 +- libavcodec/rv10enc.c | 2 +- libavcodec/rv20enc.c | 2 +- libavcodec/rv30.c | 2 +- libavcodec/rv40.c | 2 +- libavcodec/s302m.c | 2 +- libavcodec/s302menc.c | 2 +- libavcodec/samidec.c | 2 +- libavcodec/sanm.c | 2 +- libavcodec/sbcdec.c | 2 +- libavcodec/sbcenc.c | 2 +- libavcodec/scpr.c | 2 +- libavcodec/screenpresso.c | 2 +- libavcodec/sga.c | 2 +- libavcodec/sgidec.c | 2 +- libavcodec/sgienc.c | 2 +- libavcodec/sgirledec.c | 2 +- libavcodec/sheervideo.c | 2 +- libavcodec/shorten.c | 2 +- libavcodec/sipr.c | 2 +- libavcodec/siren.c | 2 +- libavcodec/smacker.c | 4 +- libavcodec/smc.c | 2 +- libavcodec/snowdec.c | 2 +- libavcodec/snowenc.c | 2 +- libavcodec/sonic.c | 6 +- libavcodec/sp5xdec.c | 4 +- libavcodec/speedhq.c | 2 +- libavcodec/speedhqenc.c | 2 +- libavcodec/srtdec.c | 4 +- libavcodec/srtenc.c | 6 +- libavcodec/subviewerdec.c | 2 +- libavcodec/sunrast.c | 2 +- libavcodec/sunrastenc.c | 2 +- libavcodec/svq1dec.c | 2 +- libavcodec/svq1enc.c | 2 +- libavcodec/svq3.c | 2 +- libavcodec/takdec.c | 2 +- libavcodec/targa.c | 2 +- libavcodec/targa_y216dec.c | 2 +- libavcodec/targaenc.c | 2 +- libavcodec/tdsc.c | 2 +- libavcodec/textdec.c | 10 +- libavcodec/tiertexseqv.c | 2 +- libavcodec/tiff.c | 2 +- libavcodec/tiffenc.c | 2 +- libavcodec/tmv.c | 2 +- libavcodec/truemotion1.c | 2 +- libavcodec/truemotion2.c | 2 +- libavcodec/truemotion2rt.c | 2 +- libavcodec/truespeech.c | 2 +- libavcodec/tscc.c | 2 +- libavcodec/tscc2.c | 2 +- libavcodec/tta.c | 2 +- libavcodec/ttaenc.c | 2 +- libavcodec/ttmlenc.c | 2 +- libavcodec/twinvqdec.c | 2 +- libavcodec/txd.c | 2 +- libavcodec/ulti.c | 2 +- libavcodec/utvideodec.c | 2 +- libavcodec/utvideoenc.c | 2 +- libavcodec/v210dec.c | 2 +- libavcodec/v210enc.c | 2 +- libavcodec/v210x.c | 2 +- libavcodec/v308dec.c | 2 +- libavcodec/v308enc.c | 2 +- libavcodec/v408dec.c | 4 +- libavcodec/v408enc.c | 4 +- libavcodec/v410dec.c | 2 +- libavcodec/v410enc.c | 2 +- libavcodec/v4l2_m2m_dec.c | 2 +- libavcodec/v4l2_m2m_enc.c | 2 +- libavcodec/vaapi_encode_h264.c | 2 +- libavcodec/vaapi_encode_h265.c | 2 +- libavcodec/vaapi_encode_mjpeg.c | 2 +- libavcodec/vaapi_encode_mpeg2.c | 2 +- libavcodec/vaapi_encode_vp8.c | 2 +- libavcodec/vaapi_encode_vp9.c | 2 +- libavcodec/vb.c | 2 +- libavcodec/vble.c | 2 +- libavcodec/vc1dec.c | 8 +- libavcodec/vc2enc.c | 2 +- libavcodec/vcr1.c | 2 +- libavcodec/videotoolboxenc.c | 4 +- libavcodec/vima.c | 2 +- libavcodec/vmdaudio.c | 2 +- libavcodec/vmdvideo.c | 2 +- libavcodec/vmnc.c | 2 +- libavcodec/vorbisdec.c | 2 +- libavcodec/vorbisenc.c | 2 +- libavcodec/vp3.c | 6 +- libavcodec/vp5.c | 2 +- libavcodec/vp6.c | 6 +- libavcodec/vp8.c | 4 +- libavcodec/vp9.c | 2 +- libavcodec/vqavideo.c | 2 +- libavcodec/wavpack.c | 2 +- libavcodec/wavpackenc.c | 2 +- libavcodec/wcmv.c | 2 +- libavcodec/webp.c | 2 +- libavcodec/webvttdec.c | 2 +- libavcodec/webvttenc.c | 2 +- libavcodec/wmadec.c | 4 +- libavcodec/wmaenc.c | 4 +- libavcodec/wmalosslessdec.c | 2 +- libavcodec/wmaprodec.c | 6 +- libavcodec/wmavoice.c | 2 +- libavcodec/wmv2dec.c | 2 +- libavcodec/wmv2enc.c | 2 +- libavcodec/wnv1.c | 2 +- libavcodec/wrapped_avframe.c | 4 +- libavcodec/ws-snd1.c | 2 +- libavcodec/xan.c | 2 +- libavcodec/xbmdec.c | 2 +- libavcodec/xbmenc.c | 2 +- libavcodec/xfacedec.c | 2 +- libavcodec/xfaceenc.c | 2 +- libavcodec/xl.c | 2 +- libavcodec/xpmdec.c | 2 +- libavcodec/xsubdec.c | 2 +- libavcodec/xsubenc.c | 2 +- libavcodec/xwddec.c | 2 +- libavcodec/xwdenc.c | 2 +- libavcodec/xxan.c | 2 +- libavcodec/y41pdec.c | 2 +- libavcodec/y41penc.c | 2 +- libavcodec/ylc.c | 2 +- libavcodec/yop.c | 2 +- libavcodec/yuv4dec.c | 2 +- libavcodec/yuv4enc.c | 2 +- libavcodec/zerocodec.c | 2 +- libavcodec/zmbv.c | 2 +- libavcodec/zmbvenc.c | 2 +- 482 files changed, 1377 insertions(+), 1367 deletions(-) diff --git a/libavcodec/012v.c b/libavcodec/012v.c index b5a4066656..f8aea0d04f 100644 --- a/libavcodec/012v.c +++ b/libavcodec/012v.c @@ -144,7 +144,7 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_zero12v_decoder = { +const AVCodec ff_zero12v_decoder = { .name = "012v", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index cbd8637763..e628edde43 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -1025,7 +1025,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_fourxm_decoder = { +const AVCodec ff_fourxm_decoder = { .name = "4xm", .long_name = NULL_IF_CONFIG_SMALL("4X Movie"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c index dda8b8b1c9..6865b9b12e 100644 --- a/libavcodec/8bps.c +++ b/libavcodec/8bps.c @@ -173,7 +173,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_eightbps_decoder = { +const AVCodec ff_eightbps_decoder = { .name = "8bps", .long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c index 092dbaae04..54ad806ec9 100644 --- a/libavcodec/8svx.c +++ b/libavcodec/8svx.c @@ -184,7 +184,7 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx) } #if CONFIG_EIGHTSVX_FIB_DECODER -AVCodec ff_eightsvx_fib_decoder = { +const AVCodec ff_eightsvx_fib_decoder = { .name = "8svx_fib", .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"), .type = AVMEDIA_TYPE_AUDIO, @@ -199,7 +199,7 @@ AVCodec ff_eightsvx_fib_decoder = { }; #endif #if CONFIG_EIGHTSVX_EXP_DECODER -AVCodec ff_eightsvx_exp_decoder = { +const AVCodec ff_eightsvx_exp_decoder = { .name = "8svx_exp", .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 91c89c87eb..9dc859b271 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -399,7 +399,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } #if CONFIG_A64MULTI_ENCODER -AVCodec ff_a64multi_encoder = { +const AVCodec ff_a64multi_encoder = { .name = "a64multi", .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"), .type = AVMEDIA_TYPE_VIDEO, @@ -414,7 +414,7 @@ AVCodec ff_a64multi_encoder = { }; #endif #if CONFIG_A64MULTI5_ENCODER -AVCodec ff_a64multi5_encoder = { +const AVCodec ff_a64multi5_encoder = { .name = "a64multi5", .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 0174bf8d5b..3ce5330c06 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -553,7 +553,7 @@ static av_cold int latm_decode_init(AVCodecContext *avctx) return ret; } -AVCodec ff_aac_decoder = { +const AVCodec ff_aac_decoder = { .name = "aac", .long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"), .type = AVMEDIA_TYPE_AUDIO, @@ -578,7 +578,7 @@ AVCodec ff_aac_decoder = { in MPEG transport streams which only contain one program. To do a more complex LATM demuxing a separate LATM demuxer should be used. */ -AVCodec ff_aac_latm_decoder = { +const AVCodec ff_aac_latm_decoder = { .name = "aac_latm", .long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index c5d923a8b4..00257a5478 100644 --- a/libavcodec/aacdec_fixed.c +++ b/libavcodec/aacdec_fixed.c @@ -451,7 +451,7 @@ static void apply_independent_coupling_fixed(AACContext *ac, #include "aacdec_template.c" -AVCodec ff_aac_fixed_decoder = { +const AVCodec ff_aac_fixed_decoder = { .name = "aac_fixed", .long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 6dc68eb9b0..219bf02163 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -1130,7 +1130,7 @@ static const AVCodecDefault aac_encode_defaults[] = { { NULL } }; -AVCodec ff_aac_encoder = { +const AVCodec ff_aac_encoder = { .name = "aac", .long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index 26570f49e5..2177aa8f56 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -149,7 +149,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_aasc_decoder = { +const AVCodec ff_aasc_decoder = { .name = "aasc", .long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c index daab433295..f6c2810ce5 100644 --- a/libavcodec/ac3dec_fixed.c +++ b/libavcodec/ac3dec_fixed.c @@ -168,7 +168,7 @@ static const AVClass ac3_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_ac3_fixed_decoder = { +const AVCodec ff_ac3_fixed_decoder = { .name = "ac3_fixed", .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_AC3, diff --git a/libavcodec/ac3dec_float.c b/libavcodec/ac3dec_float.c index b18317f8b3..3aa6482b1a 100644 --- a/libavcodec/ac3dec_float.c +++ b/libavcodec/ac3dec_float.c @@ -53,7 +53,7 @@ static const AVClass ac3_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_ac3_decoder = { +const AVCodec ff_ac3_decoder = { .name = "ac3", .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_AC3, @@ -78,7 +78,7 @@ static const AVClass eac3_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_eac3_decoder = { +const AVCodec ff_eac3_decoder = { .name = "eac3", .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_EAC3, diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c index 8b1a062c66..fe8607988b 100644 --- a/libavcodec/ac3enc_fixed.c +++ b/libavcodec/ac3enc_fixed.c @@ -127,7 +127,7 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx) } -AVCodec ff_ac3_fixed_encoder = { +const AVCodec ff_ac3_fixed_encoder = { .name = "ac3_fixed", .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c index 223874907f..e5c2cbd42c 100644 --- a/libavcodec/ac3enc_float.c +++ b/libavcodec/ac3enc_float.c @@ -131,7 +131,7 @@ av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx) return ff_ac3_encode_init(avctx); } -AVCodec ff_ac3_encoder = { +const AVCodec ff_ac3_encoder = { .name = "ac3", .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index be14607eac..b58a5848cf 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -2139,7 +2139,7 @@ static const enum AVSampleFormat sample_fmts_both[] = { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }; #define ADPCM_DECODER(id_, sample_fmts_, name_, long_name_) \ -AVCodec ff_ ## name_ ## _decoder = { \ +const AVCodec ff_ ## name_ ## _decoder = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .type = AVMEDIA_TYPE_AUDIO, \ diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 9dc77d519a..a8ba41d9c0 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -968,7 +968,7 @@ static const AVClass name_ ## _encoder_class = { \ .version = LIBAVUTIL_VERSION_INT, \ }; \ \ -AVCodec ff_ ## name_ ## _encoder = { \ +const AVCodec ff_ ## name_ ## _encoder = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .type = AVMEDIA_TYPE_AUDIO, \ diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c index eb05145da9..bff15d826c 100644 --- a/libavcodec/adxdec.c +++ b/libavcodec/adxdec.c @@ -190,7 +190,7 @@ static void adx_decode_flush(AVCodecContext *avctx) c->eof = 0; } -AVCodec ff_adpcm_adx_decoder = { +const AVCodec ff_adpcm_adx_decoder = { .name = "adpcm_adx", .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c index 93b902b0e1..f507840a1a 100644 --- a/libavcodec/adxenc.c +++ b/libavcodec/adxenc.c @@ -187,7 +187,7 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_adpcm_adx_encoder = { +const AVCodec ff_adpcm_adx_encoder = { .name = "adpcm_adx", .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/agm.c b/libavcodec/agm.c index f39383140f..7579d9765d 100644 --- a/libavcodec/agm.c +++ b/libavcodec/agm.c @@ -1285,7 +1285,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_agm_decoder = { +const AVCodec ff_agm_decoder = { .name = "agm", .long_name = NULL_IF_CONFIG_SMALL("Amuse Graphics Movie"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/aic.c b/libavcodec/aic.c index cf5b0782be..c95bdae1ed 100644 --- a/libavcodec/aic.c +++ b/libavcodec/aic.c @@ -496,7 +496,7 @@ static av_cold int aic_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_aic_decoder = { +const AVCodec ff_aic_decoder = { .name = "aic", .long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 7edbb06a3e..67c02ab6af 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -616,7 +616,7 @@ static const AVClass alac_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_alac_decoder = { +const AVCodec ff_alac_decoder = { .name = "alac", .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index 7c7a35c002..d6b2e1c991 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -631,7 +631,7 @@ static const AVClass alacenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_alac_encoder = { +const AVCodec ff_alac_encoder = { .name = "alac", .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/aliaspixdec.c b/libavcodec/aliaspixdec.c index def7e17c0f..e08891ec1b 100644 --- a/libavcodec/aliaspixdec.c +++ b/libavcodec/aliaspixdec.c @@ -121,7 +121,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return avpkt->size; } -AVCodec ff_alias_pix_decoder = { +const AVCodec ff_alias_pix_decoder = { .name = "alias_pix", .long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/aliaspixenc.c b/libavcodec/aliaspixenc.c index 7c881d2e0a..01e9b3ab96 100644 --- a/libavcodec/aliaspixenc.c +++ b/libavcodec/aliaspixenc.c @@ -103,7 +103,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_alias_pix_encoder = { +const AVCodec ff_alias_pix_encoder = { .name = "alias_pix", .long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index e60ac5ce78..35e51c1397 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -28,811 +28,818 @@ #include "libavutil/thread.h" #include "avcodec.h" -extern AVCodec ff_a64multi_encoder; -extern AVCodec ff_a64multi5_encoder; -extern AVCodec ff_aasc_decoder; -extern AVCodec ff_aic_decoder; -extern AVCodec ff_alias_pix_encoder; -extern AVCodec ff_alias_pix_decoder; -extern AVCodec ff_agm_decoder; -extern AVCodec ff_amv_encoder; -extern AVCodec ff_amv_decoder; -extern AVCodec ff_anm_decoder; -extern AVCodec ff_ansi_decoder; -extern AVCodec ff_apng_encoder; -extern AVCodec ff_apng_decoder; -extern AVCodec ff_arbc_decoder; -extern AVCodec ff_argo_decoder; -extern AVCodec ff_asv1_encoder; -extern AVCodec ff_asv1_decoder; -extern AVCodec ff_asv2_encoder; -extern AVCodec ff_asv2_decoder; -extern AVCodec ff_aura_decoder; -extern AVCodec ff_aura2_decoder; -extern AVCodec ff_avrp_encoder; -extern AVCodec ff_avrp_decoder; -extern AVCodec ff_avrn_decoder; -extern AVCodec ff_avs_decoder; -extern AVCodec ff_avui_encoder; -extern AVCodec ff_avui_decoder; -extern AVCodec ff_ayuv_encoder; -extern AVCodec ff_ayuv_decoder; -extern AVCodec ff_bethsoftvid_decoder; -extern AVCodec ff_bfi_decoder; -extern AVCodec ff_bink_decoder; -extern AVCodec ff_bitpacked_decoder; -extern AVCodec ff_bmp_encoder; -extern AVCodec ff_bmp_decoder; -extern AVCodec ff_bmv_video_decoder; -extern AVCodec ff_brender_pix_decoder; -extern AVCodec ff_c93_decoder; -extern AVCodec ff_cavs_decoder; -extern AVCodec ff_cdgraphics_decoder; -extern AVCodec ff_cdtoons_decoder; -extern AVCodec ff_cdxl_decoder; -extern AVCodec ff_cfhd_encoder; -extern AVCodec ff_cfhd_decoder; -extern AVCodec ff_cinepak_encoder; -extern AVCodec ff_cinepak_decoder; -extern AVCodec ff_clearvideo_decoder; -extern AVCodec ff_cljr_encoder; -extern AVCodec ff_cljr_decoder; -extern AVCodec ff_cllc_decoder; -extern AVCodec ff_comfortnoise_encoder; -extern AVCodec ff_comfortnoise_decoder; -extern AVCodec ff_cpia_decoder; -extern AVCodec ff_cri_decoder; -extern AVCodec ff_cscd_decoder; -extern AVCodec ff_cyuv_decoder; -extern AVCodec ff_dds_decoder; -extern AVCodec ff_dfa_decoder; -extern AVCodec ff_dirac_decoder; -extern AVCodec ff_dnxhd_encoder; -extern AVCodec ff_dnxhd_decoder; -extern AVCodec ff_dpx_encoder; -extern AVCodec ff_dpx_decoder; -extern AVCodec ff_dsicinvideo_decoder; -extern AVCodec ff_dvaudio_decoder; -extern AVCodec ff_dvvideo_encoder; -extern AVCodec ff_dvvideo_decoder; -extern AVCodec ff_dxa_decoder; -extern AVCodec ff_dxtory_decoder; -extern AVCodec ff_dxv_decoder; -extern AVCodec ff_eacmv_decoder; -extern AVCodec ff_eamad_decoder; -extern AVCodec ff_eatgq_decoder; -extern AVCodec ff_eatgv_decoder; -extern AVCodec ff_eatqi_decoder; -extern AVCodec ff_eightbps_decoder; -extern AVCodec ff_eightsvx_exp_decoder; -extern AVCodec ff_eightsvx_fib_decoder; -extern AVCodec ff_escape124_decoder; -extern AVCodec ff_escape130_decoder; -extern AVCodec ff_exr_encoder; -extern AVCodec ff_exr_decoder; -extern AVCodec ff_ffv1_encoder; -extern AVCodec ff_ffv1_decoder; -extern AVCodec ff_ffvhuff_encoder; -extern AVCodec ff_ffvhuff_decoder; -extern AVCodec ff_fic_decoder; -extern AVCodec ff_fits_encoder; -extern AVCodec ff_fits_decoder; -extern AVCodec ff_flashsv_encoder; -extern AVCodec ff_flashsv_decoder; -extern AVCodec ff_flashsv2_encoder; -extern AVCodec ff_flashsv2_decoder; -extern AVCodec ff_flic_decoder; -extern AVCodec ff_flv_encoder; -extern AVCodec ff_flv_decoder; -extern AVCodec ff_fmvc_decoder; -extern AVCodec ff_fourxm_decoder; -extern AVCodec ff_fraps_decoder; -extern AVCodec ff_frwu_decoder; -extern AVCodec ff_g2m_decoder; -extern AVCodec ff_gdv_decoder; -extern AVCodec ff_gif_encoder; -extern AVCodec ff_gif_decoder; -extern AVCodec ff_h261_encoder; -extern AVCodec ff_h261_decoder; -extern AVCodec ff_h263_encoder; -extern AVCodec ff_h263_decoder; -extern AVCodec ff_h263i_decoder; -extern AVCodec ff_h263p_encoder; -extern AVCodec ff_h263p_decoder; -extern AVCodec ff_h263_v4l2m2m_decoder; -extern AVCodec ff_h264_decoder; -extern AVCodec ff_h264_crystalhd_decoder; -extern AVCodec ff_h264_v4l2m2m_decoder; -extern AVCodec ff_h264_mediacodec_decoder; -extern AVCodec ff_h264_mmal_decoder; -extern AVCodec ff_h264_qsv_decoder; -extern AVCodec ff_h264_rkmpp_decoder; -extern AVCodec ff_hap_encoder; -extern AVCodec ff_hap_decoder; -extern AVCodec ff_hevc_decoder; -extern AVCodec ff_hevc_qsv_decoder; -extern AVCodec ff_hevc_rkmpp_decoder; -extern AVCodec ff_hevc_v4l2m2m_decoder; -extern AVCodec ff_hnm4_video_decoder; -extern AVCodec ff_hq_hqa_decoder; -extern AVCodec ff_hqx_decoder; -extern AVCodec ff_huffyuv_encoder; -extern AVCodec ff_huffyuv_decoder; -extern AVCodec ff_hymt_decoder; -extern AVCodec ff_idcin_decoder; -extern AVCodec ff_iff_ilbm_decoder; -extern AVCodec ff_imm4_decoder; -extern AVCodec ff_imm5_decoder; -extern AVCodec ff_indeo2_decoder; -extern AVCodec ff_indeo3_decoder; -extern AVCodec ff_indeo4_decoder; -extern AVCodec ff_indeo5_decoder; -extern AVCodec ff_interplay_video_decoder; -extern AVCodec ff_ipu_decoder; -extern AVCodec ff_jpeg2000_encoder; -extern AVCodec ff_jpeg2000_decoder; -extern AVCodec ff_jpegls_encoder; -extern AVCodec ff_jpegls_decoder; -extern AVCodec ff_jv_decoder; -extern AVCodec ff_kgv1_decoder; -extern AVCodec ff_kmvc_decoder; -extern AVCodec ff_lagarith_decoder; -extern AVCodec ff_ljpeg_encoder; -extern AVCodec ff_loco_decoder; -extern AVCodec ff_lscr_decoder; -extern AVCodec ff_m101_decoder; -extern AVCodec ff_magicyuv_encoder; -extern AVCodec ff_magicyuv_decoder; -extern AVCodec ff_mdec_decoder; -extern AVCodec ff_mimic_decoder; -extern AVCodec ff_mjpeg_encoder; -extern AVCodec ff_mjpeg_decoder; -extern AVCodec ff_mjpegb_decoder; -extern AVCodec ff_mmvideo_decoder; -extern AVCodec ff_mobiclip_decoder; -extern AVCodec ff_motionpixels_decoder; -extern AVCodec ff_mpeg1video_encoder; -extern AVCodec ff_mpeg1video_decoder; -extern AVCodec ff_mpeg2video_encoder; -extern AVCodec ff_mpeg2video_decoder; -extern AVCodec ff_mpeg4_encoder; -extern AVCodec ff_mpeg4_decoder; -extern AVCodec ff_mpeg4_crystalhd_decoder; -extern AVCodec ff_mpeg4_v4l2m2m_decoder; -extern AVCodec ff_mpeg4_mmal_decoder; -extern AVCodec ff_mpegvideo_decoder; -extern AVCodec ff_mpeg1_v4l2m2m_decoder; -extern AVCodec ff_mpeg2_mmal_decoder; -extern AVCodec ff_mpeg2_crystalhd_decoder; -extern AVCodec ff_mpeg2_v4l2m2m_decoder; -extern AVCodec ff_mpeg2_qsv_decoder; -extern AVCodec ff_mpeg2_mediacodec_decoder; -extern AVCodec ff_msa1_decoder; -extern AVCodec ff_mscc_decoder; -extern AVCodec ff_msmpeg4v1_decoder; -extern AVCodec ff_msmpeg4v2_encoder; -extern AVCodec ff_msmpeg4v2_decoder; -extern AVCodec ff_msmpeg4v3_encoder; -extern AVCodec ff_msmpeg4v3_decoder; -extern AVCodec ff_msmpeg4_crystalhd_decoder; -extern AVCodec ff_msp2_decoder; -extern AVCodec ff_msrle_decoder; -extern AVCodec ff_mss1_decoder; -extern AVCodec ff_mss2_decoder; -extern AVCodec ff_msvideo1_encoder; -extern AVCodec ff_msvideo1_decoder; -extern AVCodec ff_mszh_decoder; -extern AVCodec ff_mts2_decoder; -extern AVCodec ff_mv30_decoder; -extern AVCodec ff_mvc1_decoder; -extern AVCodec ff_mvc2_decoder; -extern AVCodec ff_mvdv_decoder; -extern AVCodec ff_mvha_decoder; -extern AVCodec ff_mwsc_decoder; -extern AVCodec ff_mxpeg_decoder; -extern AVCodec ff_notchlc_decoder; -extern AVCodec ff_nuv_decoder; -extern AVCodec ff_paf_video_decoder; -extern AVCodec ff_pam_encoder; -extern AVCodec ff_pam_decoder; -extern AVCodec ff_pbm_encoder; -extern AVCodec ff_pbm_decoder; -extern AVCodec ff_pcx_encoder; -extern AVCodec ff_pcx_decoder; -extern AVCodec ff_pfm_encoder; -extern AVCodec ff_pfm_decoder; -extern AVCodec ff_pgm_encoder; -extern AVCodec ff_pgm_decoder; -extern AVCodec ff_pgmyuv_encoder; -extern AVCodec ff_pgmyuv_decoder; -extern AVCodec ff_pgx_decoder; -extern AVCodec ff_photocd_decoder; -extern AVCodec ff_pictor_decoder; -extern AVCodec ff_pixlet_decoder; -extern AVCodec ff_png_encoder; -extern AVCodec ff_png_decoder; -extern AVCodec ff_ppm_encoder; -extern AVCodec ff_ppm_decoder; -extern AVCodec ff_prores_encoder; -extern AVCodec ff_prores_decoder; -extern AVCodec ff_prores_aw_encoder; -extern AVCodec ff_prores_ks_encoder; -extern AVCodec ff_prosumer_decoder; -extern AVCodec ff_psd_decoder; -extern AVCodec ff_ptx_decoder; -extern AVCodec ff_qdraw_decoder; -extern AVCodec ff_qpeg_decoder; -extern AVCodec ff_qtrle_encoder; -extern AVCodec ff_qtrle_decoder; -extern AVCodec ff_r10k_encoder; -extern AVCodec ff_r10k_decoder; -extern AVCodec ff_r210_encoder; -extern AVCodec ff_r210_decoder; -extern AVCodec ff_rasc_decoder; -extern AVCodec ff_rawvideo_encoder; -extern AVCodec ff_rawvideo_decoder; -extern AVCodec ff_rl2_decoder; -extern AVCodec ff_roq_encoder; -extern AVCodec ff_roq_decoder; -extern AVCodec ff_rpza_encoder; -extern AVCodec ff_rpza_decoder; -extern AVCodec ff_rscc_decoder; -extern AVCodec ff_rv10_encoder; -extern AVCodec ff_rv10_decoder; -extern AVCodec ff_rv20_encoder; -extern AVCodec ff_rv20_decoder; -extern AVCodec ff_rv30_decoder; -extern AVCodec ff_rv40_decoder; -extern AVCodec ff_s302m_encoder; -extern AVCodec ff_s302m_decoder; -extern AVCodec ff_sanm_decoder; -extern AVCodec ff_scpr_decoder; -extern AVCodec ff_screenpresso_decoder; -extern AVCodec ff_sga_decoder; -extern AVCodec ff_sgi_encoder; -extern AVCodec ff_sgi_decoder; -extern AVCodec ff_sgirle_decoder; -extern AVCodec ff_sheervideo_decoder; -extern AVCodec ff_simbiosis_imx_decoder; -extern AVCodec ff_smacker_decoder; -extern AVCodec ff_smc_decoder; -extern AVCodec ff_smvjpeg_decoder; -extern AVCodec ff_snow_encoder; -extern AVCodec ff_snow_decoder; -extern AVCodec ff_sp5x_decoder; -extern AVCodec ff_speedhq_decoder; -extern AVCodec ff_speedhq_encoder; -extern AVCodec ff_srgc_decoder; -extern AVCodec ff_sunrast_encoder; -extern AVCodec ff_sunrast_decoder; -extern AVCodec ff_svq1_encoder; -extern AVCodec ff_svq1_decoder; -extern AVCodec ff_svq3_decoder; -extern AVCodec ff_targa_encoder; -extern AVCodec ff_targa_decoder; -extern AVCodec ff_targa_y216_decoder; -extern AVCodec ff_tdsc_decoder; -extern AVCodec ff_theora_decoder; -extern AVCodec ff_thp_decoder; -extern AVCodec ff_tiertexseqvideo_decoder; -extern AVCodec ff_tiff_encoder; -extern AVCodec ff_tiff_decoder; -extern AVCodec ff_tmv_decoder; -extern AVCodec ff_truemotion1_decoder; -extern AVCodec ff_truemotion2_decoder; -extern AVCodec ff_truemotion2rt_decoder; -extern AVCodec ff_tscc_decoder; -extern AVCodec ff_tscc2_decoder; -extern AVCodec ff_txd_decoder; -extern AVCodec ff_ulti_decoder; -extern AVCodec ff_utvideo_encoder; -extern AVCodec ff_utvideo_decoder; -extern AVCodec ff_v210_encoder; -extern AVCodec ff_v210_decoder; -extern AVCodec ff_v210x_decoder; -extern AVCodec ff_v308_encoder; -extern AVCodec ff_v308_decoder; -extern AVCodec ff_v408_encoder; -extern AVCodec ff_v408_decoder; -extern AVCodec ff_v410_encoder; -extern AVCodec ff_v410_decoder; -extern AVCodec ff_vb_decoder; -extern AVCodec ff_vble_decoder; -extern AVCodec ff_vc1_decoder; -extern AVCodec ff_vc1_crystalhd_decoder; -extern AVCodec ff_vc1image_decoder; -extern AVCodec ff_vc1_mmal_decoder; -extern AVCodec ff_vc1_qsv_decoder; -extern AVCodec ff_vc1_v4l2m2m_decoder; -extern AVCodec ff_vc2_encoder; -extern AVCodec ff_vcr1_decoder; -extern AVCodec ff_vmdvideo_decoder; -extern AVCodec ff_vmnc_decoder; -extern AVCodec ff_vp3_decoder; -extern AVCodec ff_vp4_decoder; -extern AVCodec ff_vp5_decoder; -extern AVCodec ff_vp6_decoder; -extern AVCodec ff_vp6a_decoder; -extern AVCodec ff_vp6f_decoder; -extern AVCodec ff_vp7_decoder; -extern AVCodec ff_vp8_decoder; -extern AVCodec ff_vp8_rkmpp_decoder; -extern AVCodec ff_vp8_v4l2m2m_decoder; -extern AVCodec ff_vp9_decoder; -extern AVCodec ff_vp9_rkmpp_decoder; -extern AVCodec ff_vp9_v4l2m2m_decoder; -extern AVCodec ff_vqa_decoder; -extern AVCodec ff_webp_decoder; -extern AVCodec ff_wcmv_decoder; -extern AVCodec ff_wrapped_avframe_encoder; -extern AVCodec ff_wrapped_avframe_decoder; -extern AVCodec ff_wmv1_encoder; -extern AVCodec ff_wmv1_decoder; -extern AVCodec ff_wmv2_encoder; -extern AVCodec ff_wmv2_decoder; -extern AVCodec ff_wmv3_decoder; -extern AVCodec ff_wmv3_crystalhd_decoder; -extern AVCodec ff_wmv3image_decoder; -extern AVCodec ff_wnv1_decoder; -extern AVCodec ff_xan_wc3_decoder; -extern AVCodec ff_xan_wc4_decoder; -extern AVCodec ff_xbm_encoder; -extern AVCodec ff_xbm_decoder; -extern AVCodec ff_xface_encoder; -extern AVCodec ff_xface_decoder; -extern AVCodec ff_xl_decoder; -extern AVCodec ff_xpm_decoder; -extern AVCodec ff_xwd_encoder; -extern AVCodec ff_xwd_decoder; -extern AVCodec ff_y41p_encoder; -extern AVCodec ff_y41p_decoder; -extern AVCodec ff_ylc_decoder; -extern AVCodec ff_yop_decoder; -extern AVCodec ff_yuv4_encoder; -extern AVCodec ff_yuv4_decoder; -extern AVCodec ff_zero12v_decoder; -extern AVCodec ff_zerocodec_decoder; -extern AVCodec ff_zlib_encoder; -extern AVCodec ff_zlib_decoder; -extern AVCodec ff_zmbv_encoder; -extern AVCodec ff_zmbv_decoder; +extern const AVCodec ff_a64multi_encoder; +extern const AVCodec ff_a64multi5_encoder; +extern const AVCodec ff_aasc_decoder; +extern const AVCodec ff_aic_decoder; +extern const AVCodec ff_alias_pix_encoder; +extern const AVCodec ff_alias_pix_decoder; +extern const AVCodec ff_agm_decoder; +extern const AVCodec ff_amv_encoder; +extern const AVCodec ff_amv_decoder; +extern const AVCodec ff_anm_decoder; +extern const AVCodec ff_ansi_decoder; +extern const AVCodec ff_apng_encoder; +extern const AVCodec ff_apng_decoder; +extern const AVCodec ff_arbc_decoder; +extern const AVCodec ff_argo_decoder; +extern const AVCodec ff_asv1_encoder; +extern const AVCodec ff_asv1_decoder; +extern const AVCodec ff_asv2_encoder; +extern const AVCodec ff_asv2_decoder; +extern const AVCodec ff_aura_decoder; +extern const AVCodec ff_aura2_decoder; +extern const AVCodec ff_avrp_encoder; +extern const AVCodec ff_avrp_decoder; +extern const AVCodec ff_avrn_decoder; +extern const AVCodec ff_avs_decoder; +extern const AVCodec ff_avui_encoder; +extern const AVCodec ff_avui_decoder; +extern const AVCodec ff_ayuv_encoder; +extern const AVCodec ff_ayuv_decoder; +extern const AVCodec ff_bethsoftvid_decoder; +extern const AVCodec ff_bfi_decoder; +extern const AVCodec ff_bink_decoder; +extern const AVCodec ff_bitpacked_decoder; +extern const AVCodec ff_bmp_encoder; +extern const AVCodec ff_bmp_decoder; +extern const AVCodec ff_bmv_video_decoder; +extern const AVCodec ff_brender_pix_decoder; +extern const AVCodec ff_c93_decoder; +extern const AVCodec ff_cavs_decoder; +extern const AVCodec ff_cdgraphics_decoder; +extern const AVCodec ff_cdtoons_decoder; +extern const AVCodec ff_cdxl_decoder; +extern const AVCodec ff_cfhd_encoder; +extern const AVCodec ff_cfhd_decoder; +extern const AVCodec ff_cinepak_encoder; +extern const AVCodec ff_cinepak_decoder; +extern const AVCodec ff_clearvideo_decoder; +extern const AVCodec ff_cljr_encoder; +extern const AVCodec ff_cljr_decoder; +extern const AVCodec ff_cllc_decoder; +extern const AVCodec ff_comfortnoise_encoder; +extern const AVCodec ff_comfortnoise_decoder; +extern const AVCodec ff_cpia_decoder; +extern const AVCodec ff_cri_decoder; +extern const AVCodec ff_cscd_decoder; +extern const AVCodec ff_cyuv_decoder; +extern const AVCodec ff_dds_decoder; +extern const AVCodec ff_dfa_decoder; +extern const AVCodec ff_dirac_decoder; +extern const AVCodec ff_dnxhd_encoder; +extern const AVCodec ff_dnxhd_decoder; +extern const AVCodec ff_dpx_encoder; +extern const AVCodec ff_dpx_decoder; +extern const AVCodec ff_dsicinvideo_decoder; +extern const AVCodec ff_dvaudio_decoder; +extern const AVCodec ff_dvvideo_encoder; +extern const AVCodec ff_dvvideo_decoder; +extern const AVCodec ff_dxa_decoder; +extern const AVCodec ff_dxtory_decoder; +extern const AVCodec ff_dxv_decoder; +extern const AVCodec ff_eacmv_decoder; +extern const AVCodec ff_eamad_decoder; +extern const AVCodec ff_eatgq_decoder; +extern const AVCodec ff_eatgv_decoder; +extern const AVCodec ff_eatqi_decoder; +extern const AVCodec ff_eightbps_decoder; +extern const AVCodec ff_eightsvx_exp_decoder; +extern const AVCodec ff_eightsvx_fib_decoder; +extern const AVCodec ff_escape124_decoder; +extern const AVCodec ff_escape130_decoder; +extern const AVCodec ff_exr_encoder; +extern const AVCodec ff_exr_decoder; +extern const AVCodec ff_ffv1_encoder; +extern const AVCodec ff_ffv1_decoder; +extern const AVCodec ff_ffvhuff_encoder; +extern const AVCodec ff_ffvhuff_decoder; +extern const AVCodec ff_fic_decoder; +extern const AVCodec ff_fits_encoder; +extern const AVCodec ff_fits_decoder; +extern const AVCodec ff_flashsv_encoder; +extern const AVCodec ff_flashsv_decoder; +extern const AVCodec ff_flashsv2_encoder; +extern const AVCodec ff_flashsv2_decoder; +extern const AVCodec ff_flic_decoder; +extern const AVCodec ff_flv_encoder; +extern const AVCodec ff_flv_decoder; +extern const AVCodec ff_fmvc_decoder; +extern const AVCodec ff_fourxm_decoder; +extern const AVCodec ff_fraps_decoder; +extern const AVCodec ff_frwu_decoder; +extern const AVCodec ff_g2m_decoder; +extern const AVCodec ff_gdv_decoder; +extern const AVCodec ff_gif_encoder; +extern const AVCodec ff_gif_decoder; +extern const AVCodec ff_h261_encoder; +extern const AVCodec ff_h261_decoder; +extern const AVCodec ff_h263_encoder; +extern const AVCodec ff_h263_decoder; +extern const AVCodec ff_h263i_decoder; +extern const AVCodec ff_h263p_encoder; +extern const AVCodec ff_h263p_decoder; +extern const AVCodec ff_h263_v4l2m2m_decoder; +extern const AVCodec ff_h264_decoder; +extern const AVCodec ff_h264_crystalhd_decoder; +extern const AVCodec ff_h264_v4l2m2m_decoder; +extern const AVCodec ff_h264_mediacodec_decoder; +extern const AVCodec ff_h264_mmal_decoder; +extern const AVCodec ff_h264_qsv_decoder; +extern const AVCodec ff_h264_rkmpp_decoder; +extern const AVCodec ff_hap_encoder; +extern const AVCodec ff_hap_decoder; +extern const AVCodec ff_hevc_decoder; +extern const AVCodec ff_hevc_qsv_decoder; +extern const AVCodec ff_hevc_rkmpp_decoder; +extern const AVCodec ff_hevc_v4l2m2m_decoder; +extern const AVCodec ff_hnm4_video_decoder; +extern const AVCodec ff_hq_hqa_decoder; +extern const AVCodec ff_hqx_decoder; +extern const AVCodec ff_huffyuv_encoder; +extern const AVCodec ff_huffyuv_decoder; +extern const AVCodec ff_hymt_decoder; +extern const AVCodec ff_idcin_decoder; +extern const AVCodec ff_iff_ilbm_decoder; +extern const AVCodec ff_imm4_decoder; +extern const AVCodec ff_imm5_decoder; +extern const AVCodec ff_indeo2_decoder; +extern const AVCodec ff_indeo3_decoder; +extern const AVCodec ff_indeo4_decoder; +extern const AVCodec ff_indeo5_decoder; +extern const AVCodec ff_interplay_video_decoder; +extern const AVCodec ff_ipu_decoder; +extern const AVCodec ff_jpeg2000_encoder; +extern const AVCodec ff_jpeg2000_decoder; +extern const AVCodec ff_jpegls_encoder; +extern const AVCodec ff_jpegls_decoder; +extern const AVCodec ff_jv_decoder; +extern const AVCodec ff_kgv1_decoder; +extern const AVCodec ff_kmvc_decoder; +extern const AVCodec ff_lagarith_decoder; +extern const AVCodec ff_ljpeg_encoder; +extern const AVCodec ff_loco_decoder; +extern const AVCodec ff_lscr_decoder; +extern const AVCodec ff_m101_decoder; +extern const AVCodec ff_magicyuv_encoder; +extern const AVCodec ff_magicyuv_decoder; +extern const AVCodec ff_mdec_decoder; +extern const AVCodec ff_mimic_decoder; +extern const AVCodec ff_mjpeg_encoder; +extern const AVCodec ff_mjpeg_decoder; +extern const AVCodec ff_mjpegb_decoder; +extern const AVCodec ff_mmvideo_decoder; +extern const AVCodec ff_mobiclip_decoder; +extern const AVCodec ff_motionpixels_decoder; +extern const AVCodec ff_mpeg1video_encoder; +extern const AVCodec ff_mpeg1video_decoder; +extern const AVCodec ff_mpeg2video_encoder; +extern const AVCodec ff_mpeg2video_decoder; +extern const AVCodec ff_mpeg4_encoder; +extern const AVCodec ff_mpeg4_decoder; +extern const AVCodec ff_mpeg4_crystalhd_decoder; +extern const AVCodec ff_mpeg4_v4l2m2m_decoder; +extern const AVCodec ff_mpeg4_mmal_decoder; +extern const AVCodec ff_mpegvideo_decoder; +extern const AVCodec ff_mpeg1_v4l2m2m_decoder; +extern const AVCodec ff_mpeg2_mmal_decoder; +extern const AVCodec ff_mpeg2_crystalhd_decoder; +extern const AVCodec ff_mpeg2_v4l2m2m_decoder; +extern const AVCodec ff_mpeg2_qsv_decoder; +extern const AVCodec ff_mpeg2_mediacodec_decoder; +extern const AVCodec ff_msa1_decoder; +extern const AVCodec ff_mscc_decoder; +extern const AVCodec ff_msmpeg4v1_decoder; +extern const AVCodec ff_msmpeg4v2_encoder; +extern const AVCodec ff_msmpeg4v2_decoder; +extern const AVCodec ff_msmpeg4v3_encoder; +extern const AVCodec ff_msmpeg4v3_decoder; +extern const AVCodec ff_msmpeg4_crystalhd_decoder; +extern const AVCodec ff_msp2_decoder; +extern const AVCodec ff_msrle_decoder; +extern const AVCodec ff_mss1_decoder; +extern const AVCodec ff_mss2_decoder; +extern const AVCodec ff_msvideo1_encoder; +extern const AVCodec ff_msvideo1_decoder; +extern const AVCodec ff_mszh_decoder; +extern const AVCodec ff_mts2_decoder; +extern const AVCodec ff_mv30_decoder; +extern const AVCodec ff_mvc1_decoder; +extern const AVCodec ff_mvc2_decoder; +extern const AVCodec ff_mvdv_decoder; +extern const AVCodec ff_mvha_decoder; +extern const AVCodec ff_mwsc_decoder; +extern const AVCodec ff_mxpeg_decoder; +extern const AVCodec ff_notchlc_decoder; +extern const AVCodec ff_nuv_decoder; +extern const AVCodec ff_paf_video_decoder; +extern const AVCodec ff_pam_encoder; +extern const AVCodec ff_pam_decoder; +extern const AVCodec ff_pbm_encoder; +extern const AVCodec ff_pbm_decoder; +extern const AVCodec ff_pcx_encoder; +extern const AVCodec ff_pcx_decoder; +extern const AVCodec ff_pfm_encoder; +extern const AVCodec ff_pfm_decoder; +extern const AVCodec ff_pgm_encoder; +extern const AVCodec ff_pgm_decoder; +extern const AVCodec ff_pgmyuv_encoder; +extern const AVCodec ff_pgmyuv_decoder; +extern const AVCodec ff_pgx_decoder; +extern const AVCodec ff_photocd_decoder; +extern const AVCodec ff_pictor_decoder; +extern const AVCodec ff_pixlet_decoder; +extern const AVCodec ff_png_encoder; +extern const AVCodec ff_png_decoder; +extern const AVCodec ff_ppm_encoder; +extern const AVCodec ff_ppm_decoder; +extern const AVCodec ff_prores_encoder; +extern const AVCodec ff_prores_decoder; +extern const AVCodec ff_prores_aw_encoder; +extern const AVCodec ff_prores_ks_encoder; +extern const AVCodec ff_prosumer_decoder; +extern const AVCodec ff_psd_decoder; +extern const AVCodec ff_ptx_decoder; +extern const AVCodec ff_qdraw_decoder; +extern const AVCodec ff_qpeg_decoder; +extern const AVCodec ff_qtrle_encoder; +extern const AVCodec ff_qtrle_decoder; +extern const AVCodec ff_r10k_encoder; +extern const AVCodec ff_r10k_decoder; +extern const AVCodec ff_r210_encoder; +extern const AVCodec ff_r210_decoder; +extern const AVCodec ff_rasc_decoder; +extern const AVCodec ff_rawvideo_encoder; +extern const AVCodec ff_rawvideo_decoder; +extern const AVCodec ff_rl2_decoder; +extern const AVCodec ff_roq_encoder; +extern const AVCodec ff_roq_decoder; +extern const AVCodec ff_rpza_encoder; +extern const AVCodec ff_rpza_decoder; +extern const AVCodec ff_rscc_decoder; +extern const AVCodec ff_rv10_encoder; +extern const AVCodec ff_rv10_decoder; +extern const AVCodec ff_rv20_encoder; +extern const AVCodec ff_rv20_decoder; +extern const AVCodec ff_rv30_decoder; +extern const AVCodec ff_rv40_decoder; +extern const AVCodec ff_s302m_encoder; +extern const AVCodec ff_s302m_decoder; +extern const AVCodec ff_sanm_decoder; +extern const AVCodec ff_scpr_decoder; +extern const AVCodec ff_screenpresso_decoder; +extern const AVCodec ff_sga_decoder; +extern const AVCodec ff_sgi_encoder; +extern const AVCodec ff_sgi_decoder; +extern const AVCodec ff_sgirle_decoder; +extern const AVCodec ff_sheervideo_decoder; +extern const AVCodec ff_simbiosis_imx_decoder; +extern const AVCodec ff_smacker_decoder; +extern const AVCodec ff_smc_decoder; +extern const AVCodec ff_smvjpeg_decoder; +extern const AVCodec ff_snow_encoder; +extern const AVCodec ff_snow_decoder; +extern const AVCodec ff_sp5x_decoder; +extern const AVCodec ff_speedhq_decoder; +extern const AVCodec ff_speedhq_encoder; +extern const AVCodec ff_srgc_decoder; +extern const AVCodec ff_sunrast_encoder; +extern const AVCodec ff_sunrast_decoder; +extern const AVCodec ff_svq1_encoder; +extern const AVCodec ff_svq1_decoder; +extern const AVCodec ff_svq3_decoder; +extern const AVCodec ff_targa_encoder; +extern const AVCodec ff_targa_decoder; +extern const AVCodec ff_targa_y216_decoder; +extern const AVCodec ff_tdsc_decoder; +extern const AVCodec ff_theora_decoder; +extern const AVCodec ff_thp_decoder; +extern const AVCodec ff_tiertexseqvideo_decoder; +extern const AVCodec ff_tiff_encoder; +extern const AVCodec ff_tiff_decoder; +extern const AVCodec ff_tmv_decoder; +extern const AVCodec ff_truemotion1_decoder; +extern const AVCodec ff_truemotion2_decoder; +extern const AVCodec ff_truemotion2rt_decoder; +extern const AVCodec ff_tscc_decoder; +extern const AVCodec ff_tscc2_decoder; +extern const AVCodec ff_txd_decoder; +extern const AVCodec ff_ulti_decoder; +extern const AVCodec ff_utvideo_encoder; +extern const AVCodec ff_utvideo_decoder; +extern const AVCodec ff_v210_encoder; +extern const AVCodec ff_v210_decoder; +extern const AVCodec ff_v210x_decoder; +extern const AVCodec ff_v308_encoder; +extern const AVCodec ff_v308_decoder; +extern const AVCodec ff_v408_encoder; +extern const AVCodec ff_v408_decoder; +extern const AVCodec ff_v410_encoder; +extern const AVCodec ff_v410_decoder; +extern const AVCodec ff_vb_decoder; +extern const AVCodec ff_vble_decoder; +extern const AVCodec ff_vc1_decoder; +extern const AVCodec ff_vc1_crystalhd_decoder; +extern const AVCodec ff_vc1image_decoder; +extern const AVCodec ff_vc1_mmal_decoder; +extern const AVCodec ff_vc1_qsv_decoder; +extern const AVCodec ff_vc1_v4l2m2m_decoder; +extern const AVCodec ff_vc2_encoder; +extern const AVCodec ff_vcr1_decoder; +extern const AVCodec ff_vmdvideo_decoder; +extern const AVCodec ff_vmnc_decoder; +extern const AVCodec ff_vp3_decoder; +extern const AVCodec ff_vp4_decoder; +extern const AVCodec ff_vp5_decoder; +extern const AVCodec ff_vp6_decoder; +extern const AVCodec ff_vp6a_decoder; +extern const AVCodec ff_vp6f_decoder; +extern const AVCodec ff_vp7_decoder; +extern const AVCodec ff_vp8_decoder; +extern const AVCodec ff_vp8_rkmpp_decoder; +extern const AVCodec ff_vp8_v4l2m2m_decoder; +extern const AVCodec ff_vp9_decoder; +extern const AVCodec ff_vp9_rkmpp_decoder; +extern const AVCodec ff_vp9_v4l2m2m_decoder; +extern const AVCodec ff_vqa_decoder; +extern const AVCodec ff_webp_decoder; +extern const AVCodec ff_wcmv_decoder; +extern const AVCodec ff_wrapped_avframe_encoder; +extern const AVCodec ff_wrapped_avframe_decoder; +extern const AVCodec ff_wmv1_encoder; +extern const AVCodec ff_wmv1_decoder; +extern const AVCodec ff_wmv2_encoder; +extern const AVCodec ff_wmv2_decoder; +extern const AVCodec ff_wmv3_decoder; +extern const AVCodec ff_wmv3_crystalhd_decoder; +extern const AVCodec ff_wmv3image_decoder; +extern const AVCodec ff_wnv1_decoder; +extern const AVCodec ff_xan_wc3_decoder; +extern const AVCodec ff_xan_wc4_decoder; +extern const AVCodec ff_xbm_encoder; +extern const AVCodec ff_xbm_decoder; +extern const AVCodec ff_xface_encoder; +extern const AVCodec ff_xface_decoder; +extern const AVCodec ff_xl_decoder; +extern const AVCodec ff_xpm_decoder; +extern const AVCodec ff_xwd_encoder; +extern const AVCodec ff_xwd_decoder; +extern const AVCodec ff_y41p_encoder; +extern const AVCodec ff_y41p_decoder; +extern const AVCodec ff_ylc_decoder; +extern const AVCodec ff_yop_decoder; +extern const AVCodec ff_yuv4_encoder; +extern const AVCodec ff_yuv4_decoder; +extern const AVCodec ff_zero12v_decoder; +extern const AVCodec ff_zerocodec_decoder; +extern const AVCodec ff_zlib_encoder; +extern const AVCodec ff_zlib_decoder; +extern const AVCodec ff_zmbv_encoder; +extern const AVCodec ff_zmbv_decoder; /* audio codecs */ -extern AVCodec ff_aac_encoder; -extern AVCodec ff_aac_decoder; -extern AVCodec ff_aac_fixed_decoder; -extern AVCodec ff_aac_latm_decoder; -extern AVCodec ff_ac3_encoder; -extern AVCodec ff_ac3_decoder; -extern AVCodec ff_ac3_fixed_encoder; -extern AVCodec ff_ac3_fixed_decoder; -extern AVCodec ff_acelp_kelvin_decoder; -extern AVCodec ff_alac_encoder; -extern AVCodec ff_alac_decoder; -extern AVCodec ff_als_decoder; -extern AVCodec ff_amrnb_decoder; -extern AVCodec ff_amrwb_decoder; -extern AVCodec ff_ape_decoder; -extern AVCodec ff_aptx_encoder; -extern AVCodec ff_aptx_decoder; -extern AVCodec ff_aptx_hd_encoder; -extern AVCodec ff_aptx_hd_decoder; -extern AVCodec ff_atrac1_decoder; -extern AVCodec ff_atrac3_decoder; -extern AVCodec ff_atrac3al_decoder; -extern AVCodec ff_atrac3p_decoder; -extern AVCodec ff_atrac3pal_decoder; -extern AVCodec ff_atrac9_decoder; -extern AVCodec ff_binkaudio_dct_decoder; -extern AVCodec ff_binkaudio_rdft_decoder; -extern AVCodec ff_bmv_audio_decoder; -extern AVCodec ff_cook_decoder; -extern AVCodec ff_dca_encoder; -extern AVCodec ff_dca_decoder; -extern AVCodec ff_dolby_e_decoder; -extern AVCodec ff_dsd_lsbf_decoder; -extern AVCodec ff_dsd_msbf_decoder; -extern AVCodec ff_dsd_lsbf_planar_decoder; -extern AVCodec ff_dsd_msbf_planar_decoder; -extern AVCodec ff_dsicinaudio_decoder; -extern AVCodec ff_dss_sp_decoder; -extern AVCodec ff_dst_decoder; -extern AVCodec ff_eac3_encoder; -extern AVCodec ff_eac3_decoder; -extern AVCodec ff_evrc_decoder; -extern AVCodec ff_fastaudio_decoder; -extern AVCodec ff_ffwavesynth_decoder; -extern AVCodec ff_flac_encoder; -extern AVCodec ff_flac_decoder; -extern AVCodec ff_g723_1_encoder; -extern AVCodec ff_g723_1_decoder; -extern AVCodec ff_g729_decoder; -extern AVCodec ff_gsm_decoder; -extern AVCodec ff_gsm_ms_decoder; -extern AVCodec ff_hca_decoder; -extern AVCodec ff_hcom_decoder; -extern AVCodec ff_iac_decoder; -extern AVCodec ff_ilbc_decoder; -extern AVCodec ff_imc_decoder; -extern AVCodec ff_interplay_acm_decoder; -extern AVCodec ff_mace3_decoder; -extern AVCodec ff_mace6_decoder; -extern AVCodec ff_metasound_decoder; -extern AVCodec ff_mlp_encoder; -extern AVCodec ff_mlp_decoder; -extern AVCodec ff_mp1_decoder; -extern AVCodec ff_mp1float_decoder; -extern AVCodec ff_mp2_encoder; -extern AVCodec ff_mp2_decoder; -extern AVCodec ff_mp2float_decoder; -extern AVCodec ff_mp2fixed_encoder; -extern AVCodec ff_mp3float_decoder; -extern AVCodec ff_mp3_decoder; -extern AVCodec ff_mp3adufloat_decoder; -extern AVCodec ff_mp3adu_decoder; -extern AVCodec ff_mp3on4float_decoder; -extern AVCodec ff_mp3on4_decoder; -extern AVCodec ff_mpc7_decoder; -extern AVCodec ff_mpc8_decoder; -extern AVCodec ff_nellymoser_encoder; -extern AVCodec ff_nellymoser_decoder; -extern AVCodec ff_on2avc_decoder; -extern AVCodec ff_opus_encoder; -extern AVCodec ff_opus_decoder; -extern AVCodec ff_paf_audio_decoder; -extern AVCodec ff_qcelp_decoder; -extern AVCodec ff_qdm2_decoder; -extern AVCodec ff_qdmc_decoder; -extern AVCodec ff_ra_144_encoder; -extern AVCodec ff_ra_144_decoder; -extern AVCodec ff_ra_288_decoder; -extern AVCodec ff_ralf_decoder; -extern AVCodec ff_sbc_encoder; -extern AVCodec ff_sbc_decoder; -extern AVCodec ff_shorten_decoder; -extern AVCodec ff_sipr_decoder; -extern AVCodec ff_siren_decoder; -extern AVCodec ff_smackaud_decoder; -extern AVCodec ff_sonic_encoder; -extern AVCodec ff_sonic_decoder; -extern AVCodec ff_sonic_ls_encoder; -extern AVCodec ff_tak_decoder; -extern AVCodec ff_truehd_encoder; -extern AVCodec ff_truehd_decoder; -extern AVCodec ff_truespeech_decoder; -extern AVCodec ff_tta_encoder; -extern AVCodec ff_tta_decoder; -extern AVCodec ff_twinvq_decoder; -extern AVCodec ff_vmdaudio_decoder; -extern AVCodec ff_vorbis_encoder; -extern AVCodec ff_vorbis_decoder; -extern AVCodec ff_wavpack_encoder; -extern AVCodec ff_wavpack_decoder; -extern AVCodec ff_wmalossless_decoder; -extern AVCodec ff_wmapro_decoder; -extern AVCodec ff_wmav1_encoder; -extern AVCodec ff_wmav1_decoder; -extern AVCodec ff_wmav2_encoder; -extern AVCodec ff_wmav2_decoder; -extern AVCodec ff_wmavoice_decoder; -extern AVCodec ff_ws_snd1_decoder; -extern AVCodec ff_xma1_decoder; -extern AVCodec ff_xma2_decoder; +extern const AVCodec ff_aac_encoder; +extern const AVCodec ff_aac_decoder; +extern const AVCodec ff_aac_fixed_decoder; +extern const AVCodec ff_aac_latm_decoder; +extern const AVCodec ff_ac3_encoder; +extern const AVCodec ff_ac3_decoder; +extern const AVCodec ff_ac3_fixed_encoder; +extern const AVCodec ff_ac3_fixed_decoder; +extern const AVCodec ff_acelp_kelvin_decoder; +extern const AVCodec ff_alac_encoder; +extern const AVCodec ff_alac_decoder; +extern const AVCodec ff_als_decoder; +extern const AVCodec ff_amrnb_decoder; +extern const AVCodec ff_amrwb_decoder; +extern const AVCodec ff_ape_decoder; +extern const AVCodec ff_aptx_encoder; +extern const AVCodec ff_aptx_decoder; +extern const AVCodec ff_aptx_hd_encoder; +extern const AVCodec ff_aptx_hd_decoder; +extern const AVCodec ff_atrac1_decoder; +extern const AVCodec ff_atrac3_decoder; +extern const AVCodec ff_atrac3al_decoder; +extern const AVCodec ff_atrac3p_decoder; +extern const AVCodec ff_atrac3pal_decoder; +extern const AVCodec ff_atrac9_decoder; +extern const AVCodec ff_binkaudio_dct_decoder; +extern const AVCodec ff_binkaudio_rdft_decoder; +extern const AVCodec ff_bmv_audio_decoder; +extern const AVCodec ff_cook_decoder; +extern const AVCodec ff_dca_encoder; +extern const AVCodec ff_dca_decoder; +extern const AVCodec ff_dolby_e_decoder; +extern const AVCodec ff_dsd_lsbf_decoder; +extern const AVCodec ff_dsd_msbf_decoder; +extern const AVCodec ff_dsd_lsbf_planar_decoder; +extern const AVCodec ff_dsd_msbf_planar_decoder; +extern const AVCodec ff_dsicinaudio_decoder; +extern const AVCodec ff_dss_sp_decoder; +extern const AVCodec ff_dst_decoder; +extern const AVCodec ff_eac3_encoder; +extern const AVCodec ff_eac3_decoder; +extern const AVCodec ff_evrc_decoder; +extern const AVCodec ff_fastaudio_decoder; +extern const AVCodec ff_ffwavesynth_decoder; +extern const AVCodec ff_flac_encoder; +extern const AVCodec ff_flac_decoder; +extern const AVCodec ff_g723_1_encoder; +extern const AVCodec ff_g723_1_decoder; +extern const AVCodec ff_g729_decoder; +extern const AVCodec ff_gsm_decoder; +extern const AVCodec ff_gsm_ms_decoder; +extern const AVCodec ff_hca_decoder; +extern const AVCodec ff_hcom_decoder; +extern const AVCodec ff_iac_decoder; +extern const AVCodec ff_ilbc_decoder; +extern const AVCodec ff_imc_decoder; +extern const AVCodec ff_interplay_acm_decoder; +extern const AVCodec ff_mace3_decoder; +extern const AVCodec ff_mace6_decoder; +extern const AVCodec ff_metasound_decoder; +extern const AVCodec ff_mlp_encoder; +extern const AVCodec ff_mlp_decoder; +extern const AVCodec ff_mp1_decoder; +extern const AVCodec ff_mp1float_decoder; +extern const AVCodec ff_mp2_encoder; +extern const AVCodec ff_mp2_decoder; +extern const AVCodec ff_mp2float_decoder; +extern const AVCodec ff_mp2fixed_encoder; +extern const AVCodec ff_mp3float_decoder; +extern const AVCodec ff_mp3_decoder; +extern const AVCodec ff_mp3adufloat_decoder; +extern const AVCodec ff_mp3adu_decoder; +extern const AVCodec ff_mp3on4float_decoder; +extern const AVCodec ff_mp3on4_decoder; +extern const AVCodec ff_mpc7_decoder; +extern const AVCodec ff_mpc8_decoder; +extern const AVCodec ff_nellymoser_encoder; +extern const AVCodec ff_nellymoser_decoder; +extern const AVCodec ff_on2avc_decoder; +extern const AVCodec ff_opus_encoder; +extern const AVCodec ff_opus_decoder; +extern const AVCodec ff_paf_audio_decoder; +extern const AVCodec ff_qcelp_decoder; +extern const AVCodec ff_qdm2_decoder; +extern const AVCodec ff_qdmc_decoder; +extern const AVCodec ff_ra_144_encoder; +extern const AVCodec ff_ra_144_decoder; +extern const AVCodec ff_ra_288_decoder; +extern const AVCodec ff_ralf_decoder; +extern const AVCodec ff_sbc_encoder; +extern const AVCodec ff_sbc_decoder; +extern const AVCodec ff_shorten_decoder; +extern const AVCodec ff_sipr_decoder; +extern const AVCodec ff_siren_decoder; +extern const AVCodec ff_smackaud_decoder; +extern const AVCodec ff_sonic_encoder; +extern const AVCodec ff_sonic_decoder; +extern const AVCodec ff_sonic_ls_encoder; +extern const AVCodec ff_tak_decoder; +extern const AVCodec ff_truehd_encoder; +extern const AVCodec ff_truehd_decoder; +extern const AVCodec ff_truespeech_decoder; +extern const AVCodec ff_tta_encoder; +extern const AVCodec ff_tta_decoder; +extern const AVCodec ff_twinvq_decoder; +extern const AVCodec ff_vmdaudio_decoder; +extern const AVCodec ff_vorbis_encoder; +extern const AVCodec ff_vorbis_decoder; +extern const AVCodec ff_wavpack_encoder; +extern const AVCodec ff_wavpack_decoder; +extern const AVCodec ff_wmalossless_decoder; +extern const AVCodec ff_wmapro_decoder; +extern const AVCodec ff_wmav1_encoder; +extern const AVCodec ff_wmav1_decoder; +extern const AVCodec ff_wmav2_encoder; +extern const AVCodec ff_wmav2_decoder; +extern const AVCodec ff_wmavoice_decoder; +extern const AVCodec ff_ws_snd1_decoder; +extern const AVCodec ff_xma1_decoder; +extern const AVCodec ff_xma2_decoder; /* PCM codecs */ -extern AVCodec ff_pcm_alaw_encoder; -extern AVCodec ff_pcm_alaw_decoder; -extern AVCodec ff_pcm_bluray_decoder; -extern AVCodec ff_pcm_dvd_encoder; -extern AVCodec ff_pcm_dvd_decoder; -extern AVCodec ff_pcm_f16le_decoder; -extern AVCodec ff_pcm_f24le_decoder; -extern AVCodec ff_pcm_f32be_encoder; -extern AVCodec ff_pcm_f32be_decoder; -extern AVCodec ff_pcm_f32le_encoder; -extern AVCodec ff_pcm_f32le_decoder; -extern AVCodec ff_pcm_f64be_encoder; -extern AVCodec ff_pcm_f64be_decoder; -extern AVCodec ff_pcm_f64le_encoder; -extern AVCodec ff_pcm_f64le_decoder; -extern AVCodec ff_pcm_lxf_decoder; -extern AVCodec ff_pcm_mulaw_encoder; -extern AVCodec ff_pcm_mulaw_decoder; -extern AVCodec ff_pcm_s8_encoder; -extern AVCodec ff_pcm_s8_decoder; -extern AVCodec ff_pcm_s8_planar_encoder; -extern AVCodec ff_pcm_s8_planar_decoder; -extern AVCodec ff_pcm_s16be_encoder; -extern AVCodec ff_pcm_s16be_decoder; -extern AVCodec ff_pcm_s16be_planar_encoder; -extern AVCodec ff_pcm_s16be_planar_decoder; -extern AVCodec ff_pcm_s16le_encoder; -extern AVCodec ff_pcm_s16le_decoder; -extern AVCodec ff_pcm_s16le_planar_encoder; -extern AVCodec ff_pcm_s16le_planar_decoder; -extern AVCodec ff_pcm_s24be_encoder; -extern AVCodec ff_pcm_s24be_decoder; -extern AVCodec ff_pcm_s24daud_encoder; -extern AVCodec ff_pcm_s24daud_decoder; -extern AVCodec ff_pcm_s24le_encoder; -extern AVCodec ff_pcm_s24le_decoder; -extern AVCodec ff_pcm_s24le_planar_encoder; -extern AVCodec ff_pcm_s24le_planar_decoder; -extern AVCodec ff_pcm_s32be_encoder; -extern AVCodec ff_pcm_s32be_decoder; -extern AVCodec ff_pcm_s32le_encoder; -extern AVCodec ff_pcm_s32le_decoder; -extern AVCodec ff_pcm_s32le_planar_encoder; -extern AVCodec ff_pcm_s32le_planar_decoder; -extern AVCodec ff_pcm_s64be_encoder; -extern AVCodec ff_pcm_s64be_decoder; -extern AVCodec ff_pcm_s64le_encoder; -extern AVCodec ff_pcm_s64le_decoder; -extern AVCodec ff_pcm_sga_decoder; -extern AVCodec ff_pcm_u8_encoder; -extern AVCodec ff_pcm_u8_decoder; -extern AVCodec ff_pcm_u16be_encoder; -extern AVCodec ff_pcm_u16be_decoder; -extern AVCodec ff_pcm_u16le_encoder; -extern AVCodec ff_pcm_u16le_decoder; -extern AVCodec ff_pcm_u24be_encoder; -extern AVCodec ff_pcm_u24be_decoder; -extern AVCodec ff_pcm_u24le_encoder; -extern AVCodec ff_pcm_u24le_decoder; -extern AVCodec ff_pcm_u32be_encoder; -extern AVCodec ff_pcm_u32be_decoder; -extern AVCodec ff_pcm_u32le_encoder; -extern AVCodec ff_pcm_u32le_decoder; -extern AVCodec ff_pcm_vidc_encoder; -extern AVCodec ff_pcm_vidc_decoder; +extern const AVCodec ff_pcm_alaw_encoder; +extern const AVCodec ff_pcm_alaw_decoder; +extern const AVCodec ff_pcm_bluray_decoder; +extern const AVCodec ff_pcm_dvd_encoder; +extern const AVCodec ff_pcm_dvd_decoder; +extern const AVCodec ff_pcm_f16le_decoder; +extern const AVCodec ff_pcm_f24le_decoder; +extern const AVCodec ff_pcm_f32be_encoder; +extern const AVCodec ff_pcm_f32be_decoder; +extern const AVCodec ff_pcm_f32le_encoder; +extern const AVCodec ff_pcm_f32le_decoder; +extern const AVCodec ff_pcm_f64be_encoder; +extern const AVCodec ff_pcm_f64be_decoder; +extern const AVCodec ff_pcm_f64le_encoder; +extern const AVCodec ff_pcm_f64le_decoder; +extern const AVCodec ff_pcm_lxf_decoder; +extern const AVCodec ff_pcm_mulaw_encoder; +extern const AVCodec ff_pcm_mulaw_decoder; +extern const AVCodec ff_pcm_s8_encoder; +extern const AVCodec ff_pcm_s8_decoder; +extern const AVCodec ff_pcm_s8_planar_encoder; +extern const AVCodec ff_pcm_s8_planar_decoder; +extern const AVCodec ff_pcm_s16be_encoder; +extern const AVCodec ff_pcm_s16be_decoder; +extern const AVCodec ff_pcm_s16be_planar_encoder; +extern const AVCodec ff_pcm_s16be_planar_decoder; +extern const AVCodec ff_pcm_s16le_encoder; +extern const AVCodec ff_pcm_s16le_decoder; +extern const AVCodec ff_pcm_s16le_planar_encoder; +extern const AVCodec ff_pcm_s16le_planar_decoder; +extern const AVCodec ff_pcm_s24be_encoder; +extern const AVCodec ff_pcm_s24be_decoder; +extern const AVCodec ff_pcm_s24daud_encoder; +extern const AVCodec ff_pcm_s24daud_decoder; +extern const AVCodec ff_pcm_s24le_encoder; +extern const AVCodec ff_pcm_s24le_decoder; +extern const AVCodec ff_pcm_s24le_planar_encoder; +extern const AVCodec ff_pcm_s24le_planar_decoder; +extern const AVCodec ff_pcm_s32be_encoder; +extern const AVCodec ff_pcm_s32be_decoder; +extern const AVCodec ff_pcm_s32le_encoder; +extern const AVCodec ff_pcm_s32le_decoder; +extern const AVCodec ff_pcm_s32le_planar_encoder; +extern const AVCodec ff_pcm_s32le_planar_decoder; +extern const AVCodec ff_pcm_s64be_encoder; +extern const AVCodec ff_pcm_s64be_decoder; +extern const AVCodec ff_pcm_s64le_encoder; +extern const AVCodec ff_pcm_s64le_decoder; +extern const AVCodec ff_pcm_sga_decoder; +extern const AVCodec ff_pcm_u8_encoder; +extern const AVCodec ff_pcm_u8_decoder; +extern const AVCodec ff_pcm_u16be_encoder; +extern const AVCodec ff_pcm_u16be_decoder; +extern const AVCodec ff_pcm_u16le_encoder; +extern const AVCodec ff_pcm_u16le_decoder; +extern const AVCodec ff_pcm_u24be_encoder; +extern const AVCodec ff_pcm_u24be_decoder; +extern const AVCodec ff_pcm_u24le_encoder; +extern const AVCodec ff_pcm_u24le_decoder; +extern const AVCodec ff_pcm_u32be_encoder; +extern const AVCodec ff_pcm_u32be_decoder; +extern const AVCodec ff_pcm_u32le_encoder; +extern const AVCodec ff_pcm_u32le_decoder; +extern const AVCodec ff_pcm_vidc_encoder; +extern const AVCodec ff_pcm_vidc_decoder; /* DPCM codecs */ -extern AVCodec ff_derf_dpcm_decoder; -extern AVCodec ff_gremlin_dpcm_decoder; -extern AVCodec ff_interplay_dpcm_decoder; -extern AVCodec ff_roq_dpcm_encoder; -extern AVCodec ff_roq_dpcm_decoder; -extern AVCodec ff_sdx2_dpcm_decoder; -extern AVCodec ff_sol_dpcm_decoder; -extern AVCodec ff_xan_dpcm_decoder; +extern const AVCodec ff_derf_dpcm_decoder; +extern const AVCodec ff_gremlin_dpcm_decoder; +extern const AVCodec ff_interplay_dpcm_decoder; +extern const AVCodec ff_roq_dpcm_encoder; +extern const AVCodec ff_roq_dpcm_decoder; +extern const AVCodec ff_sdx2_dpcm_decoder; +extern const AVCodec ff_sol_dpcm_decoder; +extern const AVCodec ff_xan_dpcm_decoder; /* ADPCM codecs */ -extern AVCodec ff_adpcm_4xm_decoder; -extern AVCodec ff_adpcm_adx_encoder; -extern AVCodec ff_adpcm_adx_decoder; -extern AVCodec ff_adpcm_afc_decoder; -extern AVCodec ff_adpcm_agm_decoder; -extern AVCodec ff_adpcm_aica_decoder; -extern AVCodec ff_adpcm_argo_decoder; -extern AVCodec ff_adpcm_argo_encoder; -extern AVCodec ff_adpcm_ct_decoder; -extern AVCodec ff_adpcm_dtk_decoder; -extern AVCodec ff_adpcm_ea_decoder; -extern AVCodec ff_adpcm_ea_maxis_xa_decoder; -extern AVCodec ff_adpcm_ea_r1_decoder; -extern AVCodec ff_adpcm_ea_r2_decoder; -extern AVCodec ff_adpcm_ea_r3_decoder; -extern AVCodec ff_adpcm_ea_xas_decoder; -extern AVCodec ff_adpcm_g722_encoder; -extern AVCodec ff_adpcm_g722_decoder; -extern AVCodec ff_adpcm_g726_encoder; -extern AVCodec ff_adpcm_g726_decoder; -extern AVCodec ff_adpcm_g726le_encoder; -extern AVCodec ff_adpcm_g726le_decoder; -extern AVCodec ff_adpcm_ima_amv_decoder; -extern AVCodec ff_adpcm_ima_amv_encoder; -extern AVCodec ff_adpcm_ima_alp_decoder; -extern AVCodec ff_adpcm_ima_alp_encoder; -extern AVCodec ff_adpcm_ima_apc_decoder; -extern AVCodec ff_adpcm_ima_apm_decoder; -extern AVCodec ff_adpcm_ima_apm_encoder; -extern AVCodec ff_adpcm_ima_cunning_decoder; -extern AVCodec ff_adpcm_ima_dat4_decoder; -extern AVCodec ff_adpcm_ima_dk3_decoder; -extern AVCodec ff_adpcm_ima_dk4_decoder; -extern AVCodec ff_adpcm_ima_ea_eacs_decoder; -extern AVCodec ff_adpcm_ima_ea_sead_decoder; -extern AVCodec ff_adpcm_ima_iss_decoder; -extern AVCodec ff_adpcm_ima_moflex_decoder; -extern AVCodec ff_adpcm_ima_mtf_decoder; -extern AVCodec ff_adpcm_ima_oki_decoder; -extern AVCodec ff_adpcm_ima_qt_encoder; -extern AVCodec ff_adpcm_ima_qt_decoder; -extern AVCodec ff_adpcm_ima_rad_decoder; -extern AVCodec ff_adpcm_ima_ssi_decoder; -extern AVCodec ff_adpcm_ima_ssi_encoder; -extern AVCodec ff_adpcm_ima_smjpeg_decoder; -extern AVCodec ff_adpcm_ima_wav_encoder; -extern AVCodec ff_adpcm_ima_wav_decoder; -extern AVCodec ff_adpcm_ima_ws_decoder; -extern AVCodec ff_adpcm_ms_encoder; -extern AVCodec ff_adpcm_ms_decoder; -extern AVCodec ff_adpcm_mtaf_decoder; -extern AVCodec ff_adpcm_psx_decoder; -extern AVCodec ff_adpcm_sbpro_2_decoder; -extern AVCodec ff_adpcm_sbpro_3_decoder; -extern AVCodec ff_adpcm_sbpro_4_decoder; -extern AVCodec ff_adpcm_swf_encoder; -extern AVCodec ff_adpcm_swf_decoder; -extern AVCodec ff_adpcm_thp_decoder; -extern AVCodec ff_adpcm_thp_le_decoder; -extern AVCodec ff_adpcm_vima_decoder; -extern AVCodec ff_adpcm_xa_decoder; -extern AVCodec ff_adpcm_yamaha_encoder; -extern AVCodec ff_adpcm_yamaha_decoder; -extern AVCodec ff_adpcm_zork_decoder; +extern const AVCodec ff_adpcm_4xm_decoder; +extern const AVCodec ff_adpcm_adx_encoder; +extern const AVCodec ff_adpcm_adx_decoder; +extern const AVCodec ff_adpcm_afc_decoder; +extern const AVCodec ff_adpcm_agm_decoder; +extern const AVCodec ff_adpcm_aica_decoder; +extern const AVCodec ff_adpcm_argo_decoder; +extern const AVCodec ff_adpcm_argo_encoder; +extern const AVCodec ff_adpcm_ct_decoder; +extern const AVCodec ff_adpcm_dtk_decoder; +extern const AVCodec ff_adpcm_ea_decoder; +extern const AVCodec ff_adpcm_ea_maxis_xa_decoder; +extern const AVCodec ff_adpcm_ea_r1_decoder; +extern const AVCodec ff_adpcm_ea_r2_decoder; +extern const AVCodec ff_adpcm_ea_r3_decoder; +extern const AVCodec ff_adpcm_ea_xas_decoder; +extern const AVCodec ff_adpcm_g722_encoder; +extern const AVCodec ff_adpcm_g722_decoder; +extern const AVCodec ff_adpcm_g726_encoder; +extern const AVCodec ff_adpcm_g726_decoder; +extern const AVCodec ff_adpcm_g726le_encoder; +extern const AVCodec ff_adpcm_g726le_decoder; +extern const AVCodec ff_adpcm_ima_amv_decoder; +extern const AVCodec ff_adpcm_ima_amv_encoder; +extern const AVCodec ff_adpcm_ima_alp_decoder; +extern const AVCodec ff_adpcm_ima_alp_encoder; +extern const AVCodec ff_adpcm_ima_apc_decoder; +extern const AVCodec ff_adpcm_ima_apm_decoder; +extern const AVCodec ff_adpcm_ima_apm_encoder; +extern const AVCodec ff_adpcm_ima_cunning_decoder; +extern const AVCodec ff_adpcm_ima_dat4_decoder; +extern const AVCodec ff_adpcm_ima_dk3_decoder; +extern const AVCodec ff_adpcm_ima_dk4_decoder; +extern const AVCodec ff_adpcm_ima_ea_eacs_decoder; +extern const AVCodec ff_adpcm_ima_ea_sead_decoder; +extern const AVCodec ff_adpcm_ima_iss_decoder; +extern const AVCodec ff_adpcm_ima_moflex_decoder; +extern const AVCodec ff_adpcm_ima_mtf_decoder; +extern const AVCodec ff_adpcm_ima_oki_decoder; +extern const AVCodec ff_adpcm_ima_qt_encoder; +extern const AVCodec ff_adpcm_ima_qt_decoder; +extern const AVCodec ff_adpcm_ima_rad_decoder; +extern const AVCodec ff_adpcm_ima_ssi_decoder; +extern const AVCodec ff_adpcm_ima_ssi_encoder; +extern const AVCodec ff_adpcm_ima_smjpeg_decoder; +extern const AVCodec ff_adpcm_ima_wav_encoder; +extern const AVCodec ff_adpcm_ima_wav_decoder; +extern const AVCodec ff_adpcm_ima_ws_decoder; +extern const AVCodec ff_adpcm_ms_encoder; +extern const AVCodec ff_adpcm_ms_decoder; +extern const AVCodec ff_adpcm_mtaf_decoder; +extern const AVCodec ff_adpcm_psx_decoder; +extern const AVCodec ff_adpcm_sbpro_2_decoder; +extern const AVCodec ff_adpcm_sbpro_3_decoder; +extern const AVCodec ff_adpcm_sbpro_4_decoder; +extern const AVCodec ff_adpcm_swf_encoder; +extern const AVCodec ff_adpcm_swf_decoder; +extern const AVCodec ff_adpcm_thp_decoder; +extern const AVCodec ff_adpcm_thp_le_decoder; +extern const AVCodec ff_adpcm_vima_decoder; +extern const AVCodec ff_adpcm_xa_decoder; +extern const AVCodec ff_adpcm_yamaha_encoder; +extern const AVCodec ff_adpcm_yamaha_decoder; +extern const AVCodec ff_adpcm_zork_decoder; /* subtitles */ -extern AVCodec ff_ssa_encoder; -extern AVCodec ff_ssa_decoder; -extern AVCodec ff_ass_encoder; -extern AVCodec ff_ass_decoder; -extern AVCodec ff_ccaption_decoder; -extern AVCodec ff_dvbsub_encoder; -extern AVCodec ff_dvbsub_decoder; -extern AVCodec ff_dvdsub_encoder; -extern AVCodec ff_dvdsub_decoder; -extern AVCodec ff_jacosub_decoder; -extern AVCodec ff_microdvd_decoder; -extern AVCodec ff_movtext_encoder; -extern AVCodec ff_movtext_decoder; -extern AVCodec ff_mpl2_decoder; -extern AVCodec ff_pgssub_decoder; -extern AVCodec ff_pjs_decoder; -extern AVCodec ff_realtext_decoder; -extern AVCodec ff_sami_decoder; -extern AVCodec ff_srt_encoder; -extern AVCodec ff_srt_decoder; -extern AVCodec ff_stl_decoder; -extern AVCodec ff_subrip_encoder; -extern AVCodec ff_subrip_decoder; -extern AVCodec ff_subviewer_decoder; -extern AVCodec ff_subviewer1_decoder; -extern AVCodec ff_text_encoder; -extern AVCodec ff_text_decoder; -extern AVCodec ff_ttml_encoder; -extern AVCodec ff_vplayer_decoder; -extern AVCodec ff_webvtt_encoder; -extern AVCodec ff_webvtt_decoder; -extern AVCodec ff_xsub_encoder; -extern AVCodec ff_xsub_decoder; +extern const AVCodec ff_ssa_encoder; +extern const AVCodec ff_ssa_decoder; +extern const AVCodec ff_ass_encoder; +extern const AVCodec ff_ass_decoder; +extern const AVCodec ff_ccaption_decoder; +extern const AVCodec ff_dvbsub_encoder; +extern const AVCodec ff_dvbsub_decoder; +extern const AVCodec ff_dvdsub_encoder; +extern const AVCodec ff_dvdsub_decoder; +extern const AVCodec ff_jacosub_decoder; +extern const AVCodec ff_microdvd_decoder; +extern const AVCodec ff_movtext_encoder; +extern const AVCodec ff_movtext_decoder; +extern const AVCodec ff_mpl2_decoder; +extern const AVCodec ff_pgssub_decoder; +extern const AVCodec ff_pjs_decoder; +extern const AVCodec ff_realtext_decoder; +extern const AVCodec ff_sami_decoder; +extern const AVCodec ff_srt_encoder; +extern const AVCodec ff_srt_decoder; +extern const AVCodec ff_stl_decoder; +extern const AVCodec ff_subrip_encoder; +extern const AVCodec ff_subrip_decoder; +extern const AVCodec ff_subviewer_decoder; +extern const AVCodec ff_subviewer1_decoder; +extern const AVCodec ff_text_encoder; +extern const AVCodec ff_text_decoder; +extern const AVCodec ff_ttml_encoder; +extern const AVCodec ff_vplayer_decoder; +extern const AVCodec ff_webvtt_encoder; +extern const AVCodec ff_webvtt_decoder; +extern const AVCodec ff_xsub_encoder; +extern const AVCodec ff_xsub_decoder; /* external libraries */ -extern AVCodec ff_aac_at_encoder; -extern AVCodec ff_aac_at_decoder; -extern AVCodec ff_ac3_at_decoder; -extern AVCodec ff_adpcm_ima_qt_at_decoder; -extern AVCodec ff_alac_at_encoder; -extern AVCodec ff_alac_at_decoder; -extern AVCodec ff_amr_nb_at_decoder; -extern AVCodec ff_eac3_at_decoder; -extern AVCodec ff_gsm_ms_at_decoder; -extern AVCodec ff_ilbc_at_encoder; -extern AVCodec ff_ilbc_at_decoder; -extern AVCodec ff_mp1_at_decoder; -extern AVCodec ff_mp2_at_decoder; -extern AVCodec ff_mp3_at_decoder; -extern AVCodec ff_pcm_alaw_at_encoder; -extern AVCodec ff_pcm_alaw_at_decoder; -extern AVCodec ff_pcm_mulaw_at_encoder; -extern AVCodec ff_pcm_mulaw_at_decoder; -extern AVCodec ff_qdmc_at_decoder; -extern AVCodec ff_qdm2_at_decoder; +extern const AVCodec ff_aac_at_encoder; +extern const AVCodec ff_aac_at_decoder; +extern const AVCodec ff_ac3_at_decoder; +extern const AVCodec ff_adpcm_ima_qt_at_decoder; +extern const AVCodec ff_alac_at_encoder; +extern const AVCodec ff_alac_at_decoder; +extern const AVCodec ff_amr_nb_at_decoder; +extern const AVCodec ff_eac3_at_decoder; +extern const AVCodec ff_gsm_ms_at_decoder; +extern const AVCodec ff_ilbc_at_encoder; +extern const AVCodec ff_ilbc_at_decoder; +extern const AVCodec ff_mp1_at_decoder; +extern const AVCodec ff_mp2_at_decoder; +extern const AVCodec ff_mp3_at_decoder; +extern const AVCodec ff_pcm_alaw_at_encoder; +extern const AVCodec ff_pcm_alaw_at_decoder; +extern const AVCodec ff_pcm_mulaw_at_encoder; +extern const AVCodec ff_pcm_mulaw_at_decoder; +extern const AVCodec ff_qdmc_at_decoder; +extern const AVCodec ff_qdm2_at_decoder; extern AVCodec ff_libaom_av1_encoder; -extern AVCodec ff_libaribb24_decoder; -extern AVCodec ff_libcelt_decoder; -extern AVCodec ff_libcodec2_encoder; -extern AVCodec ff_libcodec2_decoder; -extern AVCodec ff_libdav1d_decoder; -extern AVCodec ff_libdavs2_decoder; -extern AVCodec ff_libfdk_aac_encoder; -extern AVCodec ff_libfdk_aac_decoder; -extern AVCodec ff_libgsm_encoder; -extern AVCodec ff_libgsm_decoder; -extern AVCodec ff_libgsm_ms_encoder; -extern AVCodec ff_libgsm_ms_decoder; -extern AVCodec ff_libilbc_encoder; -extern AVCodec ff_libilbc_decoder; -extern AVCodec ff_libmp3lame_encoder; -extern AVCodec ff_libopencore_amrnb_encoder; -extern AVCodec ff_libopencore_amrnb_decoder; -extern AVCodec ff_libopencore_amrwb_decoder; -extern AVCodec ff_libopenjpeg_encoder; -extern AVCodec ff_libopenjpeg_decoder; -extern AVCodec ff_libopus_encoder; -extern AVCodec ff_libopus_decoder; -extern AVCodec ff_librav1e_encoder; -extern AVCodec ff_librsvg_decoder; -extern AVCodec ff_libshine_encoder; -extern AVCodec ff_libspeex_encoder; -extern AVCodec ff_libspeex_decoder; -extern AVCodec ff_libsvtav1_encoder; -extern AVCodec ff_libtheora_encoder; -extern AVCodec ff_libtwolame_encoder; -extern AVCodec ff_libuavs3d_decoder; -extern AVCodec ff_libvo_amrwbenc_encoder; -extern AVCodec ff_libvorbis_encoder; -extern AVCodec ff_libvorbis_decoder; -extern AVCodec ff_libvpx_vp8_encoder; -extern AVCodec ff_libvpx_vp8_decoder; +extern const AVCodec ff_libaribb24_decoder; +extern const AVCodec ff_libcelt_decoder; +extern const AVCodec ff_libcodec2_encoder; +extern const AVCodec ff_libcodec2_decoder; +extern const AVCodec ff_libdav1d_decoder; +extern const AVCodec ff_libdavs2_decoder; +extern const AVCodec ff_libfdk_aac_encoder; +extern const AVCodec ff_libfdk_aac_decoder; +extern const AVCodec ff_libgsm_encoder; +extern const AVCodec ff_libgsm_decoder; +extern const AVCodec ff_libgsm_ms_encoder; +extern const AVCodec ff_libgsm_ms_decoder; +extern const AVCodec ff_libilbc_encoder; +extern const AVCodec ff_libilbc_decoder; +extern const AVCodec ff_libmp3lame_encoder; +extern const AVCodec ff_libopencore_amrnb_encoder; +extern const AVCodec ff_libopencore_amrnb_decoder; +extern const AVCodec ff_libopencore_amrwb_decoder; +extern const AVCodec ff_libopenjpeg_encoder; +extern const AVCodec ff_libopenjpeg_decoder; +extern const AVCodec ff_libopus_encoder; +extern const AVCodec ff_libopus_decoder; +extern const AVCodec ff_librav1e_encoder; +extern const AVCodec ff_librsvg_decoder; +extern const AVCodec ff_libshine_encoder; +extern const AVCodec ff_libspeex_encoder; +extern const AVCodec ff_libspeex_decoder; +extern const AVCodec ff_libsvtav1_encoder; +extern const AVCodec ff_libtheora_encoder; +extern const AVCodec ff_libtwolame_encoder; +extern const AVCodec ff_libuavs3d_decoder; +extern const AVCodec ff_libvo_amrwbenc_encoder; +extern const AVCodec ff_libvorbis_encoder; +extern const AVCodec ff_libvorbis_decoder; +extern const AVCodec ff_libvpx_vp8_encoder; +extern const AVCodec ff_libvpx_vp8_decoder; extern AVCodec ff_libvpx_vp9_encoder; extern AVCodec ff_libvpx_vp9_decoder; /* preferred over libwebp */ -extern AVCodec ff_libwebp_anim_encoder; -extern AVCodec ff_libwebp_encoder; -extern AVCodec ff_libx262_encoder; +extern const AVCodec ff_libwebp_anim_encoder; +extern const AVCodec ff_libwebp_encoder; +extern const AVCodec ff_libx262_encoder; +#if CONFIG_LIBX264_ENCODER +#include +#if X264_BUILD < 153 extern AVCodec ff_libx264_encoder; -extern AVCodec ff_libx264rgb_encoder; +#else +extern const AVCodec ff_libx264_encoder; +#endif +#endif +extern const AVCodec ff_libx264rgb_encoder; extern AVCodec ff_libx265_encoder; -extern AVCodec ff_libxavs_encoder; -extern AVCodec ff_libxavs2_encoder; -extern AVCodec ff_libxvid_encoder; -extern AVCodec ff_libzvbi_teletext_decoder; +extern const AVCodec ff_libxavs_encoder; +extern const AVCodec ff_libxavs2_encoder; +extern const AVCodec ff_libxvid_encoder; +extern const AVCodec ff_libzvbi_teletext_decoder; /* text */ -extern AVCodec ff_bintext_decoder; -extern AVCodec ff_xbin_decoder; -extern AVCodec ff_idf_decoder; +extern const AVCodec ff_bintext_decoder; +extern const AVCodec ff_xbin_decoder; +extern const AVCodec ff_idf_decoder; /* external libraries, that shouldn't be used by default if one of the * above is available */ -extern AVCodec ff_aac_mf_encoder; -extern AVCodec ff_ac3_mf_encoder; -extern AVCodec ff_h263_v4l2m2m_encoder; -extern AVCodec ff_libaom_av1_decoder; +extern const AVCodec ff_aac_mf_encoder; +extern const AVCodec ff_ac3_mf_encoder; +extern const AVCodec ff_h263_v4l2m2m_encoder; +extern const AVCodec ff_libaom_av1_decoder; /* hwaccel hooks only, so prefer external decoders */ -extern AVCodec ff_av1_decoder; -extern AVCodec ff_av1_cuvid_decoder; -extern AVCodec ff_av1_qsv_decoder; -extern AVCodec ff_libopenh264_encoder; -extern AVCodec ff_libopenh264_decoder; -extern AVCodec ff_h264_amf_encoder; -extern AVCodec ff_h264_cuvid_decoder; -extern AVCodec ff_h264_mf_encoder; -extern AVCodec ff_h264_nvenc_encoder; -extern AVCodec ff_h264_omx_encoder; -extern AVCodec ff_h264_qsv_encoder; -extern AVCodec ff_h264_v4l2m2m_encoder; -extern AVCodec ff_h264_vaapi_encoder; -extern AVCodec ff_h264_videotoolbox_encoder; -extern AVCodec ff_hevc_amf_encoder; -extern AVCodec ff_hevc_cuvid_decoder; -extern AVCodec ff_hevc_mediacodec_decoder; -extern AVCodec ff_hevc_mf_encoder; -extern AVCodec ff_hevc_nvenc_encoder; -extern AVCodec ff_hevc_qsv_encoder; -extern AVCodec ff_hevc_v4l2m2m_encoder; -extern AVCodec ff_hevc_vaapi_encoder; -extern AVCodec ff_hevc_videotoolbox_encoder; -extern AVCodec ff_libkvazaar_encoder; -extern AVCodec ff_mjpeg_cuvid_decoder; -extern AVCodec ff_mjpeg_qsv_encoder; -extern AVCodec ff_mjpeg_qsv_decoder; -extern AVCodec ff_mjpeg_vaapi_encoder; -extern AVCodec ff_mp3_mf_encoder; -extern AVCodec ff_mpeg1_cuvid_decoder; -extern AVCodec ff_mpeg2_cuvid_decoder; -extern AVCodec ff_mpeg2_qsv_encoder; -extern AVCodec ff_mpeg2_vaapi_encoder; -extern AVCodec ff_mpeg4_cuvid_decoder; -extern AVCodec ff_mpeg4_mediacodec_decoder; -extern AVCodec ff_mpeg4_omx_encoder; -extern AVCodec ff_mpeg4_v4l2m2m_encoder; -extern AVCodec ff_vc1_cuvid_decoder; -extern AVCodec ff_vp8_cuvid_decoder; -extern AVCodec ff_vp8_mediacodec_decoder; -extern AVCodec ff_vp8_qsv_decoder; -extern AVCodec ff_vp8_v4l2m2m_encoder; -extern AVCodec ff_vp8_vaapi_encoder; -extern AVCodec ff_vp9_cuvid_decoder; -extern AVCodec ff_vp9_mediacodec_decoder; -extern AVCodec ff_vp9_qsv_decoder; -extern AVCodec ff_vp9_vaapi_encoder; -extern AVCodec ff_vp9_qsv_encoder; +extern const AVCodec ff_av1_decoder; +extern const AVCodec ff_av1_cuvid_decoder; +extern const AVCodec ff_av1_qsv_decoder; +extern const AVCodec ff_libopenh264_encoder; +extern const AVCodec ff_libopenh264_decoder; +extern const AVCodec ff_h264_amf_encoder; +extern const AVCodec ff_h264_cuvid_decoder; +extern const AVCodec ff_h264_mf_encoder; +extern const AVCodec ff_h264_nvenc_encoder; +extern const AVCodec ff_h264_omx_encoder; +extern const AVCodec ff_h264_qsv_encoder; +extern const AVCodec ff_h264_v4l2m2m_encoder; +extern const AVCodec ff_h264_vaapi_encoder; +extern const AVCodec ff_h264_videotoolbox_encoder; +extern const AVCodec ff_hevc_amf_encoder; +extern const AVCodec ff_hevc_cuvid_decoder; +extern const AVCodec ff_hevc_mediacodec_decoder; +extern const AVCodec ff_hevc_mf_encoder; +extern const AVCodec ff_hevc_nvenc_encoder; +extern const AVCodec ff_hevc_qsv_encoder; +extern const AVCodec ff_hevc_v4l2m2m_encoder; +extern const AVCodec ff_hevc_vaapi_encoder; +extern const AVCodec ff_hevc_videotoolbox_encoder; +extern const AVCodec ff_libkvazaar_encoder; +extern const AVCodec ff_mjpeg_cuvid_decoder; +extern const AVCodec ff_mjpeg_qsv_encoder; +extern const AVCodec ff_mjpeg_qsv_decoder; +extern const AVCodec ff_mjpeg_vaapi_encoder; +extern const AVCodec ff_mp3_mf_encoder; +extern const AVCodec ff_mpeg1_cuvid_decoder; +extern const AVCodec ff_mpeg2_cuvid_decoder; +extern const AVCodec ff_mpeg2_qsv_encoder; +extern const AVCodec ff_mpeg2_vaapi_encoder; +extern const AVCodec ff_mpeg4_cuvid_decoder; +extern const AVCodec ff_mpeg4_mediacodec_decoder; +extern const AVCodec ff_mpeg4_omx_encoder; +extern const AVCodec ff_mpeg4_v4l2m2m_encoder; +extern const AVCodec ff_vc1_cuvid_decoder; +extern const AVCodec ff_vp8_cuvid_decoder; +extern const AVCodec ff_vp8_mediacodec_decoder; +extern const AVCodec ff_vp8_qsv_decoder; +extern const AVCodec ff_vp8_v4l2m2m_encoder; +extern const AVCodec ff_vp8_vaapi_encoder; +extern const AVCodec ff_vp9_cuvid_decoder; +extern const AVCodec ff_vp9_mediacodec_decoder; +extern const AVCodec ff_vp9_qsv_decoder; +extern const AVCodec ff_vp9_vaapi_encoder; +extern const AVCodec ff_vp9_qsv_encoder; // The iterate API is not usable with ossfuzz due to the excessive size of binaries created #if CONFIG_OSSFUZZ -AVCodec * codec_list[] = { +const AVCodec * codec_list[] = { NULL, NULL, NULL diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index a8c3433fa8..0aada77450 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -2173,7 +2173,7 @@ static av_cold void flush(AVCodecContext *avctx) } -AVCodec ff_als_decoder = { +const AVCodec ff_als_decoder = { .name = "als", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c index fe30d7f11d..aeca99f7c6 100644 --- a/libavcodec/amfenc_h264.c +++ b/libavcodec/amfenc_h264.c @@ -377,7 +377,7 @@ static const AVClass h264_amf_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h264_amf_encoder = { +const AVCodec ff_h264_amf_encoder = { .name = "h264_amf", .long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c index b5c840e5f3..79541b9b2f 100644 --- a/libavcodec/amfenc_hevc.c +++ b/libavcodec/amfenc_hevc.c @@ -309,7 +309,7 @@ static const AVClass hevc_amf_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_hevc_amf_encoder = { +const AVCodec ff_hevc_amf_encoder = { .name = "hevc_amf", .long_name = NULL_IF_CONFIG_SMALL("AMD AMF HEVC encoder"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c index 8e02d4cb20..e366a09976 100644 --- a/libavcodec/amrnbdec.c +++ b/libavcodec/amrnbdec.c @@ -1080,7 +1080,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, } -AVCodec ff_amrnb_decoder = { +const AVCodec ff_amrnb_decoder = { .name = "amrnb", .long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 070f276904..a6c1d894d7 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1275,7 +1275,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, return expected_fr_size; } -AVCodec ff_amrwb_decoder = { +const AVCodec ff_amrwb_decoder = { .name = "amrwb", .long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/anm.c b/libavcodec/anm.c index 134640ee36..494903235d 100644 --- a/libavcodec/anm.c +++ b/libavcodec/anm.c @@ -189,7 +189,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_anm_decoder = { +const AVCodec ff_anm_decoder = { .name = "anm", .long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c index 3a461eec26..0965f8cd56 100644 --- a/libavcodec/ansi.c +++ b/libavcodec/ansi.c @@ -480,7 +480,7 @@ static const AVCodecDefault ansi_defaults[] = { { NULL }, }; -AVCodec ff_ansi_decoder = { +const AVCodec ff_ansi_decoder = { .name = "ansi", .long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index e0c6b6bb8b..022a6f9398 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1655,7 +1655,7 @@ static const AVClass ape_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_ape_decoder = { +const AVCodec ff_ape_decoder = { .name = "ape", .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/aptxdec.c b/libavcodec/aptxdec.c index 3bbf0104df..e7e5459bbf 100644 --- a/libavcodec/aptxdec.c +++ b/libavcodec/aptxdec.c @@ -170,7 +170,7 @@ static int aptx_decode_frame(AVCodecContext *avctx, void *data, } #if CONFIG_APTX_DECODER -AVCodec ff_aptx_decoder = { +const AVCodec ff_aptx_decoder = { .name = "aptx", .long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"), .type = AVMEDIA_TYPE_AUDIO, @@ -187,7 +187,7 @@ AVCodec ff_aptx_decoder = { #endif #if CONFIG_APTX_HD_DECODER -AVCodec ff_aptx_hd_decoder = { +const AVCodec ff_aptx_hd_decoder = { .name = "aptx_hd", .long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/aptxenc.c b/libavcodec/aptxenc.c index 60de73ec28..f432a123d0 100644 --- a/libavcodec/aptxenc.c +++ b/libavcodec/aptxenc.c @@ -240,7 +240,7 @@ static av_cold int aptx_close(AVCodecContext *avctx) } #if CONFIG_APTX_ENCODER -AVCodec ff_aptx_encoder = { +const AVCodec ff_aptx_encoder = { .name = "aptx", .long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"), .type = AVMEDIA_TYPE_AUDIO, @@ -259,7 +259,7 @@ AVCodec ff_aptx_encoder = { #endif #if CONFIG_APTX_HD_ENCODER -AVCodec ff_aptx_hd_encoder = { +const AVCodec ff_aptx_hd_encoder = { .name = "aptx_hd", .long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/arbc.c b/libavcodec/arbc.c index 06970f140b..c4fc30e047 100644 --- a/libavcodec/arbc.c +++ b/libavcodec/arbc.c @@ -212,7 +212,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_arbc_decoder = { +const AVCodec ff_arbc_decoder = { .name = "arbc", .long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/argo.c b/libavcodec/argo.c index 7358d102e3..0df66f1cee 100644 --- a/libavcodec/argo.c +++ b/libavcodec/argo.c @@ -725,7 +725,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_argo_decoder = { +const AVCodec ff_argo_decoder = { .name = "argo", .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c index f0b1069cd2..3b1a119496 100644 --- a/libavcodec/assdec.c +++ b/libavcodec/assdec.c @@ -62,7 +62,7 @@ static int ass_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, } #if CONFIG_SSA_DECODER -AVCodec ff_ssa_decoder = { +const AVCodec ff_ssa_decoder = { .name = "ssa", .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, @@ -73,7 +73,7 @@ AVCodec ff_ssa_decoder = { #endif #if CONFIG_ASS_DECODER -AVCodec ff_ass_decoder = { +const AVCodec ff_ass_decoder = { .name = "ass", .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/assenc.c b/libavcodec/assenc.c index 3decf670d7..c8fcf45bed 100644 --- a/libavcodec/assenc.c +++ b/libavcodec/assenc.c @@ -66,7 +66,7 @@ static int ass_encode_frame(AVCodecContext *avctx, } #if CONFIG_SSA_ENCODER -AVCodec ff_ssa_encoder = { +const AVCodec ff_ssa_encoder = { .name = "ssa", .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, @@ -77,7 +77,7 @@ AVCodec ff_ssa_encoder = { #endif #if CONFIG_ASS_ENCODER -AVCodec ff_ass_encoder = { +const AVCodec ff_ass_encoder = { .name = "ass", .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c index a72e11b848..60a4e138c4 100644 --- a/libavcodec/asvdec.c +++ b/libavcodec/asvdec.c @@ -327,7 +327,7 @@ static av_cold int decode_end(AVCodecContext *avctx) } #if CONFIG_ASV1_DECODER -AVCodec ff_asv1_decoder = { +const AVCodec ff_asv1_decoder = { .name = "asv1", .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"), .type = AVMEDIA_TYPE_VIDEO, @@ -342,7 +342,7 @@ AVCodec ff_asv1_decoder = { #endif #if CONFIG_ASV2_DECODER -AVCodec ff_asv2_decoder = { +const AVCodec ff_asv2_decoder = { .name = "asv2", .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index c33a3b4681..bf11701d17 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -341,7 +341,7 @@ static av_cold int encode_init(AVCodecContext *avctx) } #if CONFIG_ASV1_ENCODER -AVCodec ff_asv1_encoder = { +const AVCodec ff_asv1_encoder = { .name = "asv1", .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"), .type = AVMEDIA_TYPE_VIDEO, @@ -356,7 +356,7 @@ AVCodec ff_asv1_encoder = { #endif #if CONFIG_ASV2_ENCODER -AVCodec ff_asv2_encoder = { +const AVCodec ff_asv2_encoder = { .name = "asv2", .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index 54f9b1c2d8..228477d778 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -382,7 +382,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) } -AVCodec ff_atrac1_decoder = { +const AVCodec ff_atrac1_decoder = { .name = "atrac1", .long_name = NULL_IF_CONFIG_SMALL("ATRAC1 (Adaptive TRansform Acoustic Coding)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 37ccbcc946..b4809111f8 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -1013,7 +1013,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_atrac3_decoder = { +const AVCodec ff_atrac3_decoder = { .name = "atrac3", .long_name = NULL_IF_CONFIG_SMALL("ATRAC3 (Adaptive TRansform Acoustic Coding 3)"), .type = AVMEDIA_TYPE_AUDIO, @@ -1028,7 +1028,7 @@ AVCodec ff_atrac3_decoder = { .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, }; -AVCodec ff_atrac3al_decoder = { +const AVCodec ff_atrac3al_decoder = { .name = "atrac3al", .long_name = NULL_IF_CONFIG_SMALL("ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/atrac3plusdec.c b/libavcodec/atrac3plusdec.c index c024ab6bde..9917f2d819 100644 --- a/libavcodec/atrac3plusdec.c +++ b/libavcodec/atrac3plusdec.c @@ -393,7 +393,7 @@ static int atrac3p_decode_frame(AVCodecContext *avctx, void *data, return avctx->codec_id == AV_CODEC_ID_ATRAC3P ? FFMIN(avctx->block_align, avpkt->size) : avpkt->size; } -AVCodec ff_atrac3p_decoder = { +const AVCodec ff_atrac3p_decoder = { .name = "atrac3plus", .long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)"), .type = AVMEDIA_TYPE_AUDIO, @@ -406,7 +406,7 @@ AVCodec ff_atrac3p_decoder = { .decode = atrac3p_decode_frame, }; -AVCodec ff_atrac3pal_decoder = { +const AVCodec ff_atrac3pal_decoder = { .name = "atrac3plusal", .long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index f88b25da48..eebb412145 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -986,7 +986,7 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_atrac9_decoder = { +const AVCodec ff_atrac9_decoder = { .name = "atrac9", .long_name = NULL_IF_CONFIG_SMALL("ATRAC9 (Adaptive TRansform Acoustic Coding 9)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c index a4fb8c9120..cbd381ef12 100644 --- a/libavcodec/audiotoolboxdec.c +++ b/libavcodec/audiotoolboxdec.c @@ -579,7 +579,7 @@ static av_cold int ffat_close_decoder(AVCodecContext *avctx) #define FFAT_DEC(NAME, ID, bsf_name) \ FFAT_DEC_CLASS(NAME) \ - AVCodec ff_##NAME##_at_decoder = { \ + const AVCodec ff_##NAME##_at_decoder = { \ .name = #NAME "_at", \ .long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \ .type = AVMEDIA_TYPE_AUDIO, \ diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c index b0a4340ae3..e3d056a79d 100644 --- a/libavcodec/audiotoolboxenc.c +++ b/libavcodec/audiotoolboxenc.c @@ -616,7 +616,7 @@ static const AVOption options[] = { #define FFAT_ENC(NAME, ID, PROFILES, ...) \ FFAT_ENC_CLASS(NAME) \ - AVCodec ff_##NAME##_at_encoder = { \ + const AVCodec ff_##NAME##_at_encoder = { \ .name = #NAME "_at", \ .long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \ .type = AVMEDIA_TYPE_AUDIO, \ diff --git a/libavcodec/aura.c b/libavcodec/aura.c index 5ef9316632..585c710f5a 100644 --- a/libavcodec/aura.c +++ b/libavcodec/aura.c @@ -97,7 +97,7 @@ static int aura_decode_frame(AVCodecContext *avctx, return pkt->size; } -AVCodec ff_aura2_decoder = { +const AVCodec ff_aura2_decoder = { .name = "aura2", .long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index a75d6744d3..1dda0f9160 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -1121,7 +1121,7 @@ static const AVClass av1_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_av1_decoder = { +const AVCodec ff_av1_decoder = { .name = "av1", .long_name = NULL_IF_CONFIG_SMALL("Alliance for Open Media AV1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c index 477afd8bf1..70e34c617d 100644 --- a/libavcodec/avrndec.c +++ b/libavcodec/avrndec.c @@ -89,7 +89,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_avrn_decoder = { +const AVCodec ff_avrn_decoder = { .name = "avrn", .long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/avs.c b/libavcodec/avs.c index 2f2361e5ea..28f5f0b137 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -176,7 +176,7 @@ static av_cold int avs_decode_end(AVCodecContext *avctx) } -AVCodec ff_avs_decoder = { +const AVCodec ff_avs_decoder = { .name = "avs", .long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/avuidec.c b/libavcodec/avuidec.c index 4cf620d43a..f7172845c3 100644 --- a/libavcodec/avuidec.c +++ b/libavcodec/avuidec.c @@ -119,7 +119,7 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_avui_decoder = { +const AVCodec ff_avui_decoder = { .name = "avui", .long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/avuienc.c b/libavcodec/avuienc.c index 2091309e7e..e9e30fe7f4 100644 --- a/libavcodec/avuienc.c +++ b/libavcodec/avuienc.c @@ -91,7 +91,7 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_avui_encoder = { +const AVCodec ff_avui_encoder = { .name = "avui", .long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c index a931b54911..b529aba7e9 100644 --- a/libavcodec/bethsoftvideo.c +++ b/libavcodec/bethsoftvideo.c @@ -158,7 +158,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_bethsoftvid_decoder = { +const AVCodec ff_bethsoftvid_decoder = { .name = "bethsoftvid", .long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c index a4cb002053..78685e8777 100644 --- a/libavcodec/bfi.c +++ b/libavcodec/bfi.c @@ -175,7 +175,7 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_bfi_decoder = { +const AVCodec ff_bfi_decoder = { .name = "bfi", .long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/bink.c b/libavcodec/bink.c index 5efd24e9c3..36d1ab6c0a 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -1415,7 +1415,7 @@ static void flush(AVCodecContext *avctx) c->frame_num = 0; } -AVCodec ff_bink_decoder = { +const AVCodec ff_bink_decoder = { .name = "binkvideo", .long_name = NULL_IF_CONFIG_SMALL("Bink video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index df15a0fd5b..e42ceb3673 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -337,7 +337,7 @@ fail: return ret; } -AVCodec ff_binkaudio_rdft_decoder = { +const AVCodec ff_binkaudio_rdft_decoder = { .name = "binkaudio_rdft", .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"), .type = AVMEDIA_TYPE_AUDIO, @@ -350,7 +350,7 @@ AVCodec ff_binkaudio_rdft_decoder = { .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; -AVCodec ff_binkaudio_dct_decoder = { +const AVCodec ff_binkaudio_dct_decoder = { .name = "binkaudio_dct", .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/bintext.c b/libavcodec/bintext.c index 1aeed21f51..520d68a7c0 100644 --- a/libavcodec/bintext.c +++ b/libavcodec/bintext.c @@ -215,7 +215,7 @@ static int decode_frame(AVCodecContext *avctx, } #if CONFIG_BINTEXT_DECODER -AVCodec ff_bintext_decoder = { +const AVCodec ff_bintext_decoder = { .name = "bintext", .long_name = NULL_IF_CONFIG_SMALL("Binary text"), .type = AVMEDIA_TYPE_VIDEO, @@ -227,7 +227,7 @@ AVCodec ff_bintext_decoder = { }; #endif #if CONFIG_XBIN_DECODER -AVCodec ff_xbin_decoder = { +const AVCodec ff_xbin_decoder = { .name = "xbin", .long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"), .type = AVMEDIA_TYPE_VIDEO, @@ -239,7 +239,7 @@ AVCodec ff_xbin_decoder = { }; #endif #if CONFIG_IDF_DECODER -AVCodec ff_idf_decoder = { +const AVCodec ff_idf_decoder = { .name = "idf", .long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/bitpacked.c b/libavcodec/bitpacked.c index 23e82c69b5..57ae93b6b4 100644 --- a/libavcodec/bitpacked.c +++ b/libavcodec/bitpacked.c @@ -137,7 +137,7 @@ static int bitpacked_decode(AVCodecContext *avctx, void *data, int *got_frame, } -AVCodec ff_bitpacked_decoder = { +const AVCodec ff_bitpacked_decoder = { .name = "bitpacked", .long_name = NULL_IF_CONFIG_SMALL("Bitpacked"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 40010ac46f..c4f6044cb4 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -365,7 +365,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, return buf_size; } -AVCodec ff_bmp_decoder = { +const AVCodec ff_bmp_decoder = { .name = "bmp", .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c index bab2558bc9..ee2a2d0ea9 100644 --- a/libavcodec/bmpenc.c +++ b/libavcodec/bmpenc.c @@ -157,7 +157,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_bmp_encoder = { +const AVCodec ff_bmp_encoder = { .name = "bmp", .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/bmvaudio.c b/libavcodec/bmvaudio.c index 7c4dad7f8d..0c3aad0f2f 100644 --- a/libavcodec/bmvaudio.c +++ b/libavcodec/bmvaudio.c @@ -78,7 +78,7 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_bmv_audio_decoder = { +const AVCodec ff_bmv_audio_decoder = { .name = "bmv_audio", .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/bmvvideo.c b/libavcodec/bmvvideo.c index 679b14208a..d76ba442be 100644 --- a/libavcodec/bmvvideo.c +++ b/libavcodec/bmvvideo.c @@ -285,7 +285,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_bmv_video_decoder = { +const AVCodec ff_bmv_video_decoder = { .name = "bmv_video", .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/brenderpix.c b/libavcodec/brenderpix.c index 46b7a59aa4..4726fd3d77 100644 --- a/libavcodec/brenderpix.c +++ b/libavcodec/brenderpix.c @@ -285,7 +285,7 @@ static int pix_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return avpkt->size; } -AVCodec ff_brender_pix_decoder = { +const AVCodec ff_brender_pix_decoder = { .name = "brender_pix", .long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/c93.c b/libavcodec/c93.c index 7e3bfdbc72..3464c85e23 100644 --- a/libavcodec/c93.c +++ b/libavcodec/c93.c @@ -257,7 +257,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_c93_decoder = { +const AVCodec ff_c93_decoder = { .name = "c93", .long_name = NULL_IF_CONFIG_SMALL("Interplay C93"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 9c3825df38..692c77eb39 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -1307,7 +1307,7 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } } -AVCodec ff_cavs_decoder = { +const AVCodec ff_cavs_decoder = { .name = "cavs", .long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c index a208e19b95..9ad00cb254 100644 --- a/libavcodec/ccaption_dec.c +++ b/libavcodec/ccaption_dec.c @@ -940,7 +940,7 @@ static const AVClass ccaption_dec_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_ccaption_decoder = { +const AVCodec ff_ccaption_decoder = { .name = "cc_dec", .long_name = NULL_IF_CONFIG_SMALL("Closed Caption (EIA-608 / CEA-708)"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index 263459d0f2..faa43c1c83 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -386,7 +386,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_cdgraphics_decoder = { +const AVCodec ff_cdgraphics_decoder = { .name = "cdgraphics", .long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cdtoons.c b/libavcodec/cdtoons.c index 3530f81452..14c15c4579 100644 --- a/libavcodec/cdtoons.c +++ b/libavcodec/cdtoons.c @@ -442,7 +442,7 @@ static av_cold int cdtoons_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_cdtoons_decoder = { +const AVCodec ff_cdtoons_decoder = { .name = "cdtoons", .long_name = NULL_IF_CONFIG_SMALL("CDToons video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c index 056c3577ab..860dc639f6 100644 --- a/libavcodec/cdxl.c +++ b/libavcodec/cdxl.c @@ -336,7 +336,7 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_cdxl_decoder = { +const AVCodec ff_cdxl_decoder = { .name = "cdxl", .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 6f13207cc1..66e1695ec9 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -1458,7 +1458,7 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) } #endif -AVCodec ff_cfhd_decoder = { +const AVCodec ff_cfhd_decoder = { .name = "cfhd", .long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c index 0369164fab..e0b1172ede 100644 --- a/libavcodec/cfhdenc.c +++ b/libavcodec/cfhdenc.c @@ -845,7 +845,7 @@ static const AVClass cfhd_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_cfhd_encoder = { +const AVCodec ff_cfhd_encoder = { .name = "cfhd", .long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index ccd6af3208..090ab9cea0 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -506,7 +506,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_cinepak_decoder = { +const AVCodec ff_cinepak_decoder = { .name = "cinepak", .long_name = NULL_IF_CONFIG_SMALL("Cinepak"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cinepakenc.c b/libavcodec/cinepakenc.c index 4c9b961660..422cb3f8e9 100644 --- a/libavcodec/cinepakenc.c +++ b/libavcodec/cinepakenc.c @@ -1178,7 +1178,7 @@ static av_cold int cinepak_encode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_cinepak_encoder = { +const AVCodec ff_cinepak_encoder = { .name = "cinepak", .long_name = NULL_IF_CONFIG_SMALL("Cinepak"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 79ba88857c..e5e33d3313 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -766,7 +766,7 @@ static av_cold int clv_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_clearvideo_decoder = { +const AVCodec ff_clearvideo_decoder = { .name = "clearvideo", .long_name = NULL_IF_CONFIG_SMALL("Iterated Systems ClearVideo"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cljrdec.c b/libavcodec/cljrdec.c index c41df12d53..4a8c9d2ae1 100644 --- a/libavcodec/cljrdec.c +++ b/libavcodec/cljrdec.c @@ -82,7 +82,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_cljr_decoder = { +const AVCodec ff_cljr_decoder = { .name = "cljr", .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cljrenc.c b/libavcodec/cljrenc.c index fe58f50f09..6f04c62cb0 100644 --- a/libavcodec/cljrenc.c +++ b/libavcodec/cljrenc.c @@ -109,7 +109,7 @@ static const AVClass cljr_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_cljr_encoder = { +const AVCodec ff_cljr_encoder = { .name = "cljr", .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c index 837e04f173..41b3a4ef83 100644 --- a/libavcodec/cllc.c +++ b/libavcodec/cllc.c @@ -493,7 +493,7 @@ static av_cold int cllc_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_cllc_decoder = { +const AVCodec ff_cllc_decoder = { .name = "cllc", .long_name = NULL_IF_CONFIG_SMALL("Canopus Lossless Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c index ceee087c57..57cb620179 100644 --- a/libavcodec/cngdec.c +++ b/libavcodec/cngdec.c @@ -161,7 +161,7 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_comfortnoise_decoder = { +const AVCodec ff_comfortnoise_decoder = { .name = "comfortnoise", .long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c index b622d7bbda..55826c75be 100644 --- a/libavcodec/cngenc.c +++ b/libavcodec/cngenc.c @@ -100,7 +100,7 @@ static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_comfortnoise_encoder = { +const AVCodec ff_comfortnoise_encoder = { .name = "comfortnoise", .long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/cook.c b/libavcodec/cook.c index a9de3c8b1a..361baeb3ac 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1292,7 +1292,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_cook_decoder = { +const AVCodec ff_cook_decoder = { .name = "cook", .long_name = NULL_IF_CONFIG_SMALL("Cook / Cooker / Gecko (RealAudio G2)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/cpia.c b/libavcodec/cpia.c index 5f12a99a83..d88bd1aae7 100644 --- a/libavcodec/cpia.c +++ b/libavcodec/cpia.c @@ -220,7 +220,7 @@ static av_cold int cpia_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_cpia_decoder = { +const AVCodec ff_cpia_decoder = { .name = "cpia", .long_name = NULL_IF_CONFIG_SMALL("CPiA video format"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cri.c b/libavcodec/cri.c index 0558d0c8dd..dfea24d979 100644 --- a/libavcodec/cri.c +++ b/libavcodec/cri.c @@ -424,7 +424,7 @@ static av_cold int cri_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_cri_decoder = { +const AVCodec ff_cri_decoder = { .name = "cri", .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_CRI, diff --git a/libavcodec/crystalhd.c b/libavcodec/crystalhd.c index fbfe5e8f62..f709cf74a7 100644 --- a/libavcodec/crystalhd.c +++ b/libavcodec/crystalhd.c @@ -767,7 +767,7 @@ static int crystalhd_receive_frame(AVCodecContext *avctx, AVFrame *frame) .option = options, \ .version = LIBAVUTIL_VERSION_INT, \ }; \ - AVCodec ff_##x##_crystalhd_decoder = { \ + const AVCodec ff_##x##_crystalhd_decoder = { \ .name = #x "_crystalhd", \ .long_name = NULL_IF_CONFIG_SMALL("CrystalHD " #X " decoder"), \ .type = AVMEDIA_TYPE_VIDEO, \ diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c index f5c93e9912..af12246281 100644 --- a/libavcodec/cscd.c +++ b/libavcodec/cscd.c @@ -166,7 +166,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_cscd_decoder = { +const AVCodec ff_cscd_decoder = { .name = "camstudio", .long_name = NULL_IF_CONFIG_SMALL("CamStudio"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index 1e5e3ea9a6..a5f33e6fc1 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -1131,7 +1131,7 @@ static const AVCodecHWConfigInternal *const cuvid_hw_configs[] = { .option = options, \ .version = LIBAVUTIL_VERSION_INT, \ }; \ - AVCodec ff_##x##_cuvid_decoder = { \ + const AVCodec ff_##x##_cuvid_decoder = { \ .name = #x "_cuvid", \ .long_name = NULL_IF_CONFIG_SMALL("Nvidia CUVID " #X " decoder"), \ .type = AVMEDIA_TYPE_VIDEO, \ diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c index f2b0a7cbab..cfaa5cfa66 100644 --- a/libavcodec/cyuv.c +++ b/libavcodec/cyuv.c @@ -176,7 +176,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx, } #if CONFIG_AURA_DECODER -AVCodec ff_aura_decoder = { +const AVCodec ff_aura_decoder = { .name = "aura", .long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"), .type = AVMEDIA_TYPE_VIDEO, @@ -190,7 +190,7 @@ AVCodec ff_aura_decoder = { #endif #if CONFIG_CYUV_DECODER -AVCodec ff_cyuv_decoder = { +const AVCodec ff_cyuv_decoder = { .name = "cyuv", .long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 4146a85ec5..1aa1b4235b 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -381,7 +381,7 @@ static const AVClass dcadec_class = { .category = AV_CLASS_CATEGORY_DECODER, }; -AVCodec ff_dca_decoder = { +const AVCodec ff_dca_decoder = { .name = "dca", .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index 12aa7e0df2..bd08ccd331 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -1238,7 +1238,7 @@ static const AVCodecDefault defaults[] = { { NULL }, }; -AVCodec ff_dca_encoder = { +const AVCodec ff_dca_encoder = { .name = "dca", .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/dds.c b/libavcodec/dds.c index 9154f692fa..e5183cade1 100644 --- a/libavcodec/dds.c +++ b/libavcodec/dds.c @@ -748,7 +748,7 @@ static int dds_decode(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_dds_decoder = { +const AVCodec ff_dds_decoder = { .name = "dds", .long_name = NULL_IF_CONFIG_SMALL("DirectDraw Surface image decoder"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index 31c6c39089..13d1e71f82 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -414,7 +414,7 @@ static av_cold int dfa_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_dfa_decoder = { +const AVCodec ff_dfa_decoder = { .name = "dfa", .long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index b9999cde01..30a5b1340b 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -2355,7 +2355,7 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return buf_idx; } -AVCodec ff_dirac_decoder = { +const AVCodec ff_dirac_decoder = { .name = "dirac", .long_name = NULL_IF_CONFIG_SMALL("BBC Dirac VC-2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index c78d55aee5..b9e07a8562 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -717,7 +717,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_dnxhd_decoder = { +const AVCodec ff_dnxhd_decoder = { .name = "dnxhd", .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 19e11b4214..23c3f6fdb9 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -1349,7 +1349,7 @@ static const AVCodecDefault dnxhd_defaults[] = { { NULL }, }; -AVCodec ff_dnxhd_encoder = { +const AVCodec ff_dnxhd_encoder = { .name = "dnxhd", .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dolby_e.c b/libavcodec/dolby_e.c index ecb2f4802a..cd4c8c2c3c 100644 --- a/libavcodec/dolby_e.c +++ b/libavcodec/dolby_e.c @@ -1256,7 +1256,7 @@ static av_cold int dolby_e_init(AVCodecContext *avctx) return 0; } -AVCodec ff_dolby_e_decoder = { +const AVCodec ff_dolby_e_decoder = { .name = "dolby_e", .long_name = NULL_IF_CONFIG_SMALL("Dolby E"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c index 7078419f08..3bd7a3e117 100644 --- a/libavcodec/dpcm.c +++ b/libavcodec/dpcm.c @@ -410,7 +410,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, } #define DPCM_DECODER(id_, name_, long_name_) \ -AVCodec ff_ ## name_ ## _decoder = { \ +const AVCodec ff_ ## name_ ## _decoder = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .type = AVMEDIA_TYPE_AUDIO, \ diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index b02996f04c..8e77c09bb1 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -762,7 +762,7 @@ static int decode_frame(AVCodecContext *avctx, return buf_size; } -AVCodec ff_dpx_decoder = { +const AVCodec ff_dpx_decoder = { .name = "dpx", .long_name = NULL_IF_CONFIG_SMALL("DPX (Digital Picture Exchange) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c index a5960334d5..615623bf94 100644 --- a/libavcodec/dpxenc.c +++ b/libavcodec/dpxenc.c @@ -276,7 +276,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_dpx_encoder = { +const AVCodec ff_dpx_encoder = { .name = "dpx", .long_name = NULL_IF_CONFIG_SMALL("DPX (Digital Picture Exchange) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dsddec.c b/libavcodec/dsddec.c index 21d1d9f5de..19fb75ee85 100644 --- a/libavcodec/dsddec.c +++ b/libavcodec/dsddec.c @@ -115,7 +115,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, } #define DSD_DECODER(id_, name_, long_name_) \ -AVCodec ff_##name_##_decoder = { \ +const AVCodec ff_ ## name_ ## _decoder = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .type = AVMEDIA_TYPE_AUDIO, \ diff --git a/libavcodec/dsicinaudio.c b/libavcodec/dsicinaudio.c index 3ee6c196d2..cb3fd22e46 100644 --- a/libavcodec/dsicinaudio.c +++ b/libavcodec/dsicinaudio.c @@ -121,7 +121,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_dsicinaudio_decoder = { +const AVCodec ff_dsicinaudio_decoder = { .name = "dsicinaudio", .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/dsicinvideo.c b/libavcodec/dsicinvideo.c index 52f660fb51..73eea9aeb7 100644 --- a/libavcodec/dsicinvideo.c +++ b/libavcodec/dsicinvideo.c @@ -321,7 +321,7 @@ static av_cold int cinvideo_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_dsicinvideo_decoder = { +const AVCodec ff_dsicinvideo_decoder = { .name = "dsicinvideo", .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dss_sp.c b/libavcodec/dss_sp.c index 568757d212..26e196db14 100644 --- a/libavcodec/dss_sp.c +++ b/libavcodec/dss_sp.c @@ -774,7 +774,7 @@ static int dss_sp_decode_frame(AVCodecContext *avctx, void *data, return DSS_SP_FRAME_SIZE; } -AVCodec ff_dss_sp_decoder = { +const AVCodec ff_dss_sp_decoder = { .name = "dss_sp", .long_name = NULL_IF_CONFIG_SMALL("Digital Speech Standard - Standard Play mode (DSS SP)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index 84d19b91aa..7be97126ca 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -379,7 +379,7 @@ dsd: return avpkt->size; } -AVCodec ff_dst_decoder = { +const AVCodec ff_dst_decoder = { .name = "dst", .long_name = NULL_IF_CONFIG_SMALL("DST (Digital Stream Transfer)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/dvaudiodec.c b/libavcodec/dvaudiodec.c index 5aa2a95553..64721c45b2 100644 --- a/libavcodec/dvaudiodec.c +++ b/libavcodec/dvaudiodec.c @@ -121,7 +121,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, return s->block_size; } -AVCodec ff_dvaudio_decoder = { +const AVCodec ff_dvaudio_decoder = { .name = "dvaudio", .long_name = NULL_IF_CONFIG_SMALL("Ulead DV Audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 7db1fef216..f33744df0f 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -1737,7 +1737,7 @@ static const AVClass dvbsubdec_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_dvbsub_decoder = { +const AVCodec ff_dvbsub_decoder = { .name = "dvbsub", .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/dvbsubenc.c b/libavcodec/dvbsubenc.c index d1620e0c50..322fc27cb4 100644 --- a/libavcodec/dvbsubenc.c +++ b/libavcodec/dvbsubenc.c @@ -505,7 +505,7 @@ static int dvbsub_encode(AVCodecContext *avctx, uint8_t *outbuf, int buf_size, return q - outbuf; } -AVCodec ff_dvbsub_encoder = { +const AVCodec ff_dvbsub_encoder = { .name = "dvbsub", .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index a0647e58b4..d768326661 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -619,7 +619,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, return s->sys->frame_size; } -AVCodec ff_dvvideo_decoder = { +const AVCodec ff_dvvideo_decoder = { .name = "dvvideo", .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 91906b9df4..b0127951c5 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -760,7 +760,7 @@ static const AVClass dvdsub_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_dvdsub_decoder = { +const AVCodec ff_dvdsub_decoder = { .name = "dvdsub", .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index e55e2eab4f..cbea4e372c 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -493,7 +493,7 @@ static const AVClass dvdsubenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_dvdsub_encoder = { +const AVCodec ff_dvdsub_encoder = { .name = "dvdsub", .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c index f1be3e43f6..458f39b558 100644 --- a/libavcodec/dvenc.c +++ b/libavcodec/dvenc.c @@ -1198,7 +1198,7 @@ static const AVClass dvvideo_encode_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_dvvideo_encoder = { +const AVCodec ff_dvvideo_encoder = { .name = "dvvideo", .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index 3f62eac252..cddb13fea5 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -360,7 +360,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_dxa_decoder = { +const AVCodec ff_dxa_decoder = { .name = "dxa", .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c index f314bcec75..914131e742 100644 --- a/libavcodec/dxtory.c +++ b/libavcodec/dxtory.c @@ -876,7 +876,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return avpkt->size; } -AVCodec ff_dxtory_decoder = { +const AVCodec ff_dxtory_decoder = { .name = "dxtory", .long_name = NULL_IF_CONFIG_SMALL("Dxtory"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index 71d85208d8..5f17347913 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -1262,7 +1262,7 @@ static int dxv_close(AVCodecContext *avctx) return 0; } -AVCodec ff_dxv_decoder = { +const AVCodec ff_dxv_decoder = { .name = "dxv", .long_name = NULL_IF_CONFIG_SMALL("Resolume DXV"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c index 06d4df8f56..38ca31a219 100644 --- a/libavcodec/eac3enc.c +++ b/libavcodec/eac3enc.c @@ -248,7 +248,7 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s) } -AVCodec ff_eac3_encoder = { +const AVCodec ff_eac3_encoder = { .name = "eac3", .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c index b239acffda..6c4a85214f 100644 --- a/libavcodec/eacmv.c +++ b/libavcodec/eacmv.c @@ -230,7 +230,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){ return 0; } -AVCodec ff_eacmv_decoder = { +const AVCodec ff_eacmv_decoder = { .name = "eacmv", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts CMV video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 2c03aa5a1c..896f940735 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -341,7 +341,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_eamad_decoder = { +const AVCodec ff_eamad_decoder = { .name = "eamad", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index 197ba6fc6e..f390fb3f41 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -247,7 +247,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, return avpkt->size; } -AVCodec ff_eatgq_decoder = { +const AVCodec ff_eatgq_decoder = { .name = "eatgq", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGQ video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index f82f7b9cca..42cd07a60f 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -359,7 +359,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_eatgv_decoder = { +const AVCodec ff_eatgv_decoder = { .name = "eatgv", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGV video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c index 2be2737fd6..9beab58a83 100644 --- a/libavcodec/eatqi.c +++ b/libavcodec/eatqi.c @@ -181,7 +181,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_eatqi_decoder = { +const AVCodec ff_eatqi_decoder = { .name = "eatqi", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TQI Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c index 94c2a961e6..3b514e7eb0 100644 --- a/libavcodec/escape124.c +++ b/libavcodec/escape124.c @@ -376,7 +376,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, } -AVCodec ff_escape124_decoder = { +const AVCodec ff_escape124_decoder = { .name = "escape124", .long_name = NULL_IF_CONFIG_SMALL("Escape 124"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c index a6fda901de..67373c3470 100644 --- a/libavcodec/escape130.c +++ b/libavcodec/escape130.c @@ -345,7 +345,7 @@ static int escape130_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_escape130_decoder = { +const AVCodec ff_escape130_decoder = { .name = "escape130", .long_name = NULL_IF_CONFIG_SMALL("Escape 130"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/evrcdec.c b/libavcodec/evrcdec.c index 00e342a1f6..436c9d1373 100644 --- a/libavcodec/evrcdec.c +++ b/libavcodec/evrcdec.c @@ -928,7 +928,7 @@ static const AVClass evrcdec_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_evrc_decoder = { +const AVCodec ff_evrc_decoder = { .name = "evrc", .long_name = NULL_IF_CONFIG_SMALL("EVRC (Enhanced Variable Rate Codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 49c4774145..fc4822e0a3 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -2331,7 +2331,7 @@ static const AVClass exr_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_exr_decoder = { +const AVCodec ff_exr_decoder = { .name = "exr", .long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/exrenc.c b/libavcodec/exrenc.c index db9000a85c..b2cb9c4205 100644 --- a/libavcodec/exrenc.c +++ b/libavcodec/exrenc.c @@ -534,7 +534,7 @@ static const AVClass exr_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_exr_encoder = { +const AVCodec ff_exr_encoder = { .name = "exr", .long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"), .priv_data_size = sizeof(EXRContext), diff --git a/libavcodec/fastaudio.c b/libavcodec/fastaudio.c index 9de42d2134..e771534e9f 100644 --- a/libavcodec/fastaudio.c +++ b/libavcodec/fastaudio.c @@ -187,7 +187,7 @@ static av_cold int fastaudio_close(AVCodecContext *avctx) return 0; } -AVCodec ff_fastaudio_decoder = { +const AVCodec ff_fastaudio_decoder = { .name = "fastaudio", .long_name = NULL_IF_CONFIG_SMALL("MobiClip FastAudio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 14879779fa..7430bea960 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -1052,7 +1052,7 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) } #endif -AVCodec ff_ffv1_decoder = { +const AVCodec ff_ffv1_decoder = { .name = "ffv1", .long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 749f6265f3..98abd936cd 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1276,7 +1276,7 @@ static const AVClass ffv1_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_ffv1_encoder = { +const AVCodec ff_ffv1_encoder = { .name = "ffv1", .long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c index 3f982d07cf..a1211facb9 100644 --- a/libavcodec/ffwavesynth.c +++ b/libavcodec/ffwavesynth.c @@ -459,7 +459,7 @@ static av_cold int wavesynth_close(AVCodecContext *avc) return 0; } -AVCodec ff_ffwavesynth_decoder = { +const AVCodec ff_ffwavesynth_decoder = { .name = "wavesynth", .long_name = NULL_IF_CONFIG_SMALL("Wave synthesis pseudo-codec"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/fic.c b/libavcodec/fic.c index ef5f3f44d1..457d74d7cd 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -483,7 +483,7 @@ static const AVClass fic_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_fic_decoder = { +const AVCodec ff_fic_decoder = { .name = "fic", .long_name = NULL_IF_CONFIG_SMALL("Mirillis FIC"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c index 802aa5b509..af60217a8a 100644 --- a/libavcodec/fitsdec.c +++ b/libavcodec/fitsdec.c @@ -320,7 +320,7 @@ static const AVClass fits_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_fits_decoder = { +const AVCodec ff_fits_decoder = { .name = "fits", .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_FITS, diff --git a/libavcodec/fitsenc.c b/libavcodec/fitsenc.c index b44507e436..80d0d71d1d 100644 --- a/libavcodec/fitsenc.c +++ b/libavcodec/fitsenc.c @@ -113,7 +113,7 @@ static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_fits_encoder = { +const AVCodec ff_fits_encoder = { .name = "fits", .long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 9e55bc1361..c62661a353 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -660,7 +660,7 @@ static const AVClass flac_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_flac_decoder = { +const AVCodec ff_flac_decoder = { .name = "flac", .long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 9460b1afc8..caa9092314 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -1457,7 +1457,7 @@ static const AVClass flac_encoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_flac_encoder = { +const AVCodec ff_flac_encoder = { .name = "flac", .long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 9481f80f0b..4240091d92 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -507,7 +507,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data, } #if CONFIG_FLASHSV_DECODER -AVCodec ff_flashsv_decoder = { +const AVCodec ff_flashsv_decoder = { .name = "flashsv", .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v1"), .type = AVMEDIA_TYPE_VIDEO, @@ -575,7 +575,7 @@ static av_cold int flashsv2_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_flashsv2_decoder = { +const AVCodec ff_flashsv2_decoder = { .name = "flashsv2", .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c index 00aedf0795..5e91367796 100644 --- a/libavcodec/flashsv2enc.c +++ b/libavcodec/flashsv2enc.c @@ -897,7 +897,7 @@ static av_cold int flashsv2_encode_end(AVCodecContext * avctx) return 0; } -AVCodec ff_flashsv2_encoder = { +const AVCodec ff_flashsv2_encoder = { .name = "flashsv2", .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video Version 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index d365ff3999..0b01550c1e 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -256,7 +256,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_flashsv_encoder = { +const AVCodec ff_flashsv_encoder = { .name = "flashsv", .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c index 276c2ff2a6..db35d917a9 100644 --- a/libavcodec/flicvideo.c +++ b/libavcodec/flicvideo.c @@ -1102,7 +1102,7 @@ static av_cold int flic_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_flic_decoder = { +const AVCodec ff_flic_decoder = { .name = "flic", .long_name = NULL_IF_CONFIG_SMALL("Autodesk Animator Flic video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c index c19f07fe05..6258c1c0a7 100644 --- a/libavcodec/flvdec.c +++ b/libavcodec/flvdec.c @@ -113,7 +113,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) return 0; } -AVCodec ff_flv_decoder = { +const AVCodec ff_flv_decoder = { .name = "flv", .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c index b85e4667c4..8a4ae392ee 100644 --- a/libavcodec/flvenc.c +++ b/libavcodec/flvenc.c @@ -98,7 +98,7 @@ static const AVClass flv_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_flv_encoder = { +const AVCodec ff_flv_encoder = { .name = "flv", .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c index 3701b0849b..aab46da9cf 100644 --- a/libavcodec/fmvc.c +++ b/libavcodec/fmvc.c @@ -626,7 +626,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_fmvc_decoder = { +const AVCodec ff_fmvc_decoder = { .name = "fmvc", .long_name = NULL_IF_CONFIG_SMALL("FM Screen Capture Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 8d01b44f11..b3262a4b23 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -342,7 +342,7 @@ static av_cold int decode_end(AVCodecContext *avctx) } -AVCodec ff_fraps_decoder = { +const AVCodec ff_fraps_decoder = { .name = "fraps", .long_name = NULL_IF_CONFIG_SMALL("Fraps"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c index e68fda967f..d0a9102fe3 100644 --- a/libavcodec/frwu.c +++ b/libavcodec/frwu.c @@ -115,7 +115,7 @@ static const AVClass frwu_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_frwu_decoder = { +const AVCodec ff_frwu_decoder = { .name = "frwu", .long_name = NULL_IF_CONFIG_SMALL("Forward Uncompressed"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index da910c1e59..66f4557f06 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -1623,7 +1623,7 @@ static av_cold int g2m_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_g2m_decoder = { +const AVCodec ff_g2m_decoder = { .name = "g2m", .long_name = NULL_IF_CONFIG_SMALL("Go2Meeting"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c index 8444d9a4bc..96cf1a86f1 100644 --- a/libavcodec/g722dec.c +++ b/libavcodec/g722dec.c @@ -139,7 +139,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_adpcm_g722_decoder = { +const AVCodec ff_adpcm_g722_decoder = { .name = "g722", .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c index 9e2ebf67c5..24880f9550 100644 --- a/libavcodec/g722enc.c +++ b/libavcodec/g722enc.c @@ -368,7 +368,7 @@ static int g722_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_adpcm_g722_encoder = { +const AVCodec ff_adpcm_g722_encoder = { .name = "g722", .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c index fddd4b03c0..3b052f3801 100644 --- a/libavcodec/g723_1dec.c +++ b/libavcodec/g723_1dec.c @@ -1110,7 +1110,7 @@ static const AVClass g723_1dec_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_g723_1_decoder = { +const AVCodec ff_g723_1_decoder = { .name = "g723_1", .long_name = NULL_IF_CONFIG_SMALL("G.723.1"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c index 11b0c7f71e..2fb4b7fc82 100644 --- a/libavcodec/g723_1enc.c +++ b/libavcodec/g723_1enc.c @@ -1244,7 +1244,7 @@ static const AVCodecDefault defaults[] = { { NULL }, }; -AVCodec ff_g723_1_encoder = { +const AVCodec ff_g723_1_encoder = { .name = "g723_1", .long_name = NULL_IF_CONFIG_SMALL("G.723.1"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/g726.c b/libavcodec/g726.c index 71f5791416..d643fbf968 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -396,7 +396,7 @@ static const AVClass g726_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_adpcm_g726_encoder = { +const AVCodec ff_adpcm_g726_encoder = { .name = "g726", .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"), .type = AVMEDIA_TYPE_AUDIO, @@ -420,7 +420,7 @@ static const AVClass g726le_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_adpcm_g726le_encoder = { +const AVCodec ff_adpcm_g726le_encoder = { .name = "g726le", .long_name = NULL_IF_CONFIG_SMALL("G.726 little endian ADPCM (\"right-justified\")"), .type = AVMEDIA_TYPE_AUDIO, @@ -504,7 +504,7 @@ static void g726_decode_flush(AVCodecContext *avctx) #endif #if CONFIG_ADPCM_G726_DECODER -AVCodec ff_adpcm_g726_decoder = { +const AVCodec ff_adpcm_g726_decoder = { .name = "g726", .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"), .type = AVMEDIA_TYPE_AUDIO, @@ -518,7 +518,7 @@ AVCodec ff_adpcm_g726_decoder = { #endif #if CONFIG_ADPCM_G726LE_DECODER -AVCodec ff_adpcm_g726le_decoder = { +const AVCodec ff_adpcm_g726le_decoder = { .name = "g726le", .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_ADPCM_G726LE, diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c index c181f23452..eca69026c0 100644 --- a/libavcodec/g729dec.c +++ b/libavcodec/g729dec.c @@ -750,7 +750,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_g729_decoder = { +const AVCodec ff_g729_decoder = { .name = "g729", .long_name = NULL_IF_CONFIG_SMALL("G.729"), .type = AVMEDIA_TYPE_AUDIO, @@ -762,7 +762,7 @@ AVCodec ff_g729_decoder = { .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, }; -AVCodec ff_acelp_kelvin_decoder = { +const AVCodec ff_acelp_kelvin_decoder = { .name = "acelp.kelvin", .long_name = NULL_IF_CONFIG_SMALL("Sipro ACELP.KELVIN"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c index 406d79df01..222e604c8b 100644 --- a/libavcodec/gdv.c +++ b/libavcodec/gdv.c @@ -560,7 +560,7 @@ static av_cold int gdv_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_gdv_decoder = { +const AVCodec ff_gdv_decoder = { .name = "gdv", .long_name = NULL_IF_CONFIG_SMALL("Gremlin Digital Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/gif.c b/libavcodec/gif.c index cafd93e190..f3ee15c2ac 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -551,7 +551,7 @@ static const AVClass gif_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_gif_encoder = { +const AVCodec ff_gif_encoder = { .name = "gif", .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index dffc860bbc..80f1ba0cce 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -554,7 +554,7 @@ static const AVClass decoder_class = { .category = AV_CLASS_CATEGORY_DECODER, }; -AVCodec ff_gif_decoder = { +const AVCodec ff_gif_decoder = { .name = "gif", .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c index bf3740aa5d..373ed087ef 100644 --- a/libavcodec/gsmdec.c +++ b/libavcodec/gsmdec.c @@ -111,7 +111,7 @@ static void gsm_flush(AVCodecContext *avctx) } #if CONFIG_GSM_DECODER -AVCodec ff_gsm_decoder = { +const AVCodec ff_gsm_decoder = { .name = "gsm", .long_name = NULL_IF_CONFIG_SMALL("GSM"), .type = AVMEDIA_TYPE_AUDIO, @@ -124,7 +124,7 @@ AVCodec ff_gsm_decoder = { }; #endif #if CONFIG_GSM_MS_DECODER -AVCodec ff_gsm_ms_decoder = { +const AVCodec ff_gsm_ms_decoder = { .name = "gsm_ms", .long_name = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 0d8cd8c20d..80ec1c8814 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -665,7 +665,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_h261_decoder = { +const AVCodec ff_h261_decoder = { .name = "h261", .long_name = NULL_IF_CONFIG_SMALL("H.261"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index eec526c500..da681f140a 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -392,7 +392,7 @@ static const AVClass h261_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h261_encoder = { +const AVCodec ff_h261_encoder = { .name = "h261", .long_name = NULL_IF_CONFIG_SMALL("H.261"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 192cc487da..f05dfbf25e 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -759,7 +759,7 @@ const AVCodecHWConfigInternal *const ff_h263_hw_config_list[] = { NULL }; -AVCodec ff_h263_decoder = { +const AVCodec ff_h263_decoder = { .name = "h263", .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), .type = AVMEDIA_TYPE_VIDEO, @@ -777,7 +777,7 @@ AVCodec ff_h263_decoder = { .hw_configs = ff_h263_hw_config_list, }; -AVCodec ff_h263p_decoder = { +const AVCodec ff_h263p_decoder = { .name = "h263p", .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 536020095c..38f8967265 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -1043,7 +1043,7 @@ static const AVClass h264_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h264_decoder = { +const AVCodec ff_h264_decoder = { .name = "h264", .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 692bb6e750..2c8c5c36ba 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -478,7 +478,7 @@ static av_cold int hap_close(AVCodecContext *avctx) return 0; } -AVCodec ff_hap_decoder = { +const AVCodec ff_hap_decoder = { .name = "hap", .long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/hapenc.c b/libavcodec/hapenc.c index 3a1bc870b1..7801111e15 100644 --- a/libavcodec/hapenc.c +++ b/libavcodec/hapenc.c @@ -349,7 +349,7 @@ static const AVClass hapenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_hap_encoder = { +const AVCodec ff_hap_encoder = { .name = "hap", .long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/hcadec.c b/libavcodec/hcadec.c index 9c3eda21af..c98f8eb379 100644 --- a/libavcodec/hcadec.c +++ b/libavcodec/hcadec.c @@ -445,7 +445,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_hca_decoder = { +const AVCodec ff_hca_decoder = { .name = "hca", .long_name = NULL_IF_CONFIG_SMALL("CRI HCA"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/hcom.c b/libavcodec/hcom.c index 06fa25fcd2..1c49988b3a 100644 --- a/libavcodec/hcom.c +++ b/libavcodec/hcom.c @@ -134,7 +134,7 @@ static av_cold int hcom_close(AVCodecContext *avctx) return 0; } -AVCodec ff_hcom_decoder = { +const AVCodec ff_hcom_decoder = { .name = "hcom", .long_name = NULL_IF_CONFIG_SMALL("HCOM Audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index ad38f37187..2d35b0b182 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -3667,7 +3667,7 @@ static const AVClass hevc_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_hevc_decoder = { +const AVCodec ff_hevc_decoder = { .name = "hevc", .long_name = NULL_IF_CONFIG_SMALL("HEVC (High Efficiency Video Coding)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/hnm4video.c b/libavcodec/hnm4video.c index 43baa9c572..0d3fa7d1e8 100644 --- a/libavcodec/hnm4video.c +++ b/libavcodec/hnm4video.c @@ -497,7 +497,7 @@ static av_cold int hnm_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_hnm4_video_decoder = { +const AVCodec ff_hnm4_video_decoder = { .name = "hnm4video", .long_name = NULL_IF_CONFIG_SMALL("HNM 4 video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c index 8404e80ec8..71753e7cc2 100644 --- a/libavcodec/hq_hqa.c +++ b/libavcodec/hq_hqa.c @@ -381,7 +381,7 @@ static av_cold int hq_hqa_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_hq_hqa_decoder = { +const AVCodec ff_hq_hqa_decoder = { .name = "hq_hqa", .long_name = NULL_IF_CONFIG_SMALL("Canopus HQ/HQA"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c index aa4ff22a8f..3a4db1b6c3 100644 --- a/libavcodec/hqx.c +++ b/libavcodec/hqx.c @@ -535,7 +535,7 @@ static av_cold int hqx_decode_init(AVCodecContext *avctx) return ff_hqx_init_vlcs(ctx); } -AVCodec ff_hqx_decoder = { +const AVCodec ff_hqx_decoder = { .name = "hqx", .long_name = NULL_IF_CONFIG_SMALL("Canopus HQX"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index e713b91e4d..62907ecb5e 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -1270,7 +1270,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return (get_bits_count(&s->gb) + 31) / 32 * 4 + table_size; } -AVCodec ff_huffyuv_decoder = { +const AVCodec ff_huffyuv_decoder = { .name = "huffyuv", .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"), .type = AVMEDIA_TYPE_VIDEO, @@ -1284,7 +1284,7 @@ AVCodec ff_huffyuv_decoder = { }; #if CONFIG_FFVHUFF_DECODER -AVCodec ff_ffvhuff_decoder = { +const AVCodec ff_ffvhuff_decoder = { .name = "ffvhuff", .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"), .type = AVMEDIA_TYPE_VIDEO, @@ -1299,7 +1299,7 @@ AVCodec ff_ffvhuff_decoder = { #endif /* CONFIG_FFVHUFF_DECODER */ #if CONFIG_HYMT_DECODER -AVCodec ff_hymt_decoder = { +const AVCodec ff_hymt_decoder = { .name = "hymt", .long_name = NULL_IF_CONFIG_SMALL("HuffYUV MT"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index f1b42c8499..6e08a94d41 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -1048,7 +1048,7 @@ static const AVClass ff_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_huffyuv_encoder = { +const AVCodec ff_huffyuv_encoder = { .name = "huffyuv", .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"), .type = AVMEDIA_TYPE_VIDEO, @@ -1068,7 +1068,7 @@ AVCodec ff_huffyuv_encoder = { }; #if CONFIG_FFVHUFF_ENCODER -AVCodec ff_ffvhuff_encoder = { +const AVCodec ff_ffvhuff_encoder = { .name = "ffvhuff", .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c index b79ec93108..41df545542 100644 --- a/libavcodec/idcinvideo.c +++ b/libavcodec/idcinvideo.c @@ -242,7 +242,7 @@ static const AVCodecDefault idcin_defaults[] = { { NULL }, }; -AVCodec ff_idcin_decoder = { +const AVCodec ff_idcin_decoder = { .name = "idcinvideo", .long_name = NULL_IF_CONFIG_SMALL("id Quake II CIN video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 79f6215c77..fe1baf3a0c 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -1903,7 +1903,7 @@ static int decode_frame(AVCodecContext *avctx, } #if CONFIG_IFF_ILBM_DECODER -AVCodec ff_iff_ilbm_decoder = { +const AVCodec ff_iff_ilbm_decoder = { .name = "iff", .long_name = NULL_IF_CONFIG_SMALL("IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ilbcdec.c b/libavcodec/ilbcdec.c index 33f4e2c1eb..a23b697806 100644 --- a/libavcodec/ilbcdec.c +++ b/libavcodec/ilbcdec.c @@ -1477,7 +1477,7 @@ static av_cold int ilbc_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_ilbc_decoder = { +const AVCodec ff_ilbc_decoder = { .name = "ilbc", .long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 51e7c1b2e1..cbe3edeeec 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -1084,7 +1084,7 @@ static av_cold void flush(AVCodecContext *avctx) } #if CONFIG_IMC_DECODER -AVCodec ff_imc_decoder = { +const AVCodec ff_imc_decoder = { .name = "imc", .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), .type = AVMEDIA_TYPE_AUDIO, @@ -1101,7 +1101,7 @@ AVCodec ff_imc_decoder = { }; #endif #if CONFIG_IAC_DECODER -AVCodec ff_iac_decoder = { +const AVCodec ff_iac_decoder = { .name = "iac", .long_name = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c index 636130dd54..a47c1e1ed8 100644 --- a/libavcodec/imm4.c +++ b/libavcodec/imm4.c @@ -532,7 +532,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_imm4_decoder = { +const AVCodec ff_imm4_decoder = { .name = "imm4", .long_name = NULL_IF_CONFIG_SMALL("Infinity IMM4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/imm5.c b/libavcodec/imm5.c index 5f8faa4dd0..cb8a619a4a 100644 --- a/libavcodec/imm5.c +++ b/libavcodec/imm5.c @@ -178,7 +178,7 @@ static av_cold int imm5_close(AVCodecContext *avctx) return 0; } -AVCodec ff_imm5_decoder = { +const AVCodec ff_imm5_decoder = { .name = "imm5", .long_name = NULL_IF_CONFIG_SMALL("Infinity IMM5"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/imx.c b/libavcodec/imx.c index d86c747c6d..d81a0de7be 100644 --- a/libavcodec/imx.c +++ b/libavcodec/imx.c @@ -179,7 +179,7 @@ static int imx_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_simbiosis_imx_decoder = { +const AVCodec ff_simbiosis_imx_decoder = { .name = "simbiosis_imx", .long_name = NULL_IF_CONFIG_SMALL("Simbiosis Interactive IMX Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index 5721308267..02fc7fefa1 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -260,7 +260,7 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_indeo2_decoder = { +const AVCodec ff_indeo2_decoder = { .name = "indeo2", .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 5257d983c2..3a8b8712bc 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -1131,7 +1131,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_indeo3_decoder = { +const AVCodec ff_indeo3_decoder = { .name = "indeo3", .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index e2778af6ca..3d3579d76b 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -703,7 +703,7 @@ static av_cold int decode_init(AVCodecContext *avctx) } -AVCodec ff_indeo4_decoder = { +const AVCodec ff_indeo4_decoder = { .name = "indeo4", .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c index 3de4a30ee2..fbf0c004d8 100644 --- a/libavcodec/indeo5.c +++ b/libavcodec/indeo5.c @@ -683,7 +683,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_indeo5_decoder = { +const AVCodec ff_indeo5_decoder = { .name = "indeo5", .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c index 283fb1cb0a..7c794dc5e3 100644 --- a/libavcodec/intelh263dec.c +++ b/libavcodec/intelh263dec.c @@ -128,7 +128,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) return 0; } -AVCodec ff_h263i_decoder = { +const AVCodec ff_h263i_decoder = { .name = "h263i", .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/interplayacm.c b/libavcodec/interplayacm.c index 3704d1a2f2..9838411cdc 100644 --- a/libavcodec/interplayacm.c +++ b/libavcodec/interplayacm.c @@ -621,7 +621,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_interplay_acm_decoder = { +const AVCodec ff_interplay_acm_decoder = { .name = "interplayacm", .long_name = NULL_IF_CONFIG_SMALL("Interplay ACM"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index 388fe2665e..bd1d7c74ba 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -1357,7 +1357,7 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_interplay_video_decoder = { +const AVCodec ff_interplay_video_decoder = { .name = "interplayvideo", .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index 40ba965cdb..c51adadd13 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -1832,7 +1832,7 @@ static const AVClass j2k_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_jpeg2000_encoder = { +const AVCodec ff_jpeg2000_encoder = { .name = "jpeg2000", .long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/jacosubdec.c b/libavcodec/jacosubdec.c index cdb372af58..4054612a3d 100644 --- a/libavcodec/jacosubdec.c +++ b/libavcodec/jacosubdec.c @@ -193,7 +193,7 @@ end: return avpkt->size; } -AVCodec ff_jacosub_decoder = { +const AVCodec ff_jacosub_decoder = { .name = "jacosub", .long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 63edbcda09..5364631432 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -2578,7 +2578,7 @@ static const AVClass jpeg2000_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_jpeg2000_decoder = { +const AVCodec ff_jpeg2000_decoder = { .name = "jpeg2000", .long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index 92df81600b..bb9ece8d54 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -543,7 +543,7 @@ end: return ret; } -AVCodec ff_jpegls_decoder = { +const AVCodec ff_jpegls_decoder = { .name = "jpegls", .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index bc64288c95..3e73b04c0e 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -431,7 +431,7 @@ static const AVClass jpegls_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_jpegls_encoder = { +const AVCodec ff_jpegls_encoder = { .name = "jpegls", .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index 6f10157b0d..584b4a717c 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -233,7 +233,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_jv_decoder = { +const AVCodec ff_jv_decoder = { .name = "jv", .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c index a6bd9400ac..427f57f416 100644 --- a/libavcodec/kgv1dec.c +++ b/libavcodec/kgv1dec.c @@ -176,7 +176,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_kgv1_decoder = { +const AVCodec ff_kgv1_decoder = { .name = "kgv1", .long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c index 56c1977254..5d3dd4ce63 100644 --- a/libavcodec/kmvc.c +++ b/libavcodec/kmvc.c @@ -404,7 +404,7 @@ static av_cold int decode_init(AVCodecContext * avctx) return 0; } -AVCodec ff_kmvc_decoder = { +const AVCodec ff_kmvc_decoder = { .name = "kmvc", .long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c index d81e55cf4c..69899e423e 100644 --- a/libavcodec/lagarith.c +++ b/libavcodec/lagarith.c @@ -712,7 +712,7 @@ static av_cold int lag_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_lagarith_decoder = { +const AVCodec ff_lagarith_decoder = { .name = "lagarith", .long_name = NULL_IF_CONFIG_SMALL("Lagarith lossless"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index d281733fdd..a47e3bd780 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -638,7 +638,7 @@ static av_cold int decode_end(AVCodecContext *avctx) } #if CONFIG_MSZH_DECODER -AVCodec ff_mszh_decoder = { +const AVCodec ff_mszh_decoder = { .name = "mszh", .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) MSZH"), .type = AVMEDIA_TYPE_VIDEO, @@ -653,7 +653,7 @@ AVCodec ff_mszh_decoder = { #endif #if CONFIG_ZLIB_DECODER -AVCodec ff_zlib_decoder = { +const AVCodec ff_zlib_decoder = { .name = "zlib", .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c index 250cb5625c..9484279771 100644 --- a/libavcodec/lclenc.c +++ b/libavcodec/lclenc.c @@ -160,7 +160,7 @@ static av_cold int encode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_zlib_encoder = { +const AVCodec ff_zlib_encoder = { .name = "zlib", .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c index 4b9125a32c..6e7324a832 100644 --- a/libavcodec/libaomdec.c +++ b/libavcodec/libaomdec.c @@ -243,7 +243,7 @@ static av_cold int av1_init(AVCodecContext *avctx) return aom_init(avctx, &aom_codec_av1_dx_algo); } -AVCodec ff_libaom_av1_decoder = { +const AVCodec ff_libaom_av1_decoder = { .name = "libaom-av1", .long_name = NULL_IF_CONFIG_SMALL("libaom AV1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libaribb24.c b/libavcodec/libaribb24.c index 3a59938451..0766c0079d 100644 --- a/libavcodec/libaribb24.c +++ b/libavcodec/libaribb24.c @@ -380,7 +380,7 @@ static const AVClass aribb24_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libaribb24_decoder = { +const AVCodec ff_libaribb24_decoder = { .name = "libaribb24", .long_name = NULL_IF_CONFIG_SMALL("libaribb24 ARIB STD-B24 caption decoder"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/libcelt_dec.c b/libavcodec/libcelt_dec.c index 75b438b285..c0fb4013c9 100644 --- a/libavcodec/libcelt_dec.c +++ b/libavcodec/libcelt_dec.c @@ -127,7 +127,7 @@ static int libcelt_dec_decode(AVCodecContext *c, void *data, return pkt->size; } -AVCodec ff_libcelt_decoder = { +const AVCodec ff_libcelt_decoder = { .name = "libcelt", .long_name = NULL_IF_CONFIG_SMALL("Xiph CELT decoder using libcelt"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libcodec2.c b/libavcodec/libcodec2.c index 2164f36051..562a616f59 100644 --- a/libavcodec/libcodec2.c +++ b/libavcodec/libcodec2.c @@ -180,7 +180,7 @@ static int libcodec2_encode(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_libcodec2_decoder = { +const AVCodec ff_libcodec2_decoder = { .name = "libcodec2", .long_name = NULL_IF_CONFIG_SMALL("codec2 decoder using libcodec2"), .type = AVMEDIA_TYPE_AUDIO, @@ -196,7 +196,7 @@ AVCodec ff_libcodec2_decoder = { .priv_class = &libcodec2_dec_class, }; -AVCodec ff_libcodec2_encoder = { +const AVCodec ff_libcodec2_encoder = { .name = "libcodec2", .long_name = NULL_IF_CONFIG_SMALL("codec2 encoder using libcodec2"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 90c531fb91..50e6200f5d 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -469,7 +469,7 @@ static const AVClass libdav1d_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libdav1d_decoder = { +const AVCodec ff_libdav1d_decoder = { .name = "libdav1d", .long_name = NULL_IF_CONFIG_SMALL("dav1d AV1 decoder by VideoLAN"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c index 0f18353c93..28cad9c5f7 100644 --- a/libavcodec/libdavs2.c +++ b/libavcodec/libdavs2.c @@ -212,7 +212,7 @@ static int davs2_decode_frame(AVCodecContext *avctx, void *data, return ret == 0 ? buf_size : ret; } -AVCodec ff_libdavs2_decoder = { +const AVCodec ff_libdavs2_decoder = { .name = "libdavs2", .long_name = NULL_IF_CONFIG_SMALL("libdavs2 AVS2-P2/IEEE1857.4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c index 1a86dffe4b..ffa1fdcce3 100644 --- a/libavcodec/libfdk-aacdec.c +++ b/libavcodec/libfdk-aacdec.c @@ -408,7 +408,7 @@ static av_cold void fdk_aac_decode_flush(AVCodecContext *avctx) av_log(avctx, AV_LOG_WARNING, "failed to clear buffer when flushing\n"); } -AVCodec ff_libfdk_aac_decoder = { +const AVCodec ff_libfdk_aac_decoder = { .name = "libfdk_aac", .long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index 6494c11ddc..b848cd8851 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -458,7 +458,7 @@ static const int aac_sample_rates[] = { 24000, 22050, 16000, 12000, 11025, 8000, 0 }; -AVCodec ff_libfdk_aac_encoder = { +const AVCodec ff_libfdk_aac_encoder = { .name = "libfdk_aac", .long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libgsmdec.c b/libavcodec/libgsmdec.c index 1182afae6b..ae4a952d99 100644 --- a/libavcodec/libgsmdec.c +++ b/libavcodec/libgsmdec.c @@ -124,7 +124,7 @@ static void libgsm_flush(AVCodecContext *avctx) { } #if CONFIG_LIBGSM_DECODER -AVCodec ff_libgsm_decoder = { +const AVCodec ff_libgsm_decoder = { .name = "libgsm", .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), .type = AVMEDIA_TYPE_AUDIO, @@ -139,7 +139,7 @@ AVCodec ff_libgsm_decoder = { }; #endif #if CONFIG_LIBGSM_MS_DECODER -AVCodec ff_libgsm_ms_decoder = { +const AVCodec ff_libgsm_ms_decoder = { .name = "libgsm_ms", .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libgsmenc.c b/libavcodec/libgsmenc.c index fdb11c705e..850963e8f6 100644 --- a/libavcodec/libgsmenc.c +++ b/libavcodec/libgsmenc.c @@ -120,7 +120,7 @@ static const AVCodecDefault libgsm_defaults[] = { }; #if CONFIG_LIBGSM_ENCODER -AVCodec ff_libgsm_encoder = { +const AVCodec ff_libgsm_encoder = { .name = "libgsm", .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), .type = AVMEDIA_TYPE_AUDIO, @@ -136,7 +136,7 @@ AVCodec ff_libgsm_encoder = { }; #endif #if CONFIG_LIBGSM_MS_ENCODER -AVCodec ff_libgsm_ms_encoder = { +const AVCodec ff_libgsm_ms_encoder = { .name = "libgsm_ms", .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c index 9c82589918..20a2951850 100644 --- a/libavcodec/libilbc.c +++ b/libavcodec/libilbc.c @@ -116,7 +116,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data, return s->decoder.no_of_bytes; } -AVCodec ff_libilbc_decoder = { +const AVCodec ff_libilbc_decoder = { .name = "libilbc", .long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"), .type = AVMEDIA_TYPE_AUDIO, @@ -198,7 +198,7 @@ static const AVCodecDefault ilbc_encode_defaults[] = { { NULL } }; -AVCodec ff_libilbc_encoder = { +const AVCodec ff_libilbc_encoder = { .name = "libilbc", .long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index 7dca605059..54788e154b 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -314,7 +314,7 @@ static const AVCodecDefault defaults[] = { { NULL }, }; -AVCodec ff_libkvazaar_encoder = { +const AVCodec ff_libkvazaar_encoder = { .name = "libkvazaar", .long_name = NULL_IF_CONFIG_SMALL("libkvazaar H.265 / HEVC"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index 2beb28e569..fe4b50257f 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -327,7 +327,7 @@ static const int libmp3lame_sample_rates[] = { 44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000, 0 }; -AVCodec ff_libmp3lame_encoder = { +const AVCodec ff_libmp3lame_encoder = { .name = "libmp3lame", .long_name = NULL_IF_CONFIG_SMALL("libmp3lame MP3 (MPEG audio layer 3)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c index f23bb48d5b..e88431ba9f 100644 --- a/libavcodec/libopencore-amr.c +++ b/libavcodec/libopencore-amr.c @@ -130,7 +130,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, return packet_size; } -AVCodec ff_libopencore_amrnb_decoder = { +const AVCodec ff_libopencore_amrnb_decoder = { .name = "libopencore_amrnb", .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"), .type = AVMEDIA_TYPE_AUDIO, @@ -285,7 +285,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_libopencore_amrnb_encoder = { +const AVCodec ff_libopencore_amrnb_encoder = { .name = "libopencore_amrnb", .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"), .type = AVMEDIA_TYPE_AUDIO, @@ -370,7 +370,7 @@ static int amr_wb_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_libopencore_amrwb_decoder = { +const AVCodec ff_libopencore_amrwb_decoder = { .name = "libopencore_amrwb", .long_name = NULL_IF_CONFIG_SMALL("OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c index 832bfc49ef..ea70a8e143 100644 --- a/libavcodec/libopenh264dec.c +++ b/libavcodec/libopenh264dec.c @@ -155,7 +155,7 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_libopenh264_decoder = { +const AVCodec ff_libopenh264_decoder = { .name = "libopenh264", .long_name = NULL_IF_CONFIG_SMALL("OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 608fa59cdd..54babc3e97 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -428,7 +428,7 @@ static const AVCodecDefault svc_enc_defaults[] = { { NULL }, }; -AVCodec ff_libopenh264_encoder = { +const AVCodec ff_libopenh264_encoder = { .name = "libopenh264", .long_name = NULL_IF_CONFIG_SMALL("OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c index 344c5ba5a3..8982d21be4 100644 --- a/libavcodec/libopenjpegdec.c +++ b/libavcodec/libopenjpegdec.c @@ -502,7 +502,7 @@ static const AVClass openjpeg_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libopenjpeg_decoder = { +const AVCodec ff_libopenjpeg_decoder = { .name = "libopenjpeg", .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c index e4641235f5..14808a7591 100644 --- a/libavcodec/libopenjpegenc.c +++ b/libavcodec/libopenjpegenc.c @@ -755,7 +755,7 @@ static const AVClass openjpeg_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libopenjpeg_encoder = { +const AVCodec ff_libopenjpeg_encoder = { .name = "libopenjpeg", .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c index 082a431c6c..86ef715205 100644 --- a/libavcodec/libopusdec.c +++ b/libavcodec/libopusdec.c @@ -225,7 +225,7 @@ static const AVClass libopusdec_class = { }; -AVCodec ff_libopus_decoder = { +const AVCodec ff_libopus_decoder = { .name = "libopus", .long_name = NULL_IF_CONFIG_SMALL("libopus Opus"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c index 70d17f802b..8c99b26ddf 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -581,7 +581,7 @@ static const int libopus_sample_rates[] = { 48000, 24000, 16000, 12000, 8000, 0, }; -AVCodec ff_libopus_encoder = { +const AVCodec ff_libopus_encoder = { .name = "libopus", .long_name = NULL_IF_CONFIG_SMALL("libopus Opus"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c index 37c3007d81..619a4d0b36 100644 --- a/libavcodec/librav1e.c +++ b/libavcodec/librav1e.c @@ -612,7 +612,7 @@ static const AVClass class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_librav1e_encoder = { +const AVCodec ff_librav1e_encoder = { .name = "librav1e", .long_name = NULL_IF_CONFIG_SMALL("librav1e AV1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/librsvgdec.c b/libavcodec/librsvgdec.c index e9a181d092..2895bbf28b 100644 --- a/libavcodec/librsvgdec.c +++ b/libavcodec/librsvgdec.c @@ -117,7 +117,7 @@ static const AVClass librsvg_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_librsvg_decoder = { +const AVCodec ff_librsvg_decoder = { .name = "librsvg", .long_name = NULL_IF_CONFIG_SMALL("Librsvg rasterizer"), .priv_class = &librsvg_decoder_class, diff --git a/libavcodec/libshine.c b/libavcodec/libshine.c index 7056fcd2e3..4a9fc617f0 100644 --- a/libavcodec/libshine.c +++ b/libavcodec/libshine.c @@ -130,7 +130,7 @@ static const int libshine_sample_rates[] = { 44100, 48000, 32000, 0 }; -AVCodec ff_libshine_encoder = { +const AVCodec ff_libshine_encoder = { .name = "libshine", .long_name = NULL_IF_CONFIG_SMALL("libshine MP3 (MPEG audio layer 3)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c index b02582b380..6f032907fc 100644 --- a/libavcodec/libspeexdec.c +++ b/libavcodec/libspeexdec.c @@ -189,7 +189,7 @@ static av_cold void libspeex_decode_flush(AVCodecContext *avctx) speex_bits_reset(&s->bits); } -AVCodec ff_libspeex_decoder = { +const AVCodec ff_libspeex_decoder = { .name = "libspeex", .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c index 6a37dbc76c..c96e2d87fd 100644 --- a/libavcodec/libspeexenc.c +++ b/libavcodec/libspeexenc.c @@ -347,7 +347,7 @@ static const AVCodecDefault defaults[] = { { NULL }, }; -AVCodec ff_libspeex_encoder = { +const AVCodec ff_libspeex_encoder = { .name = "libspeex", .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index cfd93a2484..fabc4e6428 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -551,7 +551,7 @@ static const AVCodecDefault eb_enc_defaults[] = { { NULL }, }; -AVCodec ff_libsvtav1_encoder = { +const AVCodec ff_libsvtav1_encoder = { .name = "libsvtav1", .long_name = NULL_IF_CONFIG_SMALL("SVT-AV1(Scalable Video Technology for AV1) encoder"), .priv_data_size = sizeof(SvtContext), diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index a067fa3344..f26ab501f4 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -367,7 +367,7 @@ static av_cold int encode_close(AVCodecContext* avc_context) } /** AVCodec struct exposed to libavcodec */ -AVCodec ff_libtheora_encoder = { +const AVCodec ff_libtheora_encoder = { .name = "libtheora", .long_name = NULL_IF_CONFIG_SMALL("libtheora Theora"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libtwolame.c b/libavcodec/libtwolame.c index 5ceb3d9f3f..e28141022d 100644 --- a/libavcodec/libtwolame.c +++ b/libavcodec/libtwolame.c @@ -206,7 +206,7 @@ static const int twolame_samplerates[] = { 16000, 22050, 24000, 32000, 44100, 48000, 0 }; -AVCodec ff_libtwolame_encoder = { +const AVCodec ff_libtwolame_encoder = { .name = "libtwolame", .long_name = NULL_IF_CONFIG_SMALL("libtwolame MP2 (MPEG audio layer 2)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libuavs3d.c b/libavcodec/libuavs3d.c index be03da39e2..f7e458b356 100644 --- a/libavcodec/libuavs3d.c +++ b/libavcodec/libuavs3d.c @@ -244,7 +244,7 @@ static int libuavs3d_decode_frame(AVCodecContext *avctx, void *data, int *got_fr return buf_ptr - buf; } -AVCodec ff_libuavs3d_decoder = { +const AVCodec ff_libuavs3d_decoder = { .name = "libuavs3d", .long_name = NULL_IF_CONFIG_SMALL("libuavs3d AVS3-P2/IEEE1857.10"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c index 77d0ccef15..e48dc8a5b7 100644 --- a/libavcodec/libvo-amrwbenc.c +++ b/libavcodec/libvo-amrwbenc.c @@ -139,7 +139,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_libvo_amrwbenc_encoder = { +const AVCodec ff_libvo_amrwbenc_encoder = { .name = "libvo_amrwbenc", .long_name = NULL_IF_CONFIG_SMALL("Android VisualOn AMR-WB " "(Adaptive Multi-Rate Wide-Band)"), diff --git a/libavcodec/libvorbisdec.c b/libavcodec/libvorbisdec.c index ebb0fcdd86..5686aaf096 100644 --- a/libavcodec/libvorbisdec.c +++ b/libavcodec/libvorbisdec.c @@ -208,7 +208,7 @@ static int oggvorbis_decode_close(AVCodecContext *avccontext) { } -AVCodec ff_libvorbis_decoder = { +const AVCodec ff_libvorbis_decoder = { .name = "libvorbis", .long_name = NULL_IF_CONFIG_SMALL("libvorbis"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c index bf94764954..8999a18bf4 100644 --- a/libavcodec/libvorbisenc.c +++ b/libavcodec/libvorbisenc.c @@ -374,7 +374,7 @@ static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_libvorbis_encoder = { +const AVCodec ff_libvorbis_encoder = { .name = "libvorbis", .long_name = NULL_IF_CONFIG_SMALL("libvorbis"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c index 67d56fb05e..f9b4c9f427 100644 --- a/libavcodec/libvpxdec.c +++ b/libavcodec/libvpxdec.c @@ -352,7 +352,7 @@ static av_cold int vp8_init(AVCodecContext *avctx) return vpx_init(avctx, &ctx->decoder, &vpx_codec_vp8_dx_algo); } -AVCodec ff_libvpx_vp8_decoder = { +const AVCodec ff_libvpx_vp8_decoder = { .name = "libvpx", .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index bcfbbf3e76..8173af5dce 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -1825,7 +1825,7 @@ static const AVClass class_vp8 = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libvpx_vp8_encoder = { +const AVCodec ff_libvpx_vp8_encoder = { .name = "libvpx", .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c index 48f45b6320..2e5b811455 100644 --- a/libavcodec/libwebpenc.c +++ b/libavcodec/libwebpenc.c @@ -93,7 +93,7 @@ static const AVClass class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libwebp_encoder = { +const AVCodec ff_libwebp_encoder = { .name = "libwebp", .long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libwebpenc_animencoder.c b/libavcodec/libwebpenc_animencoder.c index 835891d890..5f0c6ba194 100644 --- a/libavcodec/libwebpenc_animencoder.c +++ b/libavcodec/libwebpenc_animencoder.c @@ -131,7 +131,7 @@ static const AVClass class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libwebp_anim_encoder = { +const AVCodec ff_libwebp_anim_encoder = { .name = "libwebp_anim", .long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 23f7ad897b..2bed61f91e 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -1140,6 +1140,9 @@ static const AVClass x264_class = { .version = LIBAVUTIL_VERSION_INT, }; +#if X264_BUILD >= 153 +const +#endif AVCodec ff_libx264_encoder = { .name = "libx264", .long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), @@ -1176,7 +1179,7 @@ static const AVClass rgbclass = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libx264rgb_encoder = { +const AVCodec ff_libx264rgb_encoder = { .name = "libx264rgb", .long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB"), .type = AVMEDIA_TYPE_VIDEO, @@ -1207,7 +1210,7 @@ static const AVClass X262_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libx262_encoder = { +const AVCodec ff_libx262_encoder = { .name = "libx262", .long_name = NULL_IF_CONFIG_SMALL("libx262 MPEG2VIDEO"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index b0b6b247b6..3135e221c7 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -417,7 +417,7 @@ static const AVCodecDefault xavs_defaults[] = { { NULL }, }; -AVCodec ff_libxavs_encoder = { +const AVCodec ff_libxavs_encoder = { .name = "libxavs", .long_name = NULL_IF_CONFIG_SMALL("libxavs Chinese AVS (Audio Video Standard)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c index 2a4a3e36bd..99fe0e3286 100644 --- a/libavcodec/libxavs2.c +++ b/libavcodec/libxavs2.c @@ -285,7 +285,7 @@ static const AVCodecDefault xavs2_defaults[] = { { NULL }, }; -AVCodec ff_libxavs2_encoder = { +const AVCodec ff_libxavs2_encoder = { .name = "libxavs2", .long_name = NULL_IF_CONFIG_SMALL("libxavs2 AVS2-P2/IEEE1857.4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index 2bc32bddb1..7ba709b1bc 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -899,7 +899,7 @@ static const AVClass xvid_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libxvid_encoder = { +const AVCodec ff_libxvid_encoder = { .name = "libxvid", .long_name = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c index e056ea5ef0..1073d6a0bd 100644 --- a/libavcodec/libzvbi-teletextdec.c +++ b/libavcodec/libzvbi-teletextdec.c @@ -810,7 +810,7 @@ static const AVClass teletext_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_libzvbi_teletext_decoder = { +const AVCodec ff_libzvbi_teletext_decoder = { .name = "libzvbi_teletextdec", .long_name = NULL_IF_CONFIG_SMALL("Libzvbi DVB teletext decoder"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index 788fd4260b..80b5e799ed 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -321,7 +321,7 @@ static const AVClass ljpeg_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_ljpeg_encoder = { +const AVCodec ff_ljpeg_encoder = { .name = "ljpeg", .long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/loco.c b/libavcodec/loco.c index 99e3a1d021..ebd81f43f2 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -337,7 +337,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_loco_decoder = { +const AVCodec ff_loco_decoder = { .name = "loco", .long_name = NULL_IF_CONFIG_SMALL("LOCO"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/lscrdec.c b/libavcodec/lscrdec.c index 042da84bf9..18f46bd27c 100644 --- a/libavcodec/lscrdec.c +++ b/libavcodec/lscrdec.c @@ -264,7 +264,7 @@ static void lscr_decode_flush(AVCodecContext *avctx) av_frame_unref(s->last_picture); } -AVCodec ff_lscr_decoder = { +const AVCodec ff_lscr_decoder = { .name = "lscr", .long_name = NULL_IF_CONFIG_SMALL("LEAD Screen Capture"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/m101.c b/libavcodec/m101.c index 70f1da4f45..795a4fba63 100644 --- a/libavcodec/m101.c +++ b/libavcodec/m101.c @@ -105,7 +105,7 @@ static int m101_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return avpkt->size; } -AVCodec ff_m101_decoder = { +const AVCodec ff_m101_decoder = { .name = "m101", .long_name = NULL_IF_CONFIG_SMALL("Matrox Uncompressed SD"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mace.c b/libavcodec/mace.c index e332a72d6d..aa1f8e2de5 100644 --- a/libavcodec/mace.c +++ b/libavcodec/mace.c @@ -284,7 +284,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_mace3_decoder = { +const AVCodec ff_mace3_decoder = { .name = "mace3", .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 3:1"), .type = AVMEDIA_TYPE_AUDIO, @@ -297,7 +297,7 @@ AVCodec ff_mace3_decoder = { AV_SAMPLE_FMT_NONE }, }; -AVCodec ff_mace6_decoder = { +const AVCodec ff_mace6_decoder = { .name = "mace6", .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c index 13cb346119..594196063b 100644 --- a/libavcodec/magicyuv.c +++ b/libavcodec/magicyuv.c @@ -694,7 +694,7 @@ static av_cold int magy_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_magicyuv_decoder = { +const AVCodec ff_magicyuv_decoder = { .name = "magicyuv", .long_name = NULL_IF_CONFIG_SMALL("MagicYUV video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/magicyuvenc.c b/libavcodec/magicyuvenc.c index 7ec3c963bf..7edaf1b45e 100644 --- a/libavcodec/magicyuvenc.c +++ b/libavcodec/magicyuvenc.c @@ -556,7 +556,7 @@ static const AVClass magicyuv_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_magicyuv_encoder = { +const AVCodec ff_magicyuv_encoder = { .name = "magicyuv", .long_name = NULL_IF_CONFIG_SMALL("MagicYUV video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index 101e558336..39efed69b1 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -250,7 +250,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_mdec_decoder = { +const AVCodec ff_mdec_decoder = { .name = "mdec", .long_name = NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c index ad592d14a3..1cebb3d76d 100644 --- a/libavcodec/mediacodecdec.c +++ b/libavcodec/mediacodecdec.c @@ -522,7 +522,7 @@ static const AVClass ff_##short_name##_mediacodec_dec_class = { \ #define DECLARE_MEDIACODEC_VDEC(short_name, full_name, codec_id, bsf) \ DECLARE_MEDIACODEC_VCLASS(short_name) \ -AVCodec ff_##short_name##_mediacodec_decoder = { \ +const AVCodec ff_ ## short_name ## _mediacodec_decoder = { \ .name = #short_name "_mediacodec", \ .long_name = NULL_IF_CONFIG_SMALL(full_name " Android MediaCodec decoder"), \ .type = AVMEDIA_TYPE_VIDEO, \ diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c index 27cf1dd83f..be47510d7a 100644 --- a/libavcodec/metasound.c +++ b/libavcodec/metasound.c @@ -370,7 +370,7 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx) return ff_twinvq_decode_init(avctx); } -AVCodec ff_metasound_decoder = { +const AVCodec ff_metasound_decoder = { .name = "metasound", .long_name = NULL_IF_CONFIG_SMALL("Voxware MetaSound"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c index d70e49351a..26f1c8057f 100644 --- a/libavcodec/mfenc.c +++ b/libavcodec/mfenc.c @@ -1152,7 +1152,7 @@ static int mf_close(AVCodecContext *avctx) .option = OPTS, \ .version = LIBAVUTIL_VERSION_INT, \ }; \ - AVCodec ff_ ## NAME ## _mf_encoder = { \ + const AVCodec ff_ ## NAME ## _mf_encoder = { \ .priv_class = &ff_ ## NAME ## _mf_encoder_class, \ .name = #NAME "_mf", \ .long_name = NULL_IF_CONFIG_SMALL(#ID " via MediaFoundation"), \ diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c index dad0ec8a22..777445997b 100644 --- a/libavcodec/microdvddec.c +++ b/libavcodec/microdvddec.c @@ -368,7 +368,7 @@ static int microdvd_init(AVCodecContext *avctx) alignment); } -AVCodec ff_microdvd_decoder = { +const AVCodec ff_microdvd_decoder = { .name = "microdvd", .long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/midivid.c b/libavcodec/midivid.c index 2200440e2c..69f9f4d0ec 100644 --- a/libavcodec/midivid.c +++ b/libavcodec/midivid.c @@ -277,7 +277,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_mvdv_decoder = { +const AVCodec ff_mvdv_decoder = { .name = "mvdv", .long_name = NULL_IF_CONFIG_SMALL("MidiVid VQ"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 407faa02da..ade973d860 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -435,7 +435,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_mimic_decoder = { +const AVCodec ff_mimic_decoder = { .name = "mimic", .long_name = NULL_IF_CONFIG_SMALL("Mimic"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c index 7666674908..87eebb8771 100644 --- a/libavcodec/mjpegbdec.c +++ b/libavcodec/mjpegbdec.c @@ -152,7 +152,7 @@ read_header: return buf_size; } -AVCodec ff_mjpegb_decoder = { +const AVCodec ff_mjpegb_decoder = { .name = "mjpegb", .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index f3d9e99aab..d53e72dc72 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2945,7 +2945,7 @@ static const AVClass mjpegdec_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_mjpeg_decoder = { +const AVCodec ff_mjpeg_decoder = { .name = "mjpeg", .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), .type = AVMEDIA_TYPE_VIDEO, @@ -2973,7 +2973,7 @@ AVCodec ff_mjpeg_decoder = { }; #endif #if CONFIG_THP_DECODER -AVCodec ff_thp_decoder = { +const AVCodec ff_thp_decoder = { .name = "thp", .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"), .type = AVMEDIA_TYPE_VIDEO, @@ -2991,7 +2991,7 @@ AVCodec ff_thp_decoder = { #endif #if CONFIG_SMVJPEG_DECODER -AVCodec ff_smvjpeg_decoder = { +const AVCodec ff_smvjpeg_decoder = { .name = "smvjpeg", .long_name = NULL_IF_CONFIG_SMALL("SMV JPEG"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index b355f97f14..0ade66bc5f 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -610,7 +610,7 @@ static const AVClass mjpeg_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_mjpeg_encoder = { +const AVCodec ff_mjpeg_encoder = { .name = "mjpeg", .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), .type = AVMEDIA_TYPE_VIDEO, @@ -639,7 +639,7 @@ static const AVClass amv_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_amv_encoder = { +const AVCodec ff_amv_encoder = { .name = "amv", .long_name = NULL_IF_CONFIG_SMALL("AMV Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 0c30034dd4..e4992550ee 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -1331,7 +1331,7 @@ error: } #if CONFIG_MLP_DECODER -AVCodec ff_mlp_decoder = { +const AVCodec ff_mlp_decoder = { .name = "mlp", .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"), .type = AVMEDIA_TYPE_AUDIO, @@ -1344,7 +1344,7 @@ AVCodec ff_mlp_decoder = { }; #endif #if CONFIG_TRUEHD_DECODER -AVCodec ff_truehd_decoder = { +const AVCodec ff_truehd_decoder = { .name = "truehd", .long_name = NULL_IF_CONFIG_SMALL("TrueHD"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index 8684056cab..a66965f2bf 100644 --- a/libavcodec/mlpenc.c +++ b/libavcodec/mlpenc.c @@ -2364,7 +2364,7 @@ static av_cold int mlp_encode_close(AVCodecContext *avctx) } #if CONFIG_MLP_ENCODER -AVCodec ff_mlp_encoder = { +const AVCodec ff_mlp_encoder = { .name ="mlp", .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"), .type = AVMEDIA_TYPE_AUDIO, @@ -2381,7 +2381,7 @@ AVCodec ff_mlp_encoder = { }; #endif #if CONFIG_TRUEHD_ENCODER -AVCodec ff_truehd_encoder = { +const AVCodec ff_truehd_encoder = { .name ="truehd", .long_name = NULL_IF_CONFIG_SMALL("TrueHD"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index db9e4f9589..8c7d749742 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -825,7 +825,7 @@ static const AVOption options[]={ #define FFMMAL_DEC(NAME, ID) \ FFMMAL_DEC_CLASS(NAME) \ - AVCodec ff_##NAME##_mmal_decoder = { \ + const AVCodec ff_##NAME##_mmal_decoder = { \ .name = #NAME "_mmal", \ .long_name = NULL_IF_CONFIG_SMALL(#NAME " (mmal)"), \ .type = AVMEDIA_TYPE_VIDEO, \ diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index 7f650be80e..11a819dc6d 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -238,7 +238,7 @@ static av_cold int mm_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_mmvideo_decoder = { +const AVCodec ff_mmvideo_decoder = { .name = "mmvideo", .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index bf47a5bc41..6ea1c3eefa 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -1340,7 +1340,7 @@ static av_cold int mobiclip_close(AVCodecContext *avctx) return 0; } -AVCodec ff_mobiclip_decoder = { +const AVCodec ff_mobiclip_decoder = { .name = "mobiclip", .long_name = NULL_IF_CONFIG_SMALL("MobiClip Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index b08a2f624b..1896330fe1 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -345,7 +345,7 @@ end: return buf_size; } -AVCodec ff_motionpixels_decoder = { +const AVCodec ff_motionpixels_decoder = { .name = "motionpixels", .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c index 7adc16d262..873c1350a4 100644 --- a/libavcodec/movtextdec.c +++ b/libavcodec/movtextdec.c @@ -582,7 +582,7 @@ static const AVClass mov_text_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_movtext_decoder = { +const AVCodec ff_movtext_decoder = { .name = "mov_text", .long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c index 3c166639ba..4e782c7856 100644 --- a/libavcodec/movtextenc.c +++ b/libavcodec/movtextenc.c @@ -708,7 +708,7 @@ static const AVClass mov_text_encoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_movtext_encoder = { +const AVCodec ff_movtext_encoder = { .name = "mov_text", .long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index af12a6fd8e..c1a63203d6 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -308,7 +308,7 @@ static av_cold int mpc7_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_mpc7_decoder = { +const AVCodec ff_mpc7_decoder = { .name = "mpc7", .long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index e9919aea62..ae07093338 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -383,7 +383,7 @@ static av_cold void mpc8_decode_flush(AVCodecContext *avctx) c->cur_frame = 0; } -AVCodec ff_mpc8_decoder = { +const AVCodec ff_mpc8_decoder = { .name = "mpc8", .long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index c4d89e10ce..b27ed5bd6d 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2878,7 +2878,7 @@ static av_cold int mpeg_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_mpeg1video_decoder = { +const AVCodec ff_mpeg1video_decoder = { .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), .type = AVMEDIA_TYPE_VIDEO, @@ -2912,7 +2912,7 @@ AVCodec ff_mpeg1video_decoder = { }, }; -AVCodec ff_mpeg2video_decoder = { +const AVCodec ff_mpeg2video_decoder = { .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), .type = AVMEDIA_TYPE_VIDEO, @@ -2959,7 +2959,7 @@ AVCodec ff_mpeg2video_decoder = { }; //legacy decoder -AVCodec ff_mpegvideo_decoder = { +const AVCodec ff_mpegvideo_decoder = { .name = "mpegvideo", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), .type = AVMEDIA_TYPE_VIDEO, @@ -3121,7 +3121,7 @@ static av_cold int ipu_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_ipu_decoder = { +const AVCodec ff_ipu_decoder = { .name = "ipu", .long_name = NULL_IF_CONFIG_SMALL("IPU Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 432d27e1f6..2fb2232f3c 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -1199,7 +1199,7 @@ static const AVClass mpeg ## x ## _class = { \ mpeg12_class(1) mpeg12_class(2) -AVCodec ff_mpeg1video_encoder = { +const AVCodec ff_mpeg1video_encoder = { .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), .type = AVMEDIA_TYPE_VIDEO, @@ -1216,7 +1216,7 @@ AVCodec ff_mpeg1video_encoder = { .priv_class = &mpeg1_class, }; -AVCodec ff_mpeg2video_encoder = { +const AVCodec ff_mpeg2video_encoder = { .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index de66fe8b83..6543750d85 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -3578,7 +3578,7 @@ static const AVClass mpeg4_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_mpeg4_decoder = { +const AVCodec ff_mpeg4_decoder = { .name = "mpeg4", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 7145bfe8ce..f9aa3b2c5e 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1394,7 +1394,7 @@ static const AVClass mpeg4enc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_mpeg4_encoder = { +const AVCodec ff_mpeg4_encoder = { .name = "mpeg4", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mpegaudiodec_fixed.c b/libavcodec/mpegaudiodec_fixed.c index a3c8ddc21e..f9f24330fd 100644 --- a/libavcodec/mpegaudiodec_fixed.c +++ b/libavcodec/mpegaudiodec_fixed.c @@ -59,7 +59,7 @@ static const int32_t csa_table[8][4] = { #include "mpegaudiodec_template.c" #if CONFIG_MP1_DECODER -AVCodec ff_mp1_decoder = { +const AVCodec ff_mp1_decoder = { .name = "mp1", .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), .type = AVMEDIA_TYPE_AUDIO, @@ -77,7 +77,7 @@ AVCodec ff_mp1_decoder = { }; #endif #if CONFIG_MP2_DECODER -AVCodec ff_mp2_decoder = { +const AVCodec ff_mp2_decoder = { .name = "mp2", .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), .type = AVMEDIA_TYPE_AUDIO, @@ -95,7 +95,7 @@ AVCodec ff_mp2_decoder = { }; #endif #if CONFIG_MP3_DECODER -AVCodec ff_mp3_decoder = { +const AVCodec ff_mp3_decoder = { .name = "mp3", .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), .type = AVMEDIA_TYPE_AUDIO, @@ -113,7 +113,7 @@ AVCodec ff_mp3_decoder = { }; #endif #if CONFIG_MP3ADU_DECODER -AVCodec ff_mp3adu_decoder = { +const AVCodec ff_mp3adu_decoder = { .name = "mp3adu", .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), .type = AVMEDIA_TYPE_AUDIO, @@ -131,7 +131,7 @@ AVCodec ff_mp3adu_decoder = { }; #endif #if CONFIG_MP3ON4_DECODER -AVCodec ff_mp3on4_decoder = { +const AVCodec ff_mp3on4_decoder = { .name = "mp3on4", .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c index 3ab7651d5b..c7b7839997 100644 --- a/libavcodec/mpegaudiodec_float.c +++ b/libavcodec/mpegaudiodec_float.c @@ -72,7 +72,7 @@ static const float csa_table[8][4] = { #include "mpegaudiodec_template.c" #if CONFIG_MP1FLOAT_DECODER -AVCodec ff_mp1float_decoder = { +const AVCodec ff_mp1float_decoder = { .name = "mp1float", .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), .type = AVMEDIA_TYPE_AUDIO, @@ -90,7 +90,7 @@ AVCodec ff_mp1float_decoder = { }; #endif #if CONFIG_MP2FLOAT_DECODER -AVCodec ff_mp2float_decoder = { +const AVCodec ff_mp2float_decoder = { .name = "mp2float", .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), .type = AVMEDIA_TYPE_AUDIO, @@ -108,7 +108,7 @@ AVCodec ff_mp2float_decoder = { }; #endif #if CONFIG_MP3FLOAT_DECODER -AVCodec ff_mp3float_decoder = { +const AVCodec ff_mp3float_decoder = { .name = "mp3float", .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), .type = AVMEDIA_TYPE_AUDIO, @@ -126,7 +126,7 @@ AVCodec ff_mp3float_decoder = { }; #endif #if CONFIG_MP3ADUFLOAT_DECODER -AVCodec ff_mp3adufloat_decoder = { +const AVCodec ff_mp3adufloat_decoder = { .name = "mp3adufloat", .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), .type = AVMEDIA_TYPE_AUDIO, @@ -144,7 +144,7 @@ AVCodec ff_mp3adufloat_decoder = { }; #endif #if CONFIG_MP3ON4FLOAT_DECODER -AVCodec ff_mp3on4float_decoder = { +const AVCodec ff_mp3on4float_decoder = { .name = "mp3on4float", .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mpegaudioenc_fixed.c b/libavcodec/mpegaudioenc_fixed.c index 022b6fedd3..1504834925 100644 --- a/libavcodec/mpegaudioenc_fixed.c +++ b/libavcodec/mpegaudioenc_fixed.c @@ -21,7 +21,7 @@ #include "mpegaudioenc_template.c" -AVCodec ff_mp2fixed_encoder = { +const AVCodec ff_mp2fixed_encoder = { .name = "mp2fixed", .long_name = NULL_IF_CONFIG_SMALL("MP2 fixed point (MPEG audio layer 2)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mpegaudioenc_float.c b/libavcodec/mpegaudioenc_float.c index 4d4ab2d7fa..22c5f916b2 100644 --- a/libavcodec/mpegaudioenc_float.c +++ b/libavcodec/mpegaudioenc_float.c @@ -22,7 +22,7 @@ #define USE_FLOATS 1 #include "mpegaudioenc_template.c" -AVCodec ff_mp2_encoder = { +const AVCodec ff_mp2_encoder = { .name = "mp2", .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index f50f6cdeff..0f31d7be96 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -4598,7 +4598,7 @@ static const AVClass h263_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h263_encoder = { +const AVCodec ff_h263_encoder = { .name = "h263", .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"), .type = AVMEDIA_TYPE_VIDEO, @@ -4633,7 +4633,7 @@ static const AVClass h263p_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h263p_encoder = { +const AVCodec ff_h263p_encoder = { .name = "h263p", .long_name = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), .type = AVMEDIA_TYPE_VIDEO, @@ -4655,7 +4655,7 @@ static const AVClass msmpeg4v2_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_msmpeg4v2_encoder = { +const AVCodec ff_msmpeg4v2_encoder = { .name = "msmpeg4v2", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), .type = AVMEDIA_TYPE_VIDEO, @@ -4676,7 +4676,7 @@ static const AVClass msmpeg4v3_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_msmpeg4v3_encoder = { +const AVCodec ff_msmpeg4v3_encoder = { .name = "msmpeg4", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), .type = AVMEDIA_TYPE_VIDEO, @@ -4697,7 +4697,7 @@ static const AVClass wmv1_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_wmv1_encoder = { +const AVCodec ff_wmv1_encoder = { .name = "wmv1", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mpl2dec.c b/libavcodec/mpl2dec.c index 409e4b3708..3ad094b97a 100644 --- a/libavcodec/mpl2dec.c +++ b/libavcodec/mpl2dec.c @@ -81,7 +81,7 @@ static int mpl2_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_mpl2_decoder = { +const AVCodec ff_mpl2_decoder = { .name = "mpl2", .long_name = NULL_IF_CONFIG_SMALL("MPL2 subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c index e685b2a32b..027eb16085 100644 --- a/libavcodec/mscc.c +++ b/libavcodec/mscc.c @@ -252,7 +252,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_mscc_decoder = { +const AVCodec ff_mscc_decoder = { .name = "mscc", .long_name = NULL_IF_CONFIG_SMALL("Mandsoft Screen Capture Codec"), .type = AVMEDIA_TYPE_VIDEO, @@ -265,7 +265,7 @@ AVCodec ff_mscc_decoder = { .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; -AVCodec ff_srgc_decoder = { +const AVCodec ff_srgc_decoder = { .name = "srgc", .long_name = NULL_IF_CONFIG_SMALL("Screen Recorder Gold Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 8fcd5b94cd..5c893a0141 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -858,7 +858,7 @@ void ff_msmpeg4_decode_motion(MpegEncContext *s, int *mx_ptr, int *my_ptr) *my_ptr = my; } -AVCodec ff_msmpeg4v1_decoder = { +const AVCodec ff_msmpeg4v1_decoder = { .name = "msmpeg4v1", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"), .type = AVMEDIA_TYPE_VIDEO, @@ -876,7 +876,7 @@ AVCodec ff_msmpeg4v1_decoder = { }, }; -AVCodec ff_msmpeg4v2_decoder = { +const AVCodec ff_msmpeg4v2_decoder = { .name = "msmpeg4v2", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), .type = AVMEDIA_TYPE_VIDEO, @@ -894,7 +894,7 @@ AVCodec ff_msmpeg4v2_decoder = { }, }; -AVCodec ff_msmpeg4v3_decoder = { +const AVCodec ff_msmpeg4v3_decoder = { .name = "msmpeg4", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), .type = AVMEDIA_TYPE_VIDEO, @@ -912,7 +912,7 @@ AVCodec ff_msmpeg4v3_decoder = { }, }; -AVCodec ff_wmv1_decoder = { +const AVCodec ff_wmv1_decoder = { .name = "wmv1", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/msp2dec.c b/libavcodec/msp2dec.c index 16c5ac6f02..8772bff6bc 100644 --- a/libavcodec/msp2dec.c +++ b/libavcodec/msp2dec.c @@ -93,7 +93,7 @@ static int msp2_decode_frame(AVCodecContext *avctx, return buf_size; } -AVCodec ff_msp2_decoder = { +const AVCodec ff_msp2_decoder = { .name = "msp2", .long_name = NULL_IF_CONFIG_SMALL("Microsoft Paint (MSP) version 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index 42c8f48373..bbac2a3ffb 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -159,7 +159,7 @@ static av_cold int msrle_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_msrle_decoder = { +const AVCodec ff_msrle_decoder = { .name = "msrle", .long_name = NULL_IF_CONFIG_SMALL("Microsoft RLE"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c index 7af8024d63..10c2c34eb4 100644 --- a/libavcodec/mss1.c +++ b/libavcodec/mss1.c @@ -218,7 +218,7 @@ static av_cold int mss1_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_mss1_decoder = { +const AVCodec ff_mss1_decoder = { .name = "mss1", .long_name = NULL_IF_CONFIG_SMALL("MS Screen 1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index a27fae7559..d7a19f6ad2 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -845,7 +845,7 @@ static av_cold int mss2_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_mss2_decoder = { +const AVCodec ff_mss2_decoder = { .name = "mss2", .long_name = NULL_IF_CONFIG_SMALL("MS Windows Media Video V9 Screen"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mss3.c b/libavcodec/mss3.c index 74f4b5e671..0ce7c96121 100644 --- a/libavcodec/mss3.c +++ b/libavcodec/mss3.c @@ -859,7 +859,7 @@ static av_cold int mss3_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_msa1_decoder = { +const AVCodec ff_msa1_decoder = { .name = "msa1", .long_name = NULL_IF_CONFIG_SMALL("MS ATC Screen"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index 7f11f30dc8..6c44c76c50 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -604,7 +604,7 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_mts2_decoder = { +const AVCodec ff_mts2_decoder = { .name = "mts2", .long_name = NULL_IF_CONFIG_SMALL("MS Expression Encoder Screen"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index cfd51cfd67..99965b04a2 100644 --- a/libavcodec/msvideo1.c +++ b/libavcodec/msvideo1.c @@ -341,7 +341,7 @@ static av_cold int msvideo1_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_msvideo1_decoder = { +const AVCodec ff_msvideo1_decoder = { .name = "msvideo1", .long_name = NULL_IF_CONFIG_SMALL("Microsoft Video 1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/msvideo1enc.c b/libavcodec/msvideo1enc.c index b6ae92b2ac..34c8d47c2b 100644 --- a/libavcodec/msvideo1enc.c +++ b/libavcodec/msvideo1enc.c @@ -292,7 +292,7 @@ static av_cold int encode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_msvideo1_encoder = { +const AVCodec ff_msvideo1_encoder = { .name = "msvideo1", .long_name = NULL_IF_CONFIG_SMALL("Microsoft Video-1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mv30.c b/libavcodec/mv30.c index 7ae264e0f0..21f52679c0 100644 --- a/libavcodec/mv30.c +++ b/libavcodec/mv30.c @@ -702,7 +702,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_mv30_decoder = { +const AVCodec ff_mv30_decoder = { .name = "mv30", .long_name = NULL_IF_CONFIG_SMALL("MidiVid 3.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mvcdec.c b/libavcodec/mvcdec.c index e507674c22..84cdae2123 100644 --- a/libavcodec/mvcdec.c +++ b/libavcodec/mvcdec.c @@ -253,7 +253,7 @@ static int mvc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } #if CONFIG_MVC1_DECODER -AVCodec ff_mvc1_decoder = { +const AVCodec ff_mvc1_decoder = { .name = "mvc1", .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 1"), .type = AVMEDIA_TYPE_VIDEO, @@ -266,7 +266,7 @@ AVCodec ff_mvc1_decoder = { #endif #if CONFIG_MVC2_DECODER -AVCodec ff_mvc2_decoder = { +const AVCodec ff_mvc2_decoder = { .name = "mvc2", .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mvha.c b/libavcodec/mvha.c index c603ef6975..4048e4625c 100644 --- a/libavcodec/mvha.c +++ b/libavcodec/mvha.c @@ -307,7 +307,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_mvha_decoder = { +const AVCodec ff_mvha_decoder = { .name = "mvha", .long_name = NULL_IF_CONFIG_SMALL("MidiVid Archive Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mwsc.c b/libavcodec/mwsc.c index 4db7642e85..b62db67ff5 100644 --- a/libavcodec/mwsc.c +++ b/libavcodec/mwsc.c @@ -177,7 +177,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_mwsc_decoder = { +const AVCodec ff_mwsc_decoder = { .name = "mwsc", .long_name = NULL_IF_CONFIG_SMALL("MatchWare Screen Capture Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c index 763ce5871d..7c97a9340e 100644 --- a/libavcodec/mxpegdec.c +++ b/libavcodec/mxpegdec.c @@ -339,7 +339,7 @@ the_end: return buf_ptr - buf; } -AVCodec ff_mxpeg_decoder = { +const AVCodec ff_mxpeg_decoder = { .name = "mxpeg", .long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index e091ec94bd..ccfe881790 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -186,7 +186,7 @@ static av_cold int decode_end(AVCodecContext * avctx) { return 0; } -AVCodec ff_nellymoser_decoder = { +const AVCodec ff_nellymoser_decoder = { .name = "nellymoser", .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 8670431dcc..2e13e6af08 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -417,7 +417,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_nellymoser_encoder = { +const AVCodec ff_nellymoser_encoder = { .name = "nellymoser", .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c index 9a53cad9cb..c109c5f6f3 100644 --- a/libavcodec/notchlc.c +++ b/libavcodec/notchlc.c @@ -537,7 +537,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_notchlc_decoder = { +const AVCodec ff_notchlc_decoder = { .name = "notchlc", .long_name = NULL_IF_CONFIG_SMALL("NotchLC"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 3ceaaac4e9..3ba12fd8e6 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -362,7 +362,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_nuv_decoder = { +const AVCodec ff_nuv_decoder = { .name = "nuv", .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c index ea7390cbf1..5ad6b35836 100644 --- a/libavcodec/nvenc_h264.c +++ b/libavcodec/nvenc_h264.c @@ -205,7 +205,7 @@ static const AVClass h264_nvenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h264_nvenc_encoder = { +const AVCodec ff_h264_nvenc_encoder = { .name = "h264_nvenc", .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index 1aacec5f9c..007099242a 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -186,7 +186,7 @@ static const AVClass hevc_nvenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_hevc_nvenc_encoder = { +const AVCodec ff_hevc_nvenc_encoder = { .name = "hevc_nvenc", .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC hevc encoder"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/omx.c b/libavcodec/omx.c index 0a6a308309..3a113723d3 100644 --- a/libavcodec/omx.c +++ b/libavcodec/omx.c @@ -951,7 +951,7 @@ static const AVClass omx_mpeg4enc_class = { .option = options, .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_mpeg4_omx_encoder = { +const AVCodec ff_mpeg4_omx_encoder = { .name = "mpeg4_omx", .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG-4 video encoder"), .type = AVMEDIA_TYPE_VIDEO, @@ -972,7 +972,7 @@ static const AVClass omx_h264enc_class = { .option = options, .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h264_omx_encoder = { +const AVCodec ff_h264_omx_encoder = { .name = "h264_omx", .long_name = NULL_IF_CONFIG_SMALL("OpenMAX IL H.264 video encoder"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c index d7a3e4945a..2ab67350ca 100644 --- a/libavcodec/on2avc.c +++ b/libavcodec/on2avc.c @@ -1002,7 +1002,7 @@ static av_cold int on2avc_decode_close(AVCodecContext *avctx) } -AVCodec ff_on2avc_decoder = { +const AVCodec ff_on2avc_decoder = { .name = "on2avc", .long_name = NULL_IF_CONFIG_SMALL("On2 Audio for Video Codec"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c index f0d7ed62a1..3ebf199219 100644 --- a/libavcodec/opusdec.c +++ b/libavcodec/opusdec.c @@ -704,7 +704,7 @@ static const AVClass opus_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_opus_decoder = { +const AVCodec ff_opus_decoder = { .name = "opus", .long_name = NULL_IF_CONFIG_SMALL("Opus"), .priv_class = &opus_class, diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c index 8bc9e9dc4a..da83ef4d32 100644 --- a/libavcodec/opusenc.c +++ b/libavcodec/opusenc.c @@ -719,7 +719,7 @@ static const AVCodecDefault opusenc_defaults[] = { { NULL }, }; -AVCodec ff_opus_encoder = { +const AVCodec ff_opus_encoder = { .name = "opus", .long_name = NULL_IF_CONFIG_SMALL("Opus"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/pafaudio.c b/libavcodec/pafaudio.c index f306e3b96c..cb80f3a186 100644 --- a/libavcodec/pafaudio.c +++ b/libavcodec/pafaudio.c @@ -71,7 +71,7 @@ static int paf_audio_decode(AVCodecContext *avctx, void *data, return pkt->size; } -AVCodec ff_paf_audio_decoder = { +const AVCodec ff_paf_audio_decoder = { .name = "paf_audio", .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c index 1e5d891332..bb5c17b6a1 100644 --- a/libavcodec/pafvideo.c +++ b/libavcodec/pafvideo.c @@ -407,7 +407,7 @@ static int paf_video_decode(AVCodecContext *avctx, void *data, return pkt->size; } -AVCodec ff_paf_video_decoder = { +const AVCodec ff_paf_video_decoder = { .name = "paf_video", .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c index ef3bc3bf16..10dbdf5589 100644 --- a/libavcodec/pamenc.c +++ b/libavcodec/pamenc.c @@ -127,7 +127,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_pam_encoder = { +const AVCodec ff_pam_encoder = { .name = "pam", .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c index 8e6f562b52..c2a6e82b1d 100644 --- a/libavcodec/pcm-bluray.c +++ b/libavcodec/pcm-bluray.c @@ -301,7 +301,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data, return retval + 4; } -AVCodec ff_pcm_bluray_decoder = { +const AVCodec ff_pcm_bluray_decoder = { .name = "pcm_bluray", .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c index 3dda218bf4..775d342eaa 100644 --- a/libavcodec/pcm-dvd.c +++ b/libavcodec/pcm-dvd.c @@ -291,7 +291,7 @@ static int pcm_dvd_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_pcm_dvd_decoder = { +const AVCodec ff_pcm_dvd_decoder = { .name = "pcm_dvd", .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for DVD media"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/pcm-dvdenc.c b/libavcodec/pcm-dvdenc.c index 97ac778334..e644f30f5d 100644 --- a/libavcodec/pcm-dvdenc.c +++ b/libavcodec/pcm-dvdenc.c @@ -170,7 +170,7 @@ static int pcm_dvd_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_pcm_dvd_encoder = { +const AVCodec ff_pcm_dvd_encoder = { .name = "pcm_dvd", .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for DVD media"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 19d04e9181..79b33b935c 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -550,7 +550,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, #define PCM_ENCODER_0(id_, sample_fmt_, name_, long_name_) #define PCM_ENCODER_1(id_, sample_fmt_, name_, long_name_) \ -AVCodec ff_ ## name_ ## _encoder = { \ +const AVCodec ff_ ## name_ ## _encoder = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .type = AVMEDIA_TYPE_AUDIO, \ @@ -572,7 +572,7 @@ AVCodec ff_ ## name_ ## _encoder = { \ #define PCM_DECODER_0(id, sample_fmt, name, long_name) #define PCM_DECODER_1(id_, sample_fmt_, name_, long_name_) \ -AVCodec ff_ ## name_ ## _decoder = { \ +const AVCodec ff_ ## name_ ## _decoder = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .type = AVMEDIA_TYPE_AUDIO, \ diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c index 4505db75b8..b8d911be6b 100644 --- a/libavcodec/pcx.c +++ b/libavcodec/pcx.c @@ -249,7 +249,7 @@ end: return ret; } -AVCodec ff_pcx_decoder = { +const AVCodec ff_pcx_decoder = { .name = "pcx", .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pcxenc.c b/libavcodec/pcxenc.c index 709bf84d12..4cba1019e6 100644 --- a/libavcodec/pcxenc.c +++ b/libavcodec/pcxenc.c @@ -192,7 +192,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_pcx_encoder = { +const AVCodec ff_pcx_encoder = { .name = "pcx", .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index eaf069017a..8b088bda8f 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -703,7 +703,7 @@ static const AVClass pgsdec_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_pgssub_decoder = { +const AVCodec ff_pgssub_decoder = { .name = "pgssub", .long_name = NULL_IF_CONFIG_SMALL("HDMV Presentation Graphic Stream subtitles"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/pgxdec.c b/libavcodec/pgxdec.c index 65b2929283..1d659e82c2 100644 --- a/libavcodec/pgxdec.c +++ b/libavcodec/pgxdec.c @@ -158,7 +158,7 @@ static int pgx_decode_frame(AVCodecContext *avctx, void *data, return 0; } -AVCodec ff_pgx_decoder = { +const AVCodec ff_pgx_decoder = { .name = "pgx", .long_name = NULL_IF_CONFIG_SMALL("PGX (JPEG2000 Test Format)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c index 408ddeaac8..f95d5a8eb8 100644 --- a/libavcodec/photocd.c +++ b/libavcodec/photocd.c @@ -458,7 +458,7 @@ static const AVClass photocd_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_photocd_decoder = { +const AVCodec ff_photocd_decoder = { .name = "photocd", .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_PHOTOCD, diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c index 6340902526..c37c5e7106 100644 --- a/libavcodec/pictordec.c +++ b/libavcodec/pictordec.c @@ -281,7 +281,7 @@ finish: return avpkt->size; } -AVCodec ff_pictor_decoder = { +const AVCodec ff_pictor_decoder = { .name = "pictor", .long_name = NULL_IF_CONFIG_SMALL("Pictor/PC Paint"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c index ad9d830af7..5361bc42bf 100644 --- a/libavcodec/pixlet.c +++ b/libavcodec/pixlet.c @@ -693,7 +693,7 @@ static int pixlet_decode_frame(AVCodecContext *avctx, void *data, return pktsize; } -AVCodec ff_pixlet_decoder = { +const AVCodec ff_pixlet_decoder = { .name = "pixlet", .long_name = NULL_IF_CONFIG_SMALL("Apple Pixlet"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 3e509e8ae0..f2e6f689b0 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -1728,7 +1728,7 @@ static av_cold int png_dec_end(AVCodecContext *avctx) } #if CONFIG_APNG_DECODER -AVCodec ff_apng_decoder = { +const AVCodec ff_apng_decoder = { .name = "apng", .long_name = NULL_IF_CONFIG_SMALL("APNG (Animated Portable Network Graphics) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -1745,7 +1745,7 @@ AVCodec ff_apng_decoder = { #endif #if CONFIG_PNG_DECODER -AVCodec ff_png_decoder = { +const AVCodec ff_png_decoder = { .name = "png", .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 374d7c9cf7..831223be63 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -1121,7 +1121,7 @@ static const AVClass apngenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_png_encoder = { +const AVCodec ff_png_encoder = { .name = "png", .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -1142,7 +1142,7 @@ AVCodec ff_png_encoder = { .priv_class = &pngenc_class, }; -AVCodec ff_apng_encoder = { +const AVCodec ff_apng_encoder = { .name = "apng", .long_name = NULL_IF_CONFIG_SMALL("APNG (Animated Portable Network Graphics) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index 4d5ce0bcb5..01f9dade1a 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -329,7 +329,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, #if CONFIG_PGM_DECODER -AVCodec ff_pgm_decoder = { +const AVCodec ff_pgm_decoder = { .name = "pgm", .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -341,7 +341,7 @@ AVCodec ff_pgm_decoder = { #endif #if CONFIG_PGMYUV_DECODER -AVCodec ff_pgmyuv_decoder = { +const AVCodec ff_pgmyuv_decoder = { .name = "pgmyuv", .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -353,7 +353,7 @@ AVCodec ff_pgmyuv_decoder = { #endif #if CONFIG_PPM_DECODER -AVCodec ff_ppm_decoder = { +const AVCodec ff_ppm_decoder = { .name = "ppm", .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -365,7 +365,7 @@ AVCodec ff_ppm_decoder = { #endif #if CONFIG_PBM_DECODER -AVCodec ff_pbm_decoder = { +const AVCodec ff_pbm_decoder = { .name = "pbm", .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -377,7 +377,7 @@ AVCodec ff_pbm_decoder = { #endif #if CONFIG_PAM_DECODER -AVCodec ff_pam_decoder = { +const AVCodec ff_pam_decoder = { .name = "pam", .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -389,7 +389,7 @@ AVCodec ff_pam_decoder = { #endif #if CONFIG_PFM_DECODER -AVCodec ff_pfm_decoder = { +const AVCodec ff_pfm_decoder = { .name = "pfm", .long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c index 56e929a5f0..80c7b66332 100644 --- a/libavcodec/pnmenc.c +++ b/libavcodec/pnmenc.c @@ -149,7 +149,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } #if CONFIG_PGM_ENCODER -AVCodec ff_pgm_encoder = { +const AVCodec ff_pgm_encoder = { .name = "pgm", .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -163,7 +163,7 @@ AVCodec ff_pgm_encoder = { #endif #if CONFIG_PGMYUV_ENCODER -AVCodec ff_pgmyuv_encoder = { +const AVCodec ff_pgmyuv_encoder = { .name = "pgmyuv", .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -177,7 +177,7 @@ AVCodec ff_pgmyuv_encoder = { #endif #if CONFIG_PPM_ENCODER -AVCodec ff_ppm_encoder = { +const AVCodec ff_ppm_encoder = { .name = "ppm", .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -191,7 +191,7 @@ AVCodec ff_ppm_encoder = { #endif #if CONFIG_PBM_ENCODER -AVCodec ff_pbm_encoder = { +const AVCodec ff_pbm_encoder = { .name = "pbm", .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), .type = AVMEDIA_TYPE_VIDEO, @@ -204,7 +204,7 @@ AVCodec ff_pbm_encoder = { #endif #if CONFIG_PFM_ENCODER -AVCodec ff_pfm_encoder = { +const AVCodec ff_pfm_encoder = { .name = "pfm", .long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index 5a01c89c48..a57cece99b 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -820,7 +820,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_prores_decoder = { +const AVCodec ff_prores_decoder = { .name = "prores", .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index a4197870ec..2eda471f0c 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -944,7 +944,7 @@ static const AVClass prores_enc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_prores_aw_encoder = { +const AVCodec ff_prores_aw_encoder = { .name = "prores_aw", .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes"), .type = AVMEDIA_TYPE_VIDEO, @@ -960,7 +960,7 @@ AVCodec ff_prores_aw_encoder = { .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; -AVCodec ff_prores_encoder = { +const AVCodec ff_prores_encoder = { .name = "prores", .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 81a8cd73e7..d140ef053a 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1399,7 +1399,7 @@ static const AVClass proresenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_prores_ks_encoder = { +const AVCodec ff_prores_ks_encoder = { .name = "prores_ks", .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index 9950519604..f57d8dda41 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -365,7 +365,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_prosumer_decoder = { +const AVCodec ff_prosumer_decoder = { .name = "prosumer", .long_name = NULL_IF_CONFIG_SMALL("Brooktree ProSumer Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/psd.c b/libavcodec/psd.c index ae7ad4e559..681d8a83c9 100644 --- a/libavcodec/psd.c +++ b/libavcodec/psd.c @@ -545,7 +545,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_psd_decoder = { +const AVCodec ff_psd_decoder = { .name = "psd", .long_name = NULL_IF_CONFIG_SMALL("Photoshop PSD file"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c index 19f9305cda..47b8926f73 100644 --- a/libavcodec/ptx.c +++ b/libavcodec/ptx.c @@ -85,7 +85,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return offset + w*h*bytes_per_pixel; } -AVCodec ff_ptx_decoder = { +const AVCodec ff_ptx_decoder = { .name = "ptx", .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c index 4878af5a2c..6663d8588b 100644 --- a/libavcodec/qcelpdec.c +++ b/libavcodec/qcelpdec.c @@ -790,7 +790,7 @@ erasure: return buf_size; } -AVCodec ff_qcelp_decoder = { +const AVCodec ff_qcelp_decoder = { .name = "qcelp", .long_name = NULL_IF_CONFIG_SMALL("QCELP / PureVoice"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 07dea55a76..5e4e741e59 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -1869,7 +1869,7 @@ static int qdm2_decode_frame(AVCodecContext *avctx, void *data, return s->checksum_size; } -AVCodec ff_qdm2_decoder = { +const AVCodec ff_qdm2_decoder = { .name = "qdm2", .long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 2"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c index a8c930f0e7..ae75ca524a 100644 --- a/libavcodec/qdmc.c +++ b/libavcodec/qdmc.c @@ -725,7 +725,7 @@ static int qdmc_decode_frame(AVCodecContext *avctx, void *data, return ret; } -AVCodec ff_qdmc_decoder = { +const AVCodec ff_qdmc_decoder = { .name = "qdmc", .long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 1"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c index 65279c9805..fcc1de0c62 100644 --- a/libavcodec/qdrw.c +++ b/libavcodec/qdrw.c @@ -514,7 +514,7 @@ static int decode_frame(AVCodecContext *avctx, } } -AVCodec ff_qdraw_decoder = { +const AVCodec ff_qdraw_decoder = { .name = "qdraw", .long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 2e66d3bf8a..829e08aba1 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -352,7 +352,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ return 0; } -AVCodec ff_qpeg_decoder = { +const AVCodec ff_qpeg_decoder = { .name = "qpeg", .long_name = NULL_IF_CONFIG_SMALL("Q-team QPEG"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index bf843c8ca2..f543defb18 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -829,7 +829,7 @@ static const AVClass x##_qsv_class = { \ .option = opt, \ .version = LIBAVUTIL_VERSION_INT, \ }; \ -AVCodec ff_##x##_qsv_decoder = { \ +const AVCodec ff_##x##_qsv_decoder = { \ .name = #x "_qsv", \ .long_name = NULL_IF_CONFIG_SMALL(#X " video (Intel Quick Sync Video acceleration)"), \ .priv_data_size = sizeof(QSVDecContext), \ diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index 06b49c46ee..80fe3cc280 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -174,7 +174,7 @@ static const AVCodecDefault qsv_enc_defaults[] = { { NULL }, }; -AVCodec ff_h264_qsv_encoder = { +const AVCodec ff_h264_qsv_encoder = { .name = "h264_qsv", .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)"), .priv_data_size = sizeof(QSVH264EncContext), diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index fc10459628..a5671ebbca 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -270,7 +270,7 @@ static const AVCodecDefault qsv_enc_defaults[] = { { NULL }, }; -AVCodec ff_hevc_qsv_encoder = { +const AVCodec ff_hevc_qsv_encoder = { .name = "hevc_qsv", .long_name = NULL_IF_CONFIG_SMALL("HEVC (Intel Quick Sync Video acceleration)"), .priv_data_size = sizeof(QSVHEVCEncContext), diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c index f76af9486b..dd082692be 100644 --- a/libavcodec/qsvenc_jpeg.c +++ b/libavcodec/qsvenc_jpeg.c @@ -79,7 +79,7 @@ static const AVCodecDefault qsv_enc_defaults[] = { { NULL }, }; -AVCodec ff_mjpeg_qsv_encoder = { +const AVCodec ff_mjpeg_qsv_encoder = { .name = "mjpeg_qsv", .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Intel Quick Sync Video acceleration)"), .priv_data_size = sizeof(QSVMJPEGEncContext), diff --git a/libavcodec/qsvenc_mpeg2.c b/libavcodec/qsvenc_mpeg2.c index 538b937f74..525df99e50 100644 --- a/libavcodec/qsvenc_mpeg2.c +++ b/libavcodec/qsvenc_mpeg2.c @@ -92,7 +92,7 @@ static const AVCodecDefault qsv_enc_defaults[] = { { NULL }, }; -AVCodec ff_mpeg2_qsv_encoder = { +const AVCodec ff_mpeg2_qsv_encoder = { .name = "mpeg2_qsv", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video (Intel Quick Sync Video acceleration)"), .priv_data_size = sizeof(QSVMpeg2EncContext), diff --git a/libavcodec/qsvenc_vp9.c b/libavcodec/qsvenc_vp9.c index ce44c09397..9329990d11 100644 --- a/libavcodec/qsvenc_vp9.c +++ b/libavcodec/qsvenc_vp9.c @@ -92,7 +92,7 @@ static const AVCodecDefault qsv_enc_defaults[] = { { NULL }, }; -AVCodec ff_vp9_qsv_encoder = { +const AVCodec ff_vp9_qsv_encoder = { .name = "vp9_qsv", .long_name = NULL_IF_CONFIG_SMALL("VP9 video (Intel Quick Sync Video acceleration)"), .priv_data_size = sizeof(QSVVP9EncContext), diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 33da393bd1..4ad224e37d 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -581,7 +581,7 @@ static av_cold int qtrle_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_qtrle_decoder = { +const AVCodec ff_qtrle_decoder = { .name = "qtrle", .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c index 9340563084..1ff288456a 100644 --- a/libavcodec/qtrleenc.c +++ b/libavcodec/qtrleenc.c @@ -398,7 +398,7 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_qtrle_encoder = { +const AVCodec ff_qtrle_encoder = { .name = "qtrle", .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c index 407684c7fc..476f1c0680 100644 --- a/libavcodec/r210dec.c +++ b/libavcodec/r210dec.c @@ -102,7 +102,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } #if CONFIG_R210_DECODER -AVCodec ff_r210_decoder = { +const AVCodec ff_r210_decoder = { .name = "r210", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"), .type = AVMEDIA_TYPE_VIDEO, @@ -114,7 +114,7 @@ AVCodec ff_r210_decoder = { }; #endif #if CONFIG_R10K_DECODER -AVCodec ff_r10k_decoder = { +const AVCodec ff_r10k_decoder = { .name = "r10k", .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"), .type = AVMEDIA_TYPE_VIDEO, @@ -126,7 +126,7 @@ AVCodec ff_r10k_decoder = { }; #endif #if CONFIG_AVRP_DECODER -AVCodec ff_avrp_decoder = { +const AVCodec ff_avrp_decoder = { .name = "avrp", .long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c index be1943f5f9..89518bce29 100644 --- a/libavcodec/r210enc.c +++ b/libavcodec/r210enc.c @@ -86,7 +86,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, #if CONFIG_R210_ENCODER -AVCodec ff_r210_encoder = { +const AVCodec ff_r210_encoder = { .name = "r210", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"), .type = AVMEDIA_TYPE_VIDEO, @@ -97,7 +97,7 @@ AVCodec ff_r210_encoder = { }; #endif #if CONFIG_R10K_ENCODER -AVCodec ff_r10k_encoder = { +const AVCodec ff_r10k_encoder = { .name = "r10k", .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"), .type = AVMEDIA_TYPE_VIDEO, @@ -108,7 +108,7 @@ AVCodec ff_r10k_encoder = { }; #endif #if CONFIG_AVRP_ENCODER -AVCodec ff_avrp_encoder = { +const AVCodec ff_avrp_encoder = { .name = "avrp", .long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c index 40b278895f..e5e3def15e 100644 --- a/libavcodec/ra144dec.c +++ b/libavcodec/ra144dec.c @@ -126,7 +126,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, return FRAME_SIZE; } -AVCodec ff_ra_144_decoder = { +const AVCodec ff_ra_144_decoder = { .name = "real_144", .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c index c6965c5c47..0eb151a49e 100644 --- a/libavcodec/ra144enc.c +++ b/libavcodec/ra144enc.c @@ -539,7 +539,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } -AVCodec ff_ra_144_encoder = { +const AVCodec ff_ra_144_encoder = { .name = "real_144", .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index 0eb2a661cb..05f322c40a 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -237,7 +237,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, return avctx->block_align; } -AVCodec ff_ra_288_decoder = { +const AVCodec ff_ra_288_decoder = { .name = "real_288", .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c index dc012d71b1..2b253c5711 100644 --- a/libavcodec/ralf.c +++ b/libavcodec/ralf.c @@ -525,7 +525,7 @@ static void decode_flush(AVCodecContext *avctx) } -AVCodec ff_ralf_decoder = { +const AVCodec ff_ralf_decoder = { .name = "ralf", .long_name = NULL_IF_CONFIG_SMALL("RealAudio Lossless"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c index 207d50c452..c1e9185192 100644 --- a/libavcodec/rasc.c +++ b/libavcodec/rasc.c @@ -805,7 +805,7 @@ static const AVClass rasc_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_rasc_decoder = { +const AVCodec ff_rasc_decoder = { .name = "rasc", .long_name = NULL_IF_CONFIG_SMALL("RemotelyAnywhere Screen Capture"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index a13f88b148..96abf6a48c 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -481,7 +481,7 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx) return 0; } -AVCodec ff_rawvideo_decoder = { +const AVCodec ff_rawvideo_decoder = { .name = "rawvideo", .long_name = NULL_IF_CONFIG_SMALL("raw video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c index a7dd162d55..baaab749fd 100644 --- a/libavcodec/rawenc.c +++ b/libavcodec/rawenc.c @@ -80,7 +80,7 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_rawvideo_encoder = { +const AVCodec ff_rawvideo_encoder = { .name = "rawvideo", .long_name = NULL_IF_CONFIG_SMALL("raw video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/realtextdec.c b/libavcodec/realtextdec.c index 5084781123..d469a1981b 100644 --- a/libavcodec/realtextdec.c +++ b/libavcodec/realtextdec.c @@ -74,7 +74,7 @@ static int realtext_decode_frame(AVCodecContext *avctx, return avpkt->size; } -AVCodec ff_realtext_decoder = { +const AVCodec ff_realtext_decoder = { .name = "realtext", .long_name = NULL_IF_CONFIG_SMALL("RealText subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c index a60962dc86..19ef108832 100644 --- a/libavcodec/rkmppdec.c +++ b/libavcodec/rkmppdec.c @@ -561,7 +561,7 @@ static const AVCodecHWConfigInternal *const rkmpp_hw_configs[] = { #define RKMPP_DEC(NAME, ID, BSFS) \ RKMPP_DEC_CLASS(NAME) \ - AVCodec ff_##NAME##_rkmpp_decoder = { \ + const AVCodec ff_##NAME##_rkmpp_decoder = { \ .name = #NAME "_rkmpp", \ .long_name = NULL_IF_CONFIG_SMALL(#NAME " (rkmpp)"), \ .type = AVMEDIA_TYPE_VIDEO, \ diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c index 2d336a61e5..d75802cc12 100644 --- a/libavcodec/rl2.c +++ b/libavcodec/rl2.c @@ -218,7 +218,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx) } -AVCodec ff_rl2_decoder = { +const AVCodec ff_rl2_decoder = { .name = "rl2", .long_name = NULL_IF_CONFIG_SMALL("RL2 video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c index c09212d3d1..9a636179b1 100644 --- a/libavcodec/roqaudioenc.c +++ b/libavcodec/roqaudioenc.c @@ -183,7 +183,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_roq_dpcm_encoder = { +const AVCodec ff_roq_dpcm_encoder = { .name = "roq_dpcm", .long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c index 36b4ddf755..a2730af922 100644 --- a/libavcodec/roqvideodec.c +++ b/libavcodec/roqvideodec.c @@ -233,7 +233,7 @@ static av_cold int roq_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_roq_decoder = { +const AVCodec ff_roq_decoder = { .name = "roqvideo", .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c index 1ab0de0abb..b755d5e3a5 100644 --- a/libavcodec/roqvideoenc.c +++ b/libavcodec/roqvideoenc.c @@ -1119,7 +1119,7 @@ static const AVClass roq_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_roq_encoder = { +const AVCodec ff_roq_encoder = { .name = "roqvideo", .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c index 02bbfe753f..a9aeac59fe 100644 --- a/libavcodec/rpza.c +++ b/libavcodec/rpza.c @@ -286,7 +286,7 @@ static av_cold int rpza_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_rpza_decoder = { +const AVCodec ff_rpza_decoder = { .name = "rpza", .long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rpzaenc.c b/libavcodec/rpzaenc.c index eeb82716c9..e4651d9d9c 100644 --- a/libavcodec/rpzaenc.c +++ b/libavcodec/rpzaenc.c @@ -842,7 +842,7 @@ static const AVClass rpza_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_rpza_encoder = { +const AVCodec ff_rpza_encoder = { .name = "rpza", .long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rscc.c b/libavcodec/rscc.c index 7b27127bf5..0ec54ac1b0 100644 --- a/libavcodec/rscc.c +++ b/libavcodec/rscc.c @@ -362,7 +362,7 @@ end: return ret; } -AVCodec ff_rscc_decoder = { +const AVCodec ff_rscc_decoder = { .name = "rscc", .long_name = NULL_IF_CONFIG_SMALL("innoHeim/Rsupport Screen Capture Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index bd70689cab..46491bbd94 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -677,7 +677,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return avpkt->size; } -AVCodec ff_rv10_decoder = { +const AVCodec ff_rv10_decoder = { .name = "rv10", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"), .type = AVMEDIA_TYPE_VIDEO, @@ -694,7 +694,7 @@ AVCodec ff_rv10_decoder = { }, }; -AVCodec ff_rv20_decoder = { +const AVCodec ff_rv20_decoder = { .name = "rv20", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index 42316836c5..2a1640c3a9 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -70,7 +70,7 @@ static const AVClass rv10_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_rv10_encoder = { +const AVCodec ff_rv10_encoder = { .name = "rv10", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c index d9d63d4d9c..9bdb642893 100644 --- a/libavcodec/rv20enc.c +++ b/libavcodec/rv20enc.c @@ -67,7 +67,7 @@ static const AVClass rv20_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_rv20_encoder = { +const AVCodec ff_rv20_encoder = { .name = "rv20", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c index e2b75fbec0..751647bebe 100644 --- a/libavcodec/rv30.c +++ b/libavcodec/rv30.c @@ -289,7 +289,7 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_rv30_decoder = { +const AVCodec ff_rv30_decoder = { .name = "rv30", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 8532a872d9..31a7a04e51 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -571,7 +571,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_rv40_decoder = { +const AVCodec ff_rv40_decoder = { .name = "rv40", .long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c index 113590aee4..60d1547884 100644 --- a/libavcodec/s302m.c +++ b/libavcodec/s302m.c @@ -218,7 +218,7 @@ static const AVClass s302m_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_s302m_decoder = { +const AVCodec ff_s302m_decoder = { .name = "s302m", .long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/s302menc.c b/libavcodec/s302menc.c index b04a54e482..2d0615bb2c 100644 --- a/libavcodec/s302menc.c +++ b/libavcodec/s302menc.c @@ -167,7 +167,7 @@ static int s302m_encode2_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } -AVCodec ff_s302m_encoder = { +const AVCodec ff_s302m_encoder = { .name = "s302m", .long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/samidec.c b/libavcodec/samidec.c index e32f238c62..62272f119b 100644 --- a/libavcodec/samidec.c +++ b/libavcodec/samidec.c @@ -180,7 +180,7 @@ static void sami_flush(AVCodecContext *avctx) sami->readorder = 0; } -AVCodec ff_sami_decoder = { +const AVCodec ff_sami_decoder = { .name = "sami", .long_name = NULL_IF_CONFIG_SMALL("SAMI subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index d0000ebd0c..dddc2c871b 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -1515,7 +1515,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, return pkt->size; } -AVCodec ff_sanm_decoder = { +const AVCodec ff_sanm_decoder = { .name = "sanm", .long_name = NULL_IF_CONFIG_SMALL("LucasArts SANM/Smush video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sbcdec.c b/libavcodec/sbcdec.c index bb590e8a05..db61f43a5a 100644 --- a/libavcodec/sbcdec.c +++ b/libavcodec/sbcdec.c @@ -363,7 +363,7 @@ static int sbc_decode_frame(AVCodecContext *avctx, return frame_length; } -AVCodec ff_sbc_decoder = { +const AVCodec ff_sbc_decoder = { .name = "sbc", .long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/sbcenc.c b/libavcodec/sbcenc.c index 33de8edab4..e87c623d4b 100644 --- a/libavcodec/sbcenc.c +++ b/libavcodec/sbcenc.c @@ -341,7 +341,7 @@ static const AVClass sbc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_sbc_encoder = { +const AVCodec ff_sbc_encoder = { .name = "sbc", .long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c index 2a0ebcecfc..ba6e849c66 100644 --- a/libavcodec/scpr.c +++ b/libavcodec/scpr.c @@ -667,7 +667,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_scpr_decoder = { +const AVCodec ff_scpr_decoder = { .name = "scpr", .long_name = NULL_IF_CONFIG_SMALL("ScreenPressor"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/screenpresso.c b/libavcodec/screenpresso.c index d73c24df83..dd4df6d405 100644 --- a/libavcodec/screenpresso.c +++ b/libavcodec/screenpresso.c @@ -183,7 +183,7 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_screenpresso_decoder = { +const AVCodec ff_screenpresso_decoder = { .name = "screenpresso", .long_name = NULL_IF_CONFIG_SMALL("Screenpresso"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sga.c b/libavcodec/sga.c index 7e6bea530c..5103d01f85 100644 --- a/libavcodec/sga.c +++ b/libavcodec/sga.c @@ -520,7 +520,7 @@ static av_cold int sga_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_sga_decoder = { +const AVCodec ff_sga_decoder = { .name = "sga", .long_name = NULL_IF_CONFIG_SMALL("Digital Pictures SGA Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c index e954140258..aa77a3b921 100644 --- a/libavcodec/sgidec.c +++ b/libavcodec/sgidec.c @@ -288,7 +288,7 @@ static av_cold int sgi_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_sgi_decoder = { +const AVCodec ff_sgi_decoder = { .name = "sgi", .long_name = NULL_IF_CONFIG_SMALL("SGI image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index d31f6340f7..962dac0f8a 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -270,7 +270,7 @@ static const AVClass sgi_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_sgi_encoder = { +const AVCodec ff_sgi_encoder = { .name = "sgi", .long_name = NULL_IF_CONFIG_SMALL("SGI image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sgirledec.c b/libavcodec/sgirledec.c index 9cb637b07f..aa5107fe22 100644 --- a/libavcodec/sgirledec.c +++ b/libavcodec/sgirledec.c @@ -131,7 +131,7 @@ static int sgirle_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_sgirle_decoder = { +const AVCodec ff_sgirle_decoder = { .name = "sgirle", .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics RLE 8-bit video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c index b3fb92b6b5..fb5a39303e 100644 --- a/libavcodec/sheervideo.c +++ b/libavcodec/sheervideo.c @@ -2005,7 +2005,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_sheervideo_decoder = { +const AVCodec ff_sheervideo_decoder = { .name = "sheervideo", .long_name = NULL_IF_CONFIG_SMALL("BitJazz SheerVideo"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 70d164a0b3..fde5c4b982 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -799,7 +799,7 @@ static av_cold int shorten_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_shorten_decoder = { +const AVCodec ff_shorten_decoder = { .name = "shorten", .long_name = NULL_IF_CONFIG_SMALL("Shorten"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c index 7ba9fd4a07..a792b22c9f 100644 --- a/libavcodec/sipr.c +++ b/libavcodec/sipr.c @@ -562,7 +562,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *data, return mode_par->bits_per_frame >> 3; } -AVCodec ff_sipr_decoder = { +const AVCodec ff_sipr_decoder = { .name = "sipr", .long_name = NULL_IF_CONFIG_SMALL("RealAudio SIPR / ACELP.NET"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/siren.c b/libavcodec/siren.c index 22b6997176..5937f0d56c 100644 --- a/libavcodec/siren.c +++ b/libavcodec/siren.c @@ -759,7 +759,7 @@ static av_cold int siren_close(AVCodecContext *avctx) return 0; } -AVCodec ff_siren_decoder = { +const AVCodec ff_siren_decoder = { .name = "siren", .long_name = NULL_IF_CONFIG_SMALL("Siren"), .priv_data_size = sizeof(SirenContext), diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 8db33c9275..75ab5d7120 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -720,7 +720,7 @@ error: return ret; } -AVCodec ff_smacker_decoder = { +const AVCodec ff_smacker_decoder = { .name = "smackvid", .long_name = NULL_IF_CONFIG_SMALL("Smacker video"), .type = AVMEDIA_TYPE_VIDEO, @@ -733,7 +733,7 @@ AVCodec ff_smacker_decoder = { .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, }; -AVCodec ff_smackaud_decoder = { +const AVCodec ff_smackaud_decoder = { .name = "smackaud", .long_name = NULL_IF_CONFIG_SMALL("Smacker audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 880bf0620e..70851e5e07 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -468,7 +468,7 @@ static av_cold int smc_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_smc_decoder = { +const AVCodec ff_smc_decoder = { .name = "smc", .long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 68afe0df26..7367176f07 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -648,7 +648,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_snow_decoder = { +const AVCodec ff_snow_decoder = { .name = "snow", .long_name = NULL_IF_CONFIG_SMALL("Snow"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index e694d51a67..5d384e8d91 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1916,7 +1916,7 @@ static const AVClass snowenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_snow_encoder = { +const AVCodec ff_snow_encoder = { .name = "snow", .long_name = NULL_IF_CONFIG_SMALL("Snow"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index 13409d6efa..b31258eaa1 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -1070,7 +1070,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, return buf_size; } -AVCodec ff_sonic_decoder = { +const AVCodec ff_sonic_decoder = { .name = "sonic", .long_name = NULL_IF_CONFIG_SMALL("Sonic"), .type = AVMEDIA_TYPE_AUDIO, @@ -1085,7 +1085,7 @@ AVCodec ff_sonic_decoder = { #endif /* CONFIG_SONIC_DECODER */ #if CONFIG_SONIC_ENCODER -AVCodec ff_sonic_encoder = { +const AVCodec ff_sonic_encoder = { .name = "sonic", .long_name = NULL_IF_CONFIG_SMALL("Sonic"), .type = AVMEDIA_TYPE_AUDIO, @@ -1101,7 +1101,7 @@ AVCodec ff_sonic_encoder = { #endif #if CONFIG_SONIC_LS_ENCODER -AVCodec ff_sonic_ls_encoder = { +const AVCodec ff_sonic_ls_encoder = { .name = "sonicls", .long_name = NULL_IF_CONFIG_SMALL("Sonic lossless"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c index 0b2b2d8418..a1b43f8f80 100644 --- a/libavcodec/sp5xdec.c +++ b/libavcodec/sp5xdec.c @@ -90,7 +90,7 @@ int ff_sp5x_process_packet(AVCodecContext *avctx, AVPacket *avpkt) } #if CONFIG_SP5X_DECODER -AVCodec ff_sp5x_decoder = { +const AVCodec ff_sp5x_decoder = { .name = "sp5x", .long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"), .type = AVMEDIA_TYPE_VIDEO, @@ -106,7 +106,7 @@ AVCodec ff_sp5x_decoder = { }; #endif #if CONFIG_AMV_DECODER -AVCodec ff_amv_decoder = { +const AVCodec ff_amv_decoder = { .name = "amv", .long_name = NULL_IF_CONFIG_SMALL("AMV Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c index 711bcd66d7..4f6a539ad8 100644 --- a/libavcodec/speedhq.c +++ b/libavcodec/speedhq.c @@ -724,7 +724,7 @@ static av_cold int speedhq_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_speedhq_decoder = { +const AVCodec ff_speedhq_decoder = { .name = "speedhq", .long_name = NULL_IF_CONFIG_SMALL("NewTek SpeedHQ"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c index a5bedd5301..6ff7b447a0 100644 --- a/libavcodec/speedhqenc.c +++ b/libavcodec/speedhqenc.c @@ -289,7 +289,7 @@ static const AVClass speedhq_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_speedhq_encoder = { +const AVCodec ff_speedhq_encoder = { .name = "speedhq", .long_name = NULL_IF_CONFIG_SMALL("NewTek SpeedHQ"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c index e77b94f74e..c2afb006f3 100644 --- a/libavcodec/srtdec.c +++ b/libavcodec/srtdec.c @@ -88,7 +88,7 @@ static int srt_decode_frame(AVCodecContext *avctx, #if CONFIG_SRT_DECODER /* deprecated decoder */ -AVCodec ff_srt_decoder = { +const AVCodec ff_srt_decoder = { .name = "srt", .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, @@ -101,7 +101,7 @@ AVCodec ff_srt_decoder = { #endif #if CONFIG_SUBRIP_DECODER -AVCodec ff_subrip_decoder = { +const AVCodec ff_subrip_decoder = { .name = "subrip", .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c index 08c52c2d56..346f281af3 100644 --- a/libavcodec/srtenc.c +++ b/libavcodec/srtenc.c @@ -290,7 +290,7 @@ static int srt_encode_close(AVCodecContext *avctx) #if CONFIG_SRT_ENCODER /* deprecated encoder */ -AVCodec ff_srt_encoder = { +const AVCodec ff_srt_encoder = { .name = "srt", .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, @@ -303,7 +303,7 @@ AVCodec ff_srt_encoder = { #endif #if CONFIG_SUBRIP_ENCODER -AVCodec ff_subrip_encoder = { +const AVCodec ff_subrip_encoder = { .name = "subrip", .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, @@ -316,7 +316,7 @@ AVCodec ff_subrip_encoder = { #endif #if CONFIG_TEXT_ENCODER -AVCodec ff_text_encoder = { +const AVCodec ff_text_encoder = { .name = "text", .long_name = NULL_IF_CONFIG_SMALL("Raw text subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/subviewerdec.c b/libavcodec/subviewerdec.c index 805c7dd547..35c1ad78dd 100644 --- a/libavcodec/subviewerdec.c +++ b/libavcodec/subviewerdec.c @@ -65,7 +65,7 @@ static int subviewer_decode_frame(AVCodecContext *avctx, return avpkt->size; } -AVCodec ff_subviewer_decoder = { +const AVCodec ff_subviewer_decoder = { .name = "subviewer", .long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c index e1ec8a0832..7e9a9b0be5 100644 --- a/libavcodec/sunrast.c +++ b/libavcodec/sunrast.c @@ -205,7 +205,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, return buf - bufstart; } -AVCodec ff_sunrast_decoder = { +const AVCodec ff_sunrast_decoder = { .name = "sunrast", .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/sunrastenc.c b/libavcodec/sunrastenc.c index af4529815b..c47ea61d03 100644 --- a/libavcodec/sunrastenc.c +++ b/libavcodec/sunrastenc.c @@ -208,7 +208,7 @@ static const AVClass sunrast_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_sunrast_encoder = { +const AVCodec ff_sunrast_encoder = { .name = "sunrast", .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index d6b6bec72d..a67d1866b6 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -843,7 +843,7 @@ static void svq1_flush(AVCodecContext *avctx) av_frame_unref(s->prev); } -AVCodec ff_svq1_decoder = { +const AVCodec ff_svq1_decoder = { .name = "svq1", .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index b68df598c1..814b2bad06 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -671,7 +671,7 @@ static const AVClass svq1enc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_svq1_encoder = { +const AVCodec ff_svq1_encoder = { .name = "svq1", .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index edc8aeacc6..c589c77ded 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1601,7 +1601,7 @@ static av_cold int svq3_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_svq3_decoder = { +const AVCodec ff_svq3_decoder = { .name = "svq3", .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c index 931e5d3fb4..93caaae7ad 100644 --- a/libavcodec/takdec.c +++ b/libavcodec/takdec.c @@ -938,7 +938,7 @@ static av_cold int tak_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_tak_decoder = { +const AVCodec ff_tak_decoder = { .name = "tak", .long_name = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/targa.c b/libavcodec/targa.c index a61fef1d7b..3502636c16 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -297,7 +297,7 @@ static int decode_frame(AVCodecContext *avctx, return avpkt->size; } -AVCodec ff_targa_decoder = { +const AVCodec ff_targa_decoder = { .name = "targa", .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/targa_y216dec.c b/libavcodec/targa_y216dec.c index 443d48a92f..d002c1006a 100644 --- a/libavcodec/targa_y216dec.c +++ b/libavcodec/targa_y216dec.c @@ -73,7 +73,7 @@ static int y216_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_targa_y216_decoder = { +const AVCodec ff_targa_y216_decoder = { .name = "targa_y216", .long_name = NULL_IF_CONFIG_SMALL("Pinnacle TARGA CineWave YUV16"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c index cd6cc9e874..6a9edd9aa5 100644 --- a/libavcodec/targaenc.c +++ b/libavcodec/targaenc.c @@ -202,7 +202,7 @@ static const AVClass targa_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_targa_encoder = { +const AVCodec ff_targa_encoder = { .name = "targa", .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/tdsc.c b/libavcodec/tdsc.c index 9e7381c2bb..79bdc422e1 100644 --- a/libavcodec/tdsc.c +++ b/libavcodec/tdsc.c @@ -621,7 +621,7 @@ static int tdsc_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_tdsc_decoder = { +const AVCodec ff_tdsc_decoder = { .name = "tdsc", .long_name = NULL_IF_CONFIG_SMALL("TDSC"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/textdec.c b/libavcodec/textdec.c index 964da72ad5..c1fcc5c6cb 100644 --- a/libavcodec/textdec.c +++ b/libavcodec/textdec.c @@ -81,7 +81,7 @@ static void text_flush(AVCodecContext *avctx) #define text_options options DECLARE_CLASS(text); -AVCodec ff_text_decoder = { +const AVCodec ff_text_decoder = { .name = "text", .long_name = NULL_IF_CONFIG_SMALL("Raw text subtitle"), .priv_data_size = sizeof(TextContext), @@ -107,7 +107,7 @@ static int linebreak_init(AVCodecContext *avctx) #define vplayer_options options DECLARE_CLASS(vplayer); -AVCodec ff_vplayer_decoder = { +const AVCodec ff_vplayer_decoder = { .name = "vplayer", .long_name = NULL_IF_CONFIG_SMALL("VPlayer subtitle"), .priv_data_size = sizeof(TextContext), @@ -124,7 +124,7 @@ AVCodec ff_vplayer_decoder = { #define stl_options options DECLARE_CLASS(stl); -AVCodec ff_stl_decoder = { +const AVCodec ff_stl_decoder = { .name = "stl", .long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"), .priv_data_size = sizeof(TextContext), @@ -141,7 +141,7 @@ AVCodec ff_stl_decoder = { #define pjs_options options DECLARE_CLASS(pjs); -AVCodec ff_pjs_decoder = { +const AVCodec ff_pjs_decoder = { .name = "pjs", .long_name = NULL_IF_CONFIG_SMALL("PJS subtitle"), .priv_data_size = sizeof(TextContext), @@ -158,7 +158,7 @@ AVCodec ff_pjs_decoder = { #define subviewer1_options options DECLARE_CLASS(subviewer1); -AVCodec ff_subviewer1_decoder = { +const AVCodec ff_subviewer1_decoder = { .name = "subviewer1", .long_name = NULL_IF_CONFIG_SMALL("SubViewer1 subtitle"), .priv_data_size = sizeof(TextContext), diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c index 91c8314379..e5b863b6af 100644 --- a/libavcodec/tiertexseqv.c +++ b/libavcodec/tiertexseqv.c @@ -261,7 +261,7 @@ static av_cold int seqvideo_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_tiertexseqvideo_decoder = { +const AVCodec ff_tiertexseqvideo_decoder = { .name = "tiertexseqvideo", .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 819672eea0..8566f7ba74 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -2195,7 +2195,7 @@ static const AVClass tiff_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_tiff_decoder = { +const AVCodec ff_tiff_decoder = { .name = "tiff", .long_name = NULL_IF_CONFIG_SMALL("TIFF image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 03262f97b2..32ee2d5f3e 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -568,7 +568,7 @@ static const AVClass tiffenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_tiff_encoder = { +const AVCodec ff_tiff_encoder = { .name = "tiff", .long_name = NULL_IF_CONFIG_SMALL("TIFF image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c index f8485cda59..67aeb23665 100644 --- a/libavcodec/tmv.c +++ b/libavcodec/tmv.c @@ -86,7 +86,7 @@ static av_cold int tmv_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_tmv_decoder = { +const AVCodec ff_tmv_decoder = { .name = "tmv", .long_name = NULL_IF_CONFIG_SMALL("8088flex TMV"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index 94782fef4b..56ef059ce1 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -910,7 +910,7 @@ static av_cold int truemotion1_decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_truemotion1_decoder = { +const AVCodec ff_truemotion1_decoder = { .name = "truemotion1", .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 1.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 012ad4ffde..f29db593f9 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -1008,7 +1008,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_truemotion2_decoder = { +const AVCodec ff_truemotion2_decoder = { .name = "truemotion2", .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/truemotion2rt.c b/libavcodec/truemotion2rt.c index e3ab998fda..a2206a60e0 100644 --- a/libavcodec/truemotion2rt.c +++ b/libavcodec/truemotion2rt.c @@ -220,7 +220,7 @@ static av_cold int truemotion2rt_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_truemotion2rt_decoder = { +const AVCodec ff_truemotion2rt_decoder = { .name = "truemotion2rt", .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0 Real Time"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c index 272fc43deb..5eac34fefc 100644 --- a/libavcodec/truespeech.c +++ b/libavcodec/truespeech.c @@ -355,7 +355,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_truespeech_decoder = { +const AVCodec ff_truespeech_decoder = { .name = "truespeech", .long_name = NULL_IF_CONFIG_SMALL("DSP Group TrueSpeech"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index f67a910c73..043d78d018 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -180,7 +180,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_tscc_decoder = { +const AVCodec ff_tscc_decoder = { .name = "camtasia", .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index 13e7a41a31..419a7775b3 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -355,7 +355,7 @@ static av_cold int tscc2_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_tscc2_decoder = { +const AVCodec ff_tscc2_decoder = { .name = "tscc2", .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Codec 2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/tta.c b/libavcodec/tta.c index f1e159b03d..83e857ae25 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -414,7 +414,7 @@ static const AVClass tta_decoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_tta_decoder = { +const AVCodec ff_tta_decoder = { .name = "tta", .long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/ttaenc.c b/libavcodec/ttaenc.c index bb4734e013..3255347b62 100644 --- a/libavcodec/ttaenc.c +++ b/libavcodec/ttaenc.c @@ -200,7 +200,7 @@ static av_cold int tta_encode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_tta_encoder = { +const AVCodec ff_tta_encoder = { .name = "tta", .long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/ttmlenc.c b/libavcodec/ttmlenc.c index 26ab76e9e7..56c80d7bea 100644 --- a/libavcodec/ttmlenc.c +++ b/libavcodec/ttmlenc.c @@ -169,7 +169,7 @@ static av_cold int ttml_encode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_ttml_encoder = { +const AVCodec ff_ttml_encoder = { .name = "ttml", .long_name = NULL_IF_CONFIG_SMALL("TTML subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c index 0c1782ecbf..b972facfdd 100644 --- a/libavcodec/twinvqdec.c +++ b/libavcodec/twinvqdec.c @@ -414,7 +414,7 @@ static av_cold int twinvq_decode_init(AVCodecContext *avctx) return ff_twinvq_decode_init(avctx); } -AVCodec ff_twinvq_decoder = { +const AVCodec ff_twinvq_decoder = { .name = "twinvq", .long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/txd.c b/libavcodec/txd.c index f00ba89e82..86d60f3377 100644 --- a/libavcodec/txd.c +++ b/libavcodec/txd.c @@ -155,7 +155,7 @@ unsupported: return AVERROR_PATCHWELCOME; } -AVCodec ff_txd_decoder = { +const AVCodec ff_txd_decoder = { .name = "txd", .long_name = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index cf6891d530..55548ae3f6 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -418,7 +418,7 @@ err: return AVERROR_INVALIDDATA; } -AVCodec ff_ulti_decoder = { +const AVCodec ff_ulti_decoder = { .name = "ultimotion", .long_name = NULL_IF_CONFIG_SMALL("IBM UltiMotion"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 1b10b3bd06..b39d8a7948 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -1051,7 +1051,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_utvideo_decoder = { +const AVCodec ff_utvideo_decoder = { .name = "utvideo", .long_name = NULL_IF_CONFIG_SMALL("Ut Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index 670e48aa9f..29b29bc658 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -649,7 +649,7 @@ static const AVClass utvideo_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_utvideo_encoder = { +const AVCodec ff_utvideo_encoder = { .name = "utvideo", .long_name = NULL_IF_CONFIG_SMALL("Ut Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 044d35338b..868822e298 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -214,7 +214,7 @@ static const AVClass v210dec_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_v210_decoder = { +const AVCodec ff_v210_decoder = { .name = "v210", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 91af88b359..020f0fffe5 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -151,7 +151,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_v210_encoder = { +const AVCodec ff_v210_encoder = { .name = "v210", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c index f6a453aabf..da9e2e3649 100644 --- a/libavcodec/v210x.c +++ b/libavcodec/v210x.c @@ -120,7 +120,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return avpkt->size; } -AVCodec ff_v210x_decoder = { +const AVCodec ff_v210x_decoder = { .name = "v210x", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v308dec.c b/libavcodec/v308dec.c index dd53fbded4..c2b0a69561 100644 --- a/libavcodec/v308dec.c +++ b/libavcodec/v308dec.c @@ -72,7 +72,7 @@ static int v308_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_v308_decoder = { +const AVCodec ff_v308_decoder = { .name = "v308", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c index 0891251dea..919f0ea10b 100644 --- a/libavcodec/v308enc.c +++ b/libavcodec/v308enc.c @@ -68,7 +68,7 @@ static int v308_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_v308_encoder = { +const AVCodec ff_v308_encoder = { .name = "v308", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v408dec.c b/libavcodec/v408dec.c index 196c575c09..749b3b65e5 100644 --- a/libavcodec/v408dec.c +++ b/libavcodec/v408dec.c @@ -80,7 +80,7 @@ static int v408_decode_frame(AVCodecContext *avctx, void *data, } #if CONFIG_AYUV_DECODER -AVCodec ff_ayuv_decoder = { +const AVCodec ff_ayuv_decoder = { .name = "ayuv", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed MS 4:4:4:4"), .type = AVMEDIA_TYPE_VIDEO, @@ -92,7 +92,7 @@ AVCodec ff_ayuv_decoder = { }; #endif #if CONFIG_V408_DECODER -AVCodec ff_v408_decoder = { +const AVCodec ff_v408_decoder = { .name = "v408", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed QT 4:4:4:4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v408enc.c b/libavcodec/v408enc.c index d2d84d9c40..7df371f0ea 100644 --- a/libavcodec/v408enc.c +++ b/libavcodec/v408enc.c @@ -74,7 +74,7 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } #if CONFIG_AYUV_ENCODER -AVCodec ff_ayuv_encoder = { +const AVCodec ff_ayuv_encoder = { .name = "ayuv", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed MS 4:4:4:4"), .type = AVMEDIA_TYPE_VIDEO, @@ -85,7 +85,7 @@ AVCodec ff_ayuv_encoder = { }; #endif #if CONFIG_V408_ENCODER -AVCodec ff_v408_encoder = { +const AVCodec ff_v408_encoder = { .name = "v408", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed QT 4:4:4:4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c index 7ad5eb8fb5..2160f88e8b 100644 --- a/libavcodec/v410dec.c +++ b/libavcodec/v410dec.c @@ -116,7 +116,7 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_v410_decoder = { +const AVCodec ff_v410_decoder = { .name = "v410", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c index 9dc13f7144..c31bf7f4d8 100644 --- a/libavcodec/v410enc.c +++ b/libavcodec/v410enc.c @@ -73,7 +73,7 @@ static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_v410_encoder = { +const AVCodec ff_v410_encoder = { .name = "v410", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c index ab07c0a24a..224eb3d5e7 100644 --- a/libavcodec/v4l2_m2m_dec.c +++ b/libavcodec/v4l2_m2m_dec.c @@ -236,7 +236,7 @@ static const AVOption options[] = { #define M2MDEC(NAME, LONGNAME, CODEC, bsf_name) \ M2MDEC_CLASS(NAME) \ - AVCodec ff_ ## NAME ## _v4l2m2m_decoder = { \ + const AVCodec ff_ ## NAME ## _v4l2m2m_decoder = { \ .name = #NAME "_v4l2m2m" , \ .long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " decoder wrapper"), \ .type = AVMEDIA_TYPE_VIDEO, \ diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c index f644b50133..043fe80c69 100644 --- a/libavcodec/v4l2_m2m_enc.c +++ b/libavcodec/v4l2_m2m_enc.c @@ -421,7 +421,7 @@ static const AVCodecDefault v4l2_m2m_defaults[] = { #define M2MENC(NAME, LONGNAME, OPTIONS_NAME, CODEC) \ M2MENC_CLASS(NAME, OPTIONS_NAME) \ - AVCodec ff_ ## NAME ## _v4l2m2m_encoder = { \ + const AVCodec ff_ ## NAME ## _v4l2m2m_encoder = { \ .name = #NAME "_v4l2m2m" , \ .long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " encoder wrapper"), \ .type = AVMEDIA_TYPE_VIDEO, \ diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 6e20e2d015..ff37de1f7e 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -1324,7 +1324,7 @@ static const AVClass vaapi_encode_h264_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h264_vaapi_encoder = { +const AVCodec ff_h264_vaapi_encoder = { .name = "h264_vaapi", .long_name = NULL_IF_CONFIG_SMALL("H.264/AVC (VAAPI)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index 287ac58690..e1dc53dfa9 100644 --- a/libavcodec/vaapi_encode_h265.c +++ b/libavcodec/vaapi_encode_h265.c @@ -1302,7 +1302,7 @@ static const AVClass vaapi_encode_h265_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_hevc_vaapi_encoder = { +const AVCodec ff_hevc_vaapi_encoder = { .name = "hevc_vaapi", .long_name = NULL_IF_CONFIG_SMALL("H.265/HEVC (VAAPI)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vaapi_encode_mjpeg.c b/libavcodec/vaapi_encode_mjpeg.c index 3878f3eeb9..d35f416ad7 100644 --- a/libavcodec/vaapi_encode_mjpeg.c +++ b/libavcodec/vaapi_encode_mjpeg.c @@ -552,7 +552,7 @@ static const AVClass vaapi_encode_mjpeg_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_mjpeg_vaapi_encoder = { +const AVCodec ff_mjpeg_vaapi_encoder = { .name = "mjpeg_vaapi", .long_name = NULL_IF_CONFIG_SMALL("MJPEG (VAAPI)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vaapi_encode_mpeg2.c b/libavcodec/vaapi_encode_mpeg2.c index 4c81d785d6..af3a63dab7 100644 --- a/libavcodec/vaapi_encode_mpeg2.c +++ b/libavcodec/vaapi_encode_mpeg2.c @@ -688,7 +688,7 @@ static const AVClass vaapi_encode_mpeg2_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_mpeg2_vaapi_encoder = { +const AVCodec ff_mpeg2_vaapi_encoder = { .name = "mpeg2_vaapi", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 (VAAPI)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vaapi_encode_vp8.c b/libavcodec/vaapi_encode_vp8.c index 66cf2321be..7d4578f674 100644 --- a/libavcodec/vaapi_encode_vp8.c +++ b/libavcodec/vaapi_encode_vp8.c @@ -245,7 +245,7 @@ static const AVClass vaapi_encode_vp8_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_vp8_vaapi_encoder = { +const AVCodec ff_vp8_vaapi_encoder = { .name = "vp8_vaapi", .long_name = NULL_IF_CONFIG_SMALL("VP8 (VAAPI)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vaapi_encode_vp9.c b/libavcodec/vaapi_encode_vp9.c index 0e1c52c92a..b3f45fb8fe 100644 --- a/libavcodec/vaapi_encode_vp9.c +++ b/libavcodec/vaapi_encode_vp9.c @@ -279,7 +279,7 @@ static const AVClass vaapi_encode_vp9_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_vp9_vaapi_encoder = { +const AVCodec ff_vp9_vaapi_encoder = { .name = "vp9_vaapi", .long_name = NULL_IF_CONFIG_SMALL("VP9 (VAAPI)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vb.c b/libavcodec/vb.c index fe419c7663..f5b7f89853 100644 --- a/libavcodec/vb.c +++ b/libavcodec/vb.c @@ -278,7 +278,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_vb_decoder = { +const AVCodec ff_vb_decoder = { .name = "vb", .long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vble.c b/libavcodec/vble.c index 2cddd550b1..f1400959e0 100644 --- a/libavcodec/vble.c +++ b/libavcodec/vble.c @@ -203,7 +203,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_vble_decoder = { +const AVCodec ff_vble_decoder = { .name = "vble", .long_name = NULL_IF_CONFIG_SMALL("VBLE Lossless Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 8f112bf9b2..6cd74a09f1 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1196,7 +1196,7 @@ static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = { AV_PIX_FMT_NONE }; -AVCodec ff_vc1_decoder = { +const AVCodec ff_vc1_decoder = { .name = "vc1", .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), .type = AVMEDIA_TYPE_VIDEO, @@ -1233,7 +1233,7 @@ AVCodec ff_vc1_decoder = { }; #if CONFIG_WMV3_DECODER -AVCodec ff_wmv3_decoder = { +const AVCodec ff_wmv3_decoder = { .name = "wmv3", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"), .type = AVMEDIA_TYPE_VIDEO, @@ -1271,7 +1271,7 @@ AVCodec ff_wmv3_decoder = { #endif #if CONFIG_WMV3IMAGE_DECODER -AVCodec ff_wmv3image_decoder = { +const AVCodec ff_wmv3image_decoder = { .name = "wmv3image", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image"), .type = AVMEDIA_TYPE_VIDEO, @@ -1290,7 +1290,7 @@ AVCodec ff_wmv3image_decoder = { #endif #if CONFIG_VC1IMAGE_DECODER -AVCodec ff_vc1image_decoder = { +const AVCodec ff_vc1image_decoder = { .name = "vc1image", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image v2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 7bd2e4c2ab..6432532eae 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -1226,7 +1226,7 @@ static const enum AVPixelFormat allowed_pix_fmts[] = { AV_PIX_FMT_NONE }; -AVCodec ff_vc2_encoder = { +const AVCodec ff_vc2_encoder = { .name = "vc2", .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-2"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c index 28a5eec7d1..8220cf3b38 100644 --- a/libavcodec/vcr1.c +++ b/libavcodec/vcr1.c @@ -121,7 +121,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data, return bytestream - avpkt->data; } -AVCodec ff_vcr1_decoder = { +const AVCodec ff_vcr1_decoder = { .name = "vcr1", .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 9b7ee6720c..e576ff7d7e 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -2659,7 +2659,7 @@ static const AVClass h264_videotoolbox_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_h264_videotoolbox_encoder = { +const AVCodec ff_h264_videotoolbox_encoder = { .name = "h264_videotoolbox", .long_name = NULL_IF_CONFIG_SMALL("VideoToolbox H.264 Encoder"), .type = AVMEDIA_TYPE_VIDEO, @@ -2693,7 +2693,7 @@ static const AVClass hevc_videotoolbox_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_hevc_videotoolbox_encoder = { +const AVCodec ff_hevc_videotoolbox_encoder = { .name = "hevc_videotoolbox", .long_name = NULL_IF_CONFIG_SMALL("VideoToolbox H.265 Encoder"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vima.c b/libavcodec/vima.c index 2dfc2cc5c8..5c7618861f 100644 --- a/libavcodec/vima.c +++ b/libavcodec/vima.c @@ -207,7 +207,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, return pkt->size; } -AVCodec ff_adpcm_vima_decoder = { +const AVCodec ff_adpcm_vima_decoder = { .name = "adpcm_vima", .long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/vmdaudio.c b/libavcodec/vmdaudio.c index dfbd49fd84..d513479c54 100644 --- a/libavcodec/vmdaudio.c +++ b/libavcodec/vmdaudio.c @@ -228,7 +228,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_vmdaudio_decoder = { +const AVCodec ff_vmdaudio_decoder = { .name = "vmdaudio", .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD audio"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/vmdvideo.c b/libavcodec/vmdvideo.c index bb9306e4ff..15846919d8 100644 --- a/libavcodec/vmdvideo.c +++ b/libavcodec/vmdvideo.c @@ -467,7 +467,7 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx, return buf_size; } -AVCodec ff_vmdvideo_decoder = { +const AVCodec ff_vmdvideo_decoder = { .name = "vmdvideo", .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c index 7f441bc4bd..d65e8dc4e5 100644 --- a/libavcodec/vmnc.c +++ b/libavcodec/vmnc.c @@ -572,7 +572,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_vmnc_decoder = { +const AVCodec ff_vmnc_decoder = { .name = "vmnc", .long_name = NULL_IF_CONFIG_SMALL("VMware Screen Codec / VMware Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 169df591b3..dac2b6841c 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1880,7 +1880,7 @@ static av_cold void vorbis_decode_flush(AVCodecContext *avctx) vc->first_frame = 0; } -AVCodec ff_vorbis_decoder = { +const AVCodec ff_vorbis_decoder = { .name = "vorbis", .long_name = NULL_IF_CONFIG_SMALL("Vorbis"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index 1b0ab3cadb..b89bb206e0 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -1293,7 +1293,7 @@ error: return ret; } -AVCodec ff_vorbis_encoder = { +const AVCodec ff_vorbis_encoder = { .name = "vorbis", .long_name = NULL_IF_CONFIG_SMALL("Vorbis"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 57c6eb1ff9..0cae075452 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -3159,7 +3159,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) return vp3_decode_init(avctx); } -AVCodec ff_theora_decoder = { +const AVCodec ff_theora_decoder = { .name = "theora", .long_name = NULL_IF_CONFIG_SMALL("Theora"), .type = AVMEDIA_TYPE_VIDEO, @@ -3177,7 +3177,7 @@ AVCodec ff_theora_decoder = { }; #endif -AVCodec ff_vp3_decoder = { +const AVCodec ff_vp3_decoder = { .name = "vp3", .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"), .type = AVMEDIA_TYPE_VIDEO, @@ -3194,7 +3194,7 @@ AVCodec ff_vp3_decoder = { }; #if CONFIG_VP4_DECODER -AVCodec ff_vp4_decoder = { +const AVCodec ff_vp4_decoder = { .name = "vp4", .long_name = NULL_IF_CONFIG_SMALL("On2 VP4"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c index f3946f508c..f68c62527b 100644 --- a/libavcodec/vp5.c +++ b/libavcodec/vp5.c @@ -296,7 +296,7 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_vp5_decoder = { +const AVCodec ff_vp5_decoder = { .name = "vp5", .long_name = NULL_IF_CONFIG_SMALL("On2 VP5"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c index e5dec19f50..73822a00f9 100644 --- a/libavcodec/vp6.c +++ b/libavcodec/vp6.c @@ -703,7 +703,7 @@ static av_cold void vp6_decode_free_context(VP56Context *s) } } -AVCodec ff_vp6_decoder = { +const AVCodec ff_vp6_decoder = { .name = "vp6", .long_name = NULL_IF_CONFIG_SMALL("On2 VP6"), .type = AVMEDIA_TYPE_VIDEO, @@ -716,7 +716,7 @@ AVCodec ff_vp6_decoder = { }; /* flash version, not flipped upside-down */ -AVCodec ff_vp6f_decoder = { +const AVCodec ff_vp6f_decoder = { .name = "vp6f", .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"), .type = AVMEDIA_TYPE_VIDEO, @@ -729,7 +729,7 @@ AVCodec ff_vp6f_decoder = { }; /* flash version, not flipped upside-down, with alpha channel */ -AVCodec ff_vp6a_decoder = { +const AVCodec ff_vp6a_decoder = { .name = "vp6a", .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index d16e7b6aa3..b964d2fd2d 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2938,7 +2938,7 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, #endif /* CONFIG_VP8_DECODER */ #if CONFIG_VP7_DECODER -AVCodec ff_vp7_decoder = { +const AVCodec ff_vp7_decoder = { .name = "vp7", .long_name = NULL_IF_CONFIG_SMALL("On2 VP7"), .type = AVMEDIA_TYPE_VIDEO, @@ -2953,7 +2953,7 @@ AVCodec ff_vp7_decoder = { #endif /* CONFIG_VP7_DECODER */ #if CONFIG_VP8_DECODER -AVCodec ff_vp8_decoder = { +const AVCodec ff_vp8_decoder = { .name = "vp8", .long_name = NULL_IF_CONFIG_SMALL("On2 VP8"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index b4b644d509..32776ebae7 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -1873,7 +1873,7 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo } #endif -AVCodec ff_vp9_decoder = { +const AVCodec ff_vp9_decoder = { .name = "vp9", .long_name = NULL_IF_CONFIG_SMALL("Google VP9"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index f45390cfe5..a396615ce5 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -642,7 +642,7 @@ static const AVCodecDefault vqa_defaults[] = { { NULL }, }; -AVCodec ff_vqa_decoder = { +const AVCodec ff_vqa_decoder = { .name = "vqavideo", .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 2d49172eaf..6b2ec19bf1 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1699,7 +1699,7 @@ error: return ret; } -AVCodec ff_wavpack_decoder = { +const AVCodec ff_wavpack_decoder = { .name = "wavpack", .long_name = NULL_IF_CONFIG_SMALL("WavPack"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c index 0c82633a72..b856f56e3b 100644 --- a/libavcodec/wavpackenc.c +++ b/libavcodec/wavpackenc.c @@ -2957,7 +2957,7 @@ static const AVClass wavpack_encoder_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_wavpack_encoder = { +const AVCodec ff_wavpack_encoder = { .name = "wavpack", .long_name = NULL_IF_CONFIG_SMALL("WavPack"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/wcmv.c b/libavcodec/wcmv.c index d7a3cbd1b7..04c597e767 100644 --- a/libavcodec/wcmv.c +++ b/libavcodec/wcmv.c @@ -249,7 +249,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_wcmv_decoder = { +const AVCodec ff_wcmv_decoder = { .name = "wcmv", .long_name = NULL_IF_CONFIG_SMALL("WinCAM Motion Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 5a7aebc587..23558309c6 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1550,7 +1550,7 @@ static av_cold int webp_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_webp_decoder = { +const AVCodec ff_webp_decoder = { .name = "webp", .long_name = NULL_IF_CONFIG_SMALL("WebP image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/webvttdec.c b/libavcodec/webvttdec.c index 7b2d1750de..eb0a5600a6 100644 --- a/libavcodec/webvttdec.c +++ b/libavcodec/webvttdec.c @@ -98,7 +98,7 @@ static int webvtt_decode_frame(AVCodecContext *avctx, return avpkt->size; } -AVCodec ff_webvtt_decoder = { +const AVCodec ff_webvtt_decoder = { .name = "webvtt", .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index fcbd9698f4..cc47b5aca3 100644 --- a/libavcodec/webvttenc.c +++ b/libavcodec/webvttenc.c @@ -210,7 +210,7 @@ static av_cold int webvtt_encode_init(AVCodecContext *avctx) return s->ass_ctx ? 0 : AVERROR_INVALIDDATA; } -AVCodec ff_webvtt_encoder = { +const AVCodec ff_webvtt_encoder = { .name = "webvtt", .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 9c79556bb5..9081f35a16 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -964,7 +964,7 @@ static av_cold void flush(AVCodecContext *avctx) } #if CONFIG_WMAV1_DECODER -AVCodec ff_wmav1_decoder = { +const AVCodec ff_wmav1_decoder = { .name = "wmav1", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), .type = AVMEDIA_TYPE_AUDIO, @@ -980,7 +980,7 @@ AVCodec ff_wmav1_decoder = { }; #endif #if CONFIG_WMAV2_DECODER -AVCodec ff_wmav2_decoder = { +const AVCodec ff_wmav2_decoder = { .name = "wmav2", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c index 4ad37cc70b..89273ba978 100644 --- a/libavcodec/wmaenc.c +++ b/libavcodec/wmaenc.c @@ -425,7 +425,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt, } #if CONFIG_WMAV1_ENCODER -AVCodec ff_wmav1_encoder = { +const AVCodec ff_wmav1_encoder = { .name = "wmav1", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), .type = AVMEDIA_TYPE_AUDIO, @@ -439,7 +439,7 @@ AVCodec ff_wmav1_encoder = { }; #endif #if CONFIG_WMAV2_ENCODER -AVCodec ff_wmav2_encoder = { +const AVCodec ff_wmav2_encoder = { .name = "wmav2", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index e1fcf8afeb..f750e1a479 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -1323,7 +1323,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_wmalossless_decoder = { +const AVCodec ff_wmalossless_decoder = { .name = "wmalossless", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 8024ce1611..9607e50968 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -2005,7 +2005,7 @@ static void xma_flush(AVCodecContext *avctx) /** *@brief wmapro decoder */ -AVCodec ff_wmapro_decoder = { +const AVCodec ff_wmapro_decoder = { .name = "wmapro", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"), .type = AVMEDIA_TYPE_AUDIO, @@ -2021,7 +2021,7 @@ AVCodec ff_wmapro_decoder = { AV_SAMPLE_FMT_NONE }, }; -AVCodec ff_xma1_decoder = { +const AVCodec ff_xma1_decoder = { .name = "xma1", .long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 1"), .type = AVMEDIA_TYPE_AUDIO, @@ -2036,7 +2036,7 @@ AVCodec ff_xma1_decoder = { AV_SAMPLE_FMT_NONE }, }; -AVCodec ff_xma2_decoder = { +const AVCodec ff_xma2_decoder = { .name = "xma2", .long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 2"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 2cb4219b84..a9d50f95ca 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -1997,7 +1997,7 @@ static av_cold int wmavoice_decode_end(AVCodecContext *ctx) return 0; } -AVCodec ff_wmavoice_decoder = { +const AVCodec ff_wmavoice_decoder = { .name = "wmavoice", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Voice"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index 7aae11568c..c500e3e779 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -513,7 +513,7 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx) return ff_h263_decode_end(avctx); } -AVCodec ff_wmv2_decoder = { +const AVCodec ff_wmv2_decoder = { .name = "wmv2", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index 312dbc0834..bdefee5ca8 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -221,7 +221,7 @@ static const AVClass wmv2_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVCodec ff_wmv2_encoder = { +const AVCodec ff_wmv2_encoder = { .name = "wmv2", .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index dcf417763c..5d6c91d2d2 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -133,7 +133,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_wnv1_decoder = { +const AVCodec ff_wnv1_decoder = { .name = "wnv1", .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/wrapped_avframe.c b/libavcodec/wrapped_avframe.c index 85ff32d13a..a7834b86e8 100644 --- a/libavcodec/wrapped_avframe.c +++ b/libavcodec/wrapped_avframe.c @@ -109,7 +109,7 @@ static int wrapped_avframe_decode(AVCodecContext *avctx, void *data, return 0; } -AVCodec ff_wrapped_avframe_encoder = { +const AVCodec ff_wrapped_avframe_encoder = { .name = "wrapped_avframe", .long_name = NULL_IF_CONFIG_SMALL("AVFrame to AVPacket passthrough"), .type = AVMEDIA_TYPE_VIDEO, @@ -118,7 +118,7 @@ AVCodec ff_wrapped_avframe_encoder = { .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; -AVCodec ff_wrapped_avframe_decoder = { +const AVCodec ff_wrapped_avframe_decoder = { .name = "wrapped_avframe", .long_name = NULL_IF_CONFIG_SMALL("AVPacket to AVFrame passthrough"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c index 958c067736..aa8cd0f5f9 100644 --- a/libavcodec/ws-snd1.c +++ b/libavcodec/ws-snd1.c @@ -170,7 +170,7 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_ws_snd1_decoder = { +const AVCodec ff_ws_snd1_decoder = { .name = "ws_snd1", .long_name = NULL_IF_CONFIG_SMALL("Westwood Audio (SND1)"), .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 6bf754f151..7ab43db1e0 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -635,7 +635,7 @@ static int xan_decode_frame(AVCodecContext *avctx, return buf_size; } -AVCodec ff_xan_wc3_decoder = { +const AVCodec ff_xan_wc3_decoder = { .name = "xan_wc3", .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III / Xan"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c index c1fc6cb650..bed68c33ed 100644 --- a/libavcodec/xbmdec.c +++ b/libavcodec/xbmdec.c @@ -136,7 +136,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_xbm_decoder = { +const AVCodec ff_xbm_decoder = { .name = "xbm", .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xbmenc.c b/libavcodec/xbmenc.c index 1cf13f6f0b..3451ecc88c 100644 --- a/libavcodec/xbmenc.c +++ b/libavcodec/xbmenc.c @@ -75,7 +75,7 @@ static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_xbm_encoder = { +const AVCodec ff_xbm_encoder = { .name = "xbm", .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xfacedec.c b/libavcodec/xfacedec.c index 763be6761a..27295ff518 100644 --- a/libavcodec/xfacedec.c +++ b/libavcodec/xfacedec.c @@ -176,7 +176,7 @@ static int xface_decode_frame(AVCodecContext *avctx, return avpkt->size; } -AVCodec ff_xface_decoder = { +const AVCodec ff_xface_decoder = { .name = "xface", .long_name = NULL_IF_CONFIG_SMALL("X-face image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xfaceenc.c b/libavcodec/xfaceenc.c index dd5bb689c2..21c7d8f31c 100644 --- a/libavcodec/xfaceenc.c +++ b/libavcodec/xfaceenc.c @@ -211,7 +211,7 @@ static int xface_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_xface_encoder = { +const AVCodec ff_xface_encoder = { .name = "xface", .long_name = NULL_IF_CONFIG_SMALL("X-face image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xl.c b/libavcodec/xl.c index 72fb3bf259..25e5a6444e 100644 --- a/libavcodec/xl.c +++ b/libavcodec/xl.c @@ -127,7 +127,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_xl_decoder = { +const AVCodec ff_xl_decoder = { .name = "xl", .long_name = NULL_IF_CONFIG_SMALL("Miro VideoXL"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xpmdec.c b/libavcodec/xpmdec.c index 922dfc0f67..e609a70c6a 100644 --- a/libavcodec/xpmdec.c +++ b/libavcodec/xpmdec.c @@ -436,7 +436,7 @@ static av_cold int xpm_decode_close(AVCodecContext *avctx) return 0; } -AVCodec ff_xpm_decoder = { +const AVCodec ff_xpm_decoder = { .name = "xpm", .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_XPM, diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c index caab330ed3..979399bae6 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -160,7 +160,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, return buf_size; } -AVCodec ff_xsub_decoder = { +const AVCodec ff_xsub_decoder = { .name = "xsub", .long_name = NULL_IF_CONFIG_SMALL("XSUB"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c index 53fcb76656..03d0dc2d86 100644 --- a/libavcodec/xsubenc.c +++ b/libavcodec/xsubenc.c @@ -211,7 +211,7 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) return 0; } -AVCodec ff_xsub_encoder = { +const AVCodec ff_xsub_encoder = { .name = "xsub", .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"), .type = AVMEDIA_TYPE_SUBTITLE, diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c index 8c4358fd4c..7b8228332f 100644 --- a/libavcodec/xwddec.c +++ b/libavcodec/xwddec.c @@ -247,7 +247,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_xwd_decoder = { +const AVCodec ff_xwd_decoder = { .name = "xwd", .long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c index 81cca6c963..8eec700e9d 100644 --- a/libavcodec/xwdenc.c +++ b/libavcodec/xwdenc.c @@ -215,7 +215,7 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_xwd_encoder = { +const AVCodec ff_xwd_encoder = { .name = "xwd", .long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index 1dd46b36eb..7c4aaf281f 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -433,7 +433,7 @@ static int xan_decode_frame(AVCodecContext *avctx, return avpkt->size; } -AVCodec ff_xan_wc4_decoder = { +const AVCodec ff_xan_wc4_decoder = { .name = "xan_wc4", .long_name = NULL_IF_CONFIG_SMALL("Wing Commander IV / Xxan"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/y41pdec.c b/libavcodec/y41pdec.c index 2bfabe277e..e63d184f25 100644 --- a/libavcodec/y41pdec.c +++ b/libavcodec/y41pdec.c @@ -81,7 +81,7 @@ static int y41p_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_y41p_decoder = { +const AVCodec ff_y41p_decoder = { .name = "y41p", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1 12-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c index 4340a3fbba..e7d639008f 100644 --- a/libavcodec/y41penc.c +++ b/libavcodec/y41penc.c @@ -75,7 +75,7 @@ static int y41p_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_y41p_encoder = { +const AVCodec ff_y41p_encoder = { .name = "y41p", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1 12-bit"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/ylc.c b/libavcodec/ylc.c index ab1f8958f3..1c2b5000fe 100644 --- a/libavcodec/ylc.c +++ b/libavcodec/ylc.c @@ -452,7 +452,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_ylc_decoder = { +const AVCodec ff_ylc_decoder = { .name = "ylc", .long_name = NULL_IF_CONFIG_SMALL("YUY2 Lossless Codec"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/yop.c b/libavcodec/yop.c index 8f8ed940ec..38014edef6 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -265,7 +265,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return avpkt->size; } -AVCodec ff_yop_decoder = { +const AVCodec ff_yop_decoder = { .name = "yop", .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/yuv4dec.c b/libavcodec/yuv4dec.c index 3fb1dbac28..b180e96b5f 100644 --- a/libavcodec/yuv4dec.c +++ b/libavcodec/yuv4dec.c @@ -73,7 +73,7 @@ static int yuv4_decode_frame(AVCodecContext *avctx, void *data, return avpkt->size; } -AVCodec ff_yuv4_decoder = { +const AVCodec ff_yuv4_decoder = { .name = "yuv4", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:2:0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/yuv4enc.c b/libavcodec/yuv4enc.c index 63a7fae964..259395d9da 100644 --- a/libavcodec/yuv4enc.c +++ b/libavcodec/yuv4enc.c @@ -57,7 +57,7 @@ static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -AVCodec ff_yuv4_encoder = { +const AVCodec ff_yuv4_encoder = { .name = "yuv4", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:2:0"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c index 1051fdaa45..3bd04567a1 100644 --- a/libavcodec/zerocodec.c +++ b/libavcodec/zerocodec.c @@ -144,7 +144,7 @@ static void zerocodec_decode_flush(AVCodecContext *avctx) av_frame_unref(zc->previous_frame); } -AVCodec ff_zerocodec_decoder = { +const AVCodec ff_zerocodec_decoder = { .type = AVMEDIA_TYPE_VIDEO, .name = "zerocodec", .long_name = NULL_IF_CONFIG_SMALL("ZeroCodec Lossless Video"), diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index e3ccc16d0b..e1aba7f059 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -654,7 +654,7 @@ static av_cold int decode_end(AVCodecContext *avctx) return 0; } -AVCodec ff_zmbv_decoder = { +const AVCodec ff_zmbv_decoder = { .name = "zmbv", .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"), .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c index 1d4c617b4a..27d2954352 100644 --- a/libavcodec/zmbvenc.c +++ b/libavcodec/zmbvenc.c @@ -422,7 +422,7 @@ static av_cold int encode_init(AVCodecContext *avctx) return 0; } -AVCodec ff_zmbv_encoder = { +const AVCodec ff_zmbv_encoder = { .name = "zmbv", .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"), .type = AVMEDIA_TYPE_VIDEO, From patchwork Mon Apr 19 14:10:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27159 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1101538yba; Mon, 19 Apr 2021 07:24:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKGgU0LDpGD7gAk50LEImGNTlWRJyN3I8gnLJg0MOQ4MkGgs3EpEcPIgm9xqCClgrS5+CF X-Received: by 2002:a17:906:9385:: with SMTP id l5mr22396032ejx.32.1618842245909; Mon, 19 Apr 2021 07:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842245; cv=none; d=google.com; s=arc-20160816; b=d2Vyn+8K1BB5B8aYa2GrQ9d7scXoder8ALoDj0dMxlyudxf18w299qXDsB74n6mSxu JRRze8pmeA5x9Zb6mnCffgoWvhOQU5ksF3C1XED5n9FJfZ0acMzYDSdVwMnmkIKJSoFE Z9SfxIMLPngq2DMmL/7uBiveb/Tvs30CBZpjknRdNsKLqX5xlAIVg6uUQZptqrzA4yDy nFqb+INiIG73eI/3F8W/P9oOLJqVmY9tQqKfHJAm1YXrzJkb7Im/MOW1heXcQLnKbrQo uguqUsh9ZZZ5QMNIrVSh7oJa1ny96y7Lm9yyxFjVfkASTjO3W1MbsbL1+FMr8RhVbDaL eYzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=Is4YyzKIegdSAsW63BPF1PEltV4lqvz52zTfheF/bhA=; b=E9C1MGNmhLAMw7yTvF/d4BSUFVGLecpYxR8XolqX4V5XZ3jNf3+9APiYRCUqsn3E8T 9HTJljoEcglwWmLu6FU+XvXNryk4hQR7hZC0PTXYqMmLqi/uMXOC29fw0jHX6pMiQxPO gh28Bpnwlfvus978IY4HtHxcrK1YDJoR+9anH2I/p2jpYeI06yf9BclTG5UtRt9WL6cb ez599o/WMX6SnETKHp3qNv56u3aKKoHYggoOfUT6vEFZYzOYpLxcA2VfhhKsZpJvbjvk DcKdjsFX69t5gpz2Rt4CcXs3HJK4qKlGPeGBG03cfmndgzp4dzJAOpV0hf53WMYW+3rR mn4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=gCwgwq2O; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t26si6751872edr.390.2021.04.19.07.24.05; Mon, 19 Apr 2021 07:24:05 -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=@gmail.com header.s=20161025 header.b=gCwgwq2O; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E696B689E7C; Mon, 19 Apr 2021 17:12:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E06EE689E7C for ; Mon, 19 Apr 2021 17:12:44 +0300 (EEST) Received: by mail-qk1-f182.google.com with SMTP id u20so3665975qku.10 for ; Mon, 19 Apr 2021 07:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7xfldpGD7pHedG3lIvPxdtOOFjnnlT4INCqLaxm70ZU=; b=gCwgwq2OdlfXkb8oWvN3mBJ+hImBntmjbPWO4KUTAfha8jJrqtkhh0W9/M27yT9Sq7 aF+GHRxOlfwauCndGwvlVcpXWOiDMWSotiYPU0gs5GU3M+VlbEpXX16RRthqCM0q36W/ Kb9quIXMJG/gR9mNJ+/FzxGL2C21AddwSrtRLDx/507hy8hpIbAJtKUVaXx+S5CDzmZz zojfSKpRWjQ5tkJonzPs4lPBqTHCzzcB6Fo1UHy+Kb9PQxt3uvanCedRDOrtVqLTIbZR 2kDhoUVn76d7xNWYMD2qaS1+mooYKxuARLRuroWc9Wpiq/Vo8pCWx8M/1ediUUSDJ0ZB HBrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7xfldpGD7pHedG3lIvPxdtOOFjnnlT4INCqLaxm70ZU=; b=aA4MTJBxLgHiO9maY2+Vf/QqxMkRDHgdmHJ4htsqB0d1habk+XxDkNpG8m40tzzLaa K/zrszuYHFVpN2vnNsylY7X49owJzYa/skG3K2Bh5Hsld/rQvFx740D6qhSK2sIH7pEy gMC7QhyU20t2whzeEcCaXsuFm5GgTzxLL6Pi10//R6KdpT+nwGovZN7dMRWwIeRSdea9 /puYI7R0q5eCm+Ri8ZAjuiD33m5ZGyA+erDC4Cetw0+GrvF69OvwNTOBZ4KmZefi9aki 2L1U0sZAZi0zHMRt4XQfH3uRyTPXk4REZnXYtvusvOPC0GlO4BncXqgWsqIn83ue3iSp LSHQ== X-Gm-Message-State: AOAM533qoAe09KMLG/qc0k9+xuYR3Eya6DwFWRSppMmAgG/F+hFI1zNv NFl1BdJkhPPwq3YtBE35KxPLqtt4SFo= X-Received: by 2002:a05:620a:121b:: with SMTP id u27mr8147793qkj.214.1618841563572; Mon, 19 Apr 2021 07:12:43 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:43 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:16 -0300 Message-Id: <20210419141024.8174-80-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 79/87] avcodec: Constify AVCodecParserContext.parser 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: v3XLMkGDNas5 Content-Length: 2014 From: Andreas Rheinhardt Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 2 +- libavcodec/parser.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index f405cd789c..6d47e775a6 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -17,6 +17,9 @@ API changes, most recent first: 2021-04-17 - xxxxxxxxxx - lavu 56.73.100 - frame.h detection_bbox.h Add AV_FRAME_DATA_DETECTION_BBOXES +2021-04-14 - xxxxxxxxxx - lavc yyyyyyyyy - avcodec.h + Constified AVCodecParserContext.parser. + 2021-04-14 - xxxxxxxxxx - lavd yyyyyyyyy - avdevice.h The av_*_device_next API functions now accept and return pointers to const AVInputFormat resp. AVOutputFormat. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index bb5e8490ca..60d0164903 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2877,7 +2877,7 @@ enum AVPictureStructure { typedef struct AVCodecParserContext { void *priv_data; - struct AVCodecParser *parser; + const struct AVCodecParser *parser; int64_t frame_offset; /* offset of the current frame */ int64_t cur_offset; /* current offset (incremented by each av_parser_parse()) */ diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 593ea9ddf7..f81a62d592 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -55,7 +55,7 @@ found: s = av_mallocz(sizeof(AVCodecParserContext)); if (!s) goto err_out; - s->parser = (AVCodecParser*)parser; + s->parser = parser; s->priv_data = av_mallocz(parser->priv_data_size); if (!s->priv_data) goto err_out; From patchwork Mon Apr 19 14:10:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27140 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1102125yba; Mon, 19 Apr 2021 07:24:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXZF145yjLNkcvxf56zn8VIlhS2ewmDElL6G0uKag13ExhEG6HqN/YWwihXxS4bfcUNUvW X-Received: by 2002:a05:6402:34c4:: with SMTP id w4mr26706274edc.367.1618842289392; Mon, 19 Apr 2021 07:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842289; cv=none; d=google.com; s=arc-20160816; b=UnXPwMUnc9x7SIFyFNhBUeF3R2iNNYz6Dy0frTfZoD78KBrvXp+yvzgZ+Ko7s75hZj jxdUzFzkeB9j9XADVgOo56q9QuRbyV1ERjDW81fDhIaTWKIlydkfdSGQ07BVr+rkzxD9 xhJKdc7P0iiqNOrdHIalwL0/UL4ywwceB4PuVA1GINaBphB5uQFt09nZLYMoehIvtZ5W UMC7ez5XsL3V2nlCNl4GEO2pMmc2M9mMCtbZAOYbTjXWHBm/rjCnUGb5jpi5gW3iVEhr iVLTPXtImiXrGl4WvQvBThDDLtkOiy0J0eHNIJS2Sc0nrSrbX5Xcu55pxu6YEtlddLbt k+nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=C13iuQZOOs8l3W6cjyPSjz0MYxeUNZasj+Qg3oGjRB4=; b=vJa0ITuUbUtQja+LYkqgjCPp6ccskStMA/wsa6PfzXrJ2XWFqvWVlKAXs3GLK5zQDr kvkglhICppVQX+/8E4GAJY5wZbpwnwbb/HE9vCbY4z3D4q8iRcRHQed9uBJ7hJaINTPg Onp8d2zE7ZRsOTM5Tj99FaYmCNgfBB27eHDIEM6Lu+tKCGUP6TuOPHHgYdQ3OHHgw17A par7yctFWJjs3Shk67Nwf+xtsfHa/iAlN+o9dI+MJAuH+rrSzlffDX5+u3kzCvpy76ZM 8EGaLUF9Uv4b2ToINS/sLxZ5z0xzeofgbYi+7FCapWGNmRoocRYSKvlcdr7T6dXssLDj gxQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=TtUdNmEj; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dt18si11689016ejc.322.2021.04.19.07.24.49; Mon, 19 Apr 2021 07:24: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=@gmail.com header.s=20161025 header.b=TtUdNmEj; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 062B2689F7D; Mon, 19 Apr 2021 17:12:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9CEF1689E7C for ; Mon, 19 Apr 2021 17:12:46 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id s5so27075821qkj.5 for ; Mon, 19 Apr 2021 07:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=87DBNnyr883b1UYTFMWtu4WniwZuoY2UqO6aS9hxMIg=; b=TtUdNmEj+sD07zaFvRlfs+3NOn0Cr9weSikeAaEkvSHovP2GNGi4J+PMW1jjiMr1wF N2VUfI8ZvvOiOPbAGXJDkuN/3O/59i621i4fKNjJwqcZjJ6a1Ih3sl5coUxVRQQbBjQX gbBwryfJA1x3wgnulo9q65SffsUDOz3uTVhitbp7RcDhpRk1+BAqdsvstYw1ua7dRJA5 +iMLTXwLQQNI7TUG4yxRXONeJym/CnGgIELXoRBira5jMCc5ouQ7WvKH0kuUqePnuQ5D 8uIJJrw1BNUpYrsX/awq2JjOt45XzQsfy+Zk0hNE+nPT7nT9wcTUe1JV942lGM2jJG4k D7YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=87DBNnyr883b1UYTFMWtu4WniwZuoY2UqO6aS9hxMIg=; b=ZfH6Tgs2RM34Y0GAR8WIokI+kOttsgSpwZJOrnZs8bM9N7fGER5RNklNsuEW3Q9p42 KZMfGu/eUDMYqTrC/UshP5RoKuLksw7EVZaFo4TyueJ99nPm72QEtk5biIdEukz1/btU qW+NyuaSWZXMqGLY3s1TLH6sAlVTJHGqrtqMaOxNCk3fn+DMZHLTnOtQw2g/4W/TrrJg I8c6taa2KdkwiAvf9mFQRTehFy4aeudwA81lDYJapa3Np/8y3A1MDtiI0onvh91vHwPU d5rk745dLzDyDbYCGyFxfe48jynlIO4TJlz/THx1wET9yXghyCXhCdluZDDR6qY+q49W NXPQ== X-Gm-Message-State: AOAM531KSMiz4mBxHeDRmC96UHhEvG0u1FiIpGgpnkEQy2BHjR80Dxcn q7Z0TGu5jxCaftGxhVSdINqG73mcugQ= X-Received: by 2002:a05:620a:1196:: with SMTP id b22mr11759674qkk.159.1618841564815; Mon, 19 Apr 2021 07:12:44 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:44 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:17 -0300 Message-Id: <20210419141024.8174-81-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 80/87] avcodec: Constify all the AVCodecParsers 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ALyATOvtqqKN Content-Length: 31271 From: Andreas Rheinhardt Possible now that the next pointer no longer exists. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac_parser.c | 2 +- libavcodec/ac3_parser.c | 2 +- libavcodec/adx_parser.c | 2 +- libavcodec/av1_parser.c | 2 +- libavcodec/avs2_parser.c | 2 +- libavcodec/avs3_parser.c | 2 +- libavcodec/bmp_parser.c | 2 +- libavcodec/cavs_parser.c | 2 +- libavcodec/cook_parser.c | 2 +- libavcodec/cri_parser.c | 2 +- libavcodec/dca_parser.c | 2 +- libavcodec/dirac_parser.c | 2 +- libavcodec/dnxhd_parser.c | 2 +- libavcodec/dolby_e_parser.c | 2 +- libavcodec/dpx_parser.c | 2 +- libavcodec/dvaudio_parser.c | 2 +- libavcodec/dvbsub_parser.c | 2 +- libavcodec/dvd_nav_parser.c | 2 +- libavcodec/dvdsub_parser.c | 2 +- libavcodec/flac_parser.c | 2 +- libavcodec/g723_1_parser.c | 2 +- libavcodec/g729_parser.c | 2 +- libavcodec/gif_parser.c | 2 +- libavcodec/gsm_parser.c | 2 +- libavcodec/h261_parser.c | 2 +- libavcodec/h263_parser.c | 2 +- libavcodec/h264_parser.c | 2 +- libavcodec/hevc_parser.c | 2 +- libavcodec/ipu_parser.c | 2 +- libavcodec/jpeg2000_parser.c | 2 +- libavcodec/latm_parser.c | 2 +- libavcodec/mjpeg_parser.c | 2 +- libavcodec/mlp_parser.c | 2 +- libavcodec/mpeg4video_parser.c | 2 +- libavcodec/mpegaudio_parser.c | 2 +- libavcodec/mpegvideo_parser.c | 2 +- libavcodec/opus_parser.c | 2 +- libavcodec/parsers.c | 104 ++++++++++++++++----------------- libavcodec/png_parser.c | 2 +- libavcodec/pnm_parser.c | 2 +- libavcodec/rv34_parser.c | 4 +- libavcodec/sbc_parser.c | 2 +- libavcodec/sipr_parser.c | 2 +- libavcodec/tak_parser.c | 2 +- libavcodec/vc1_parser.c | 2 +- libavcodec/vorbis_parser.c | 2 +- libavcodec/vp3_parser.c | 2 +- libavcodec/vp8_parser.c | 2 +- libavcodec/vp9_parser.c | 2 +- libavcodec/webp_parser.c | 2 +- libavcodec/xbm_parser.c | 2 +- libavcodec/xma_parser.c | 2 +- 52 files changed, 104 insertions(+), 104 deletions(-) diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c index b8692625f3..f3baf7cde3 100644 --- a/libavcodec/aac_parser.c +++ b/libavcodec/aac_parser.c @@ -62,7 +62,7 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1) } -AVCodecParser ff_aac_parser = { +const AVCodecParser ff_aac_parser = { .codec_ids = { AV_CODEC_ID_AAC }, .priv_data_size = sizeof(AACAC3ParseContext), .parser_init = aac_parse_init, diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index ba171653ef..9ed6ede5c3 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -240,7 +240,7 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1) } -AVCodecParser ff_ac3_parser = { +const AVCodecParser ff_ac3_parser = { .codec_ids = { AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 }, .priv_data_size = sizeof(AACAC3ParseContext), .parser_init = ac3_parse_init, diff --git a/libavcodec/adx_parser.c b/libavcodec/adx_parser.c index 1fa718f694..52aa14b7ad 100644 --- a/libavcodec/adx_parser.c +++ b/libavcodec/adx_parser.c @@ -88,7 +88,7 @@ static int adx_parse(AVCodecParserContext *s1, return next; } -AVCodecParser ff_adx_parser = { +const AVCodecParser ff_adx_parser = { .codec_ids = { AV_CODEC_ID_ADPCM_ADX }, .priv_data_size = sizeof(ADXParseContext), .parser_parse = adx_parse, diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 6a76ffb7bc..578f5293c8 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -227,7 +227,7 @@ static int av1_parser_split(AVCodecContext *avctx, return 0; } -AVCodecParser ff_av1_parser = { +const AVCodecParser ff_av1_parser = { .codec_ids = { AV_CODEC_ID_AV1 }, .priv_data_size = sizeof(AV1ParseContext), .parser_init = av1_parser_init, diff --git a/libavcodec/avs2_parser.c b/libavcodec/avs2_parser.c index 54f687142f..059faf77c5 100644 --- a/libavcodec/avs2_parser.c +++ b/libavcodec/avs2_parser.c @@ -86,7 +86,7 @@ static int avs2_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_avs2_parser = { +const AVCodecParser ff_avs2_parser = { .codec_ids = { AV_CODEC_ID_AVS2 }, .priv_data_size = sizeof(ParseContext), .parser_parse = avs2_parse, diff --git a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c index bf97f75db6..b0e720a844 100644 --- a/libavcodec/avs3_parser.c +++ b/libavcodec/avs3_parser.c @@ -170,7 +170,7 @@ static int avs3_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_avs3_parser = { +const AVCodecParser ff_avs3_parser = { .codec_ids = { AV_CODEC_ID_AVS3 }, .priv_data_size = sizeof(ParseContext), .parser_parse = avs3_parse, diff --git a/libavcodec/bmp_parser.c b/libavcodec/bmp_parser.c index 700bf27af1..3440794b2c 100644 --- a/libavcodec/bmp_parser.c +++ b/libavcodec/bmp_parser.c @@ -105,7 +105,7 @@ flush: return next; } -AVCodecParser ff_bmp_parser = { +const AVCodecParser ff_bmp_parser = { .codec_ids = { AV_CODEC_ID_BMP }, .priv_data_size = sizeof(BMPParseContext), .parser_parse = bmp_parse, diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c index 6067a39826..20adca1dbc 100644 --- a/libavcodec/cavs_parser.c +++ b/libavcodec/cavs_parser.c @@ -97,7 +97,7 @@ static int cavsvideo_parse(AVCodecParserContext *s, return next; } -AVCodecParser ff_cavsvideo_parser = { +const AVCodecParser ff_cavsvideo_parser = { .codec_ids = { AV_CODEC_ID_CAVS }, .priv_data_size = sizeof(ParseContext), .parser_parse = cavsvideo_parse, diff --git a/libavcodec/cook_parser.c b/libavcodec/cook_parser.c index 6dbbfd8a53..a05ebf94b8 100644 --- a/libavcodec/cook_parser.c +++ b/libavcodec/cook_parser.c @@ -53,7 +53,7 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return buf_size; } -AVCodecParser ff_cook_parser = { +const AVCodecParser ff_cook_parser = { .codec_ids = { AV_CODEC_ID_COOK }, .priv_data_size = sizeof(CookParseContext), .parser_parse = cook_parse, diff --git a/libavcodec/cri_parser.c b/libavcodec/cri_parser.c index 9790747a9e..9295f823ce 100644 --- a/libavcodec/cri_parser.c +++ b/libavcodec/cri_parser.c @@ -97,7 +97,7 @@ static int cri_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_cri_parser = { +const AVCodecParser ff_cri_parser = { .codec_ids = { AV_CODEC_ID_CRI }, .priv_data_size = sizeof(CRIParser), .parser_parse = cri_parse, diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index 80d665985e..8b5c354312 100644 --- a/libavcodec/dca_parser.c +++ b/libavcodec/dca_parser.c @@ -343,7 +343,7 @@ static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_dca_parser = { +const AVCodecParser ff_dca_parser = { .codec_ids = { AV_CODEC_ID_DTS }, .priv_data_size = sizeof(DCAParseContext), .parser_init = dca_parse_init, diff --git a/libavcodec/dirac_parser.c b/libavcodec/dirac_parser.c index 8e68b4a9da..912f594243 100644 --- a/libavcodec/dirac_parser.c +++ b/libavcodec/dirac_parser.c @@ -273,7 +273,7 @@ static void dirac_parse_close(AVCodecParserContext *s) av_freep(&pc->buffer); } -AVCodecParser ff_dirac_parser = { +const AVCodecParser ff_dirac_parser = { .codec_ids = { AV_CODEC_ID_DIRAC }, .priv_data_size = sizeof(DiracParseContext), .parser_parse = dirac_parse, diff --git a/libavcodec/dnxhd_parser.c b/libavcodec/dnxhd_parser.c index 63b4ff89e1..4ba619c9bb 100644 --- a/libavcodec/dnxhd_parser.c +++ b/libavcodec/dnxhd_parser.c @@ -138,7 +138,7 @@ static int dnxhd_parse(AVCodecParserContext *s, return next; } -AVCodecParser ff_dnxhd_parser = { +const AVCodecParser ff_dnxhd_parser = { .codec_ids = { AV_CODEC_ID_DNXHD }, .priv_data_size = sizeof(DNXHDParserContext), .parser_parse = dnxhd_parse, diff --git a/libavcodec/dolby_e_parser.c b/libavcodec/dolby_e_parser.c index 3ae973bddf..8e187523f3 100644 --- a/libavcodec/dolby_e_parser.c +++ b/libavcodec/dolby_e_parser.c @@ -62,7 +62,7 @@ end: return buf_size; } -AVCodecParser ff_dolby_e_parser = { +const AVCodecParser ff_dolby_e_parser = { .codec_ids = { AV_CODEC_ID_DOLBY_E }, .priv_data_size = sizeof(DBEParseContext), .parser_parse = dolby_e_parse, diff --git a/libavcodec/dpx_parser.c b/libavcodec/dpx_parser.c index 8e4a01e09d..b74e6c5c68 100644 --- a/libavcodec/dpx_parser.c +++ b/libavcodec/dpx_parser.c @@ -108,7 +108,7 @@ flush: return next; } -AVCodecParser ff_dpx_parser = { +const AVCodecParser ff_dpx_parser = { .codec_ids = { AV_CODEC_ID_DPX }, .priv_data_size = sizeof(DPXParseContext), .parser_parse = dpx_parse, diff --git a/libavcodec/dvaudio_parser.c b/libavcodec/dvaudio_parser.c index 160faafdb7..ef6bd45582 100644 --- a/libavcodec/dvaudio_parser.c +++ b/libavcodec/dvaudio_parser.c @@ -40,7 +40,7 @@ static int dvaudio_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return buf_size; } -AVCodecParser ff_dvaudio_parser = { +const AVCodecParser ff_dvaudio_parser = { .codec_ids = { AV_CODEC_ID_DVAUDIO }, .parser_parse = dvaudio_parse, }; diff --git a/libavcodec/dvbsub_parser.c b/libavcodec/dvbsub_parser.c index b7a3d6154c..3dd97200b4 100644 --- a/libavcodec/dvbsub_parser.c +++ b/libavcodec/dvbsub_parser.c @@ -165,7 +165,7 @@ static int dvbsub_parse(AVCodecParserContext *s, return buf_size; } -AVCodecParser ff_dvbsub_parser = { +const AVCodecParser ff_dvbsub_parser = { .codec_ids = { AV_CODEC_ID_DVB_SUBTITLE }, .priv_data_size = sizeof(DVBSubParseContext), .parser_parse = dvbsub_parse, diff --git a/libavcodec/dvd_nav_parser.c b/libavcodec/dvd_nav_parser.c index 6e2352dc3c..3ea4cd1ef5 100644 --- a/libavcodec/dvd_nav_parser.c +++ b/libavcodec/dvd_nav_parser.c @@ -107,7 +107,7 @@ static int dvd_nav_parse(AVCodecParserContext *s, return buf_size; } -AVCodecParser ff_dvd_nav_parser = { +const AVCodecParser ff_dvd_nav_parser = { .codec_ids = { AV_CODEC_ID_DVD_NAV }, .priv_data_size = sizeof(DVDNavParseContext), .parser_init = dvd_nav_parse_init, diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c index 054af69db9..44738a73d6 100644 --- a/libavcodec/dvdsub_parser.c +++ b/libavcodec/dvdsub_parser.c @@ -84,7 +84,7 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s) av_freep(&pc->packet); } -AVCodecParser ff_dvdsub_parser = { +const AVCodecParser ff_dvdsub_parser = { .codec_ids = { AV_CODEC_ID_DVD_SUBTITLE }, .priv_data_size = sizeof(DVDSubParseContext), .parser_parse = dvdsub_parse, diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 3424583c49..d3d9c889a1 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -742,7 +742,7 @@ static void flac_parse_close(AVCodecParserContext *c) av_freep(&fpc->wrap_buf); } -AVCodecParser ff_flac_parser = { +const AVCodecParser ff_flac_parser = { .codec_ids = { AV_CODEC_ID_FLAC }, .priv_data_size = sizeof(FLACParseContext), .parser_init = flac_parse_init, diff --git a/libavcodec/g723_1_parser.c b/libavcodec/g723_1_parser.c index 0305ca329d..b6b3fcb84b 100644 --- a/libavcodec/g723_1_parser.c +++ b/libavcodec/g723_1_parser.c @@ -52,7 +52,7 @@ static int g723_1_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return next; } -AVCodecParser ff_g723_1_parser = { +const AVCodecParser ff_g723_1_parser = { .codec_ids = { AV_CODEC_ID_G723_1 }, .priv_data_size = sizeof(G723_1ParseContext), .parser_parse = g723_1_parse, diff --git a/libavcodec/g729_parser.c b/libavcodec/g729_parser.c index 010f688104..76d6f93808 100644 --- a/libavcodec/g729_parser.c +++ b/libavcodec/g729_parser.c @@ -82,7 +82,7 @@ static int g729_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return next; } -AVCodecParser ff_g729_parser = { +const AVCodecParser ff_g729_parser = { .codec_ids = { AV_CODEC_ID_G729, AV_CODEC_ID_ACELP_KELVIN }, .priv_data_size = sizeof(G729ParseContext), .parser_parse = g729_parse, diff --git a/libavcodec/gif_parser.c b/libavcodec/gif_parser.c index e88338fd47..a32bfa570a 100644 --- a/libavcodec/gif_parser.c +++ b/libavcodec/gif_parser.c @@ -180,7 +180,7 @@ static int gif_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_gif_parser = { +const AVCodecParser ff_gif_parser = { .codec_ids = { AV_CODEC_ID_GIF }, .priv_data_size = sizeof(GIFParseContext), .parser_parse = gif_parse, diff --git a/libavcodec/gsm_parser.c b/libavcodec/gsm_parser.c index 1054a30ca9..3492806052 100644 --- a/libavcodec/gsm_parser.c +++ b/libavcodec/gsm_parser.c @@ -83,7 +83,7 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return next; } -AVCodecParser ff_gsm_parser = { +const AVCodecParser ff_gsm_parser = { .codec_ids = { AV_CODEC_ID_GSM, AV_CODEC_ID_GSM_MS }, .priv_data_size = sizeof(GSMParseContext), .parser_parse = gsm_parse, diff --git a/libavcodec/h261_parser.c b/libavcodec/h261_parser.c index 2299c1cfc5..e0b84c509e 100644 --- a/libavcodec/h261_parser.c +++ b/libavcodec/h261_parser.c @@ -86,7 +86,7 @@ static int h261_parse(AVCodecParserContext *s, return next; } -AVCodecParser ff_h261_parser = { +const AVCodecParser ff_h261_parser = { .codec_ids = { AV_CODEC_ID_H261 }, .priv_data_size = sizeof(ParseContext), .parser_parse = h261_parse, diff --git a/libavcodec/h263_parser.c b/libavcodec/h263_parser.c index 2e7d4930c3..e05b8a4ac4 100644 --- a/libavcodec/h263_parser.c +++ b/libavcodec/h263_parser.c @@ -87,7 +87,7 @@ static int h263_parse(AVCodecParserContext *s, return next; } -AVCodecParser ff_h263_parser = { +const AVCodecParser ff_h263_parser = { .codec_ids = { AV_CODEC_ID_H263 }, .priv_data_size = sizeof(ParseContext), .parser_parse = h263_parse, diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index aacd44cf3b..880ccb50fa 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -702,7 +702,7 @@ static av_cold int init(AVCodecParserContext *s) return 0; } -AVCodecParser ff_h264_parser = { +const AVCodecParser ff_h264_parser = { .codec_ids = { AV_CODEC_ID_H264 }, .priv_data_size = sizeof(H264ParseContext), .parser_init = init, diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index 463d352055..320d4eb562 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -380,7 +380,7 @@ static void hevc_parser_close(AVCodecParserContext *s) av_freep(&ctx->pc.buffer); } -AVCodecParser ff_hevc_parser = { +const AVCodecParser ff_hevc_parser = { .codec_ids = { AV_CODEC_ID_HEVC }, .priv_data_size = sizeof(HEVCParserContext), .parser_parse = hevc_parse, diff --git a/libavcodec/ipu_parser.c b/libavcodec/ipu_parser.c index c22172f0bf..1193a65b1b 100644 --- a/libavcodec/ipu_parser.c +++ b/libavcodec/ipu_parser.c @@ -69,7 +69,7 @@ static int ipu_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_ipu_parser = { +const AVCodecParser ff_ipu_parser = { .codec_ids = { AV_CODEC_ID_IPU }, .priv_data_size = sizeof(IPUParseContext), .parser_parse = ipu_parse, diff --git a/libavcodec/jpeg2000_parser.c b/libavcodec/jpeg2000_parser.c index 5923e8f433..123197fdca 100644 --- a/libavcodec/jpeg2000_parser.c +++ b/libavcodec/jpeg2000_parser.c @@ -182,7 +182,7 @@ static int jpeg2000_parse(AVCodecParserContext *s, return next; } -AVCodecParser ff_jpeg2000_parser = { +const AVCodecParser ff_jpeg2000_parser = { .codec_ids = { AV_CODEC_ID_JPEG2000 }, .priv_data_size = sizeof(JPEG2000ParserContext), .parser_parse = jpeg2000_parse, diff --git a/libavcodec/latm_parser.c b/libavcodec/latm_parser.c index 3820f58d69..8cc2024c4f 100644 --- a/libavcodec/latm_parser.c +++ b/libavcodec/latm_parser.c @@ -104,7 +104,7 @@ static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return next; } -AVCodecParser ff_aac_latm_parser = { +const AVCodecParser ff_aac_latm_parser = { .codec_ids = { AV_CODEC_ID_AAC_LATM }, .priv_data_size = sizeof(LATMParseContext), .parser_parse = latm_parse, diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c index f54fdd37cb..16a5902c7c 100644 --- a/libavcodec/mjpeg_parser.c +++ b/libavcodec/mjpeg_parser.c @@ -128,7 +128,7 @@ static int jpeg_parse(AVCodecParserContext *s, } -AVCodecParser ff_mjpeg_parser = { +const AVCodecParser ff_mjpeg_parser = { .codec_ids = { AV_CODEC_ID_MJPEG, AV_CODEC_ID_JPEGLS }, .priv_data_size = sizeof(MJPEGParserContext), .parser_parse = jpeg_parse, diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c index e7162f4aa8..9fea7db955 100644 --- a/libavcodec/mlp_parser.c +++ b/libavcodec/mlp_parser.c @@ -208,7 +208,7 @@ lost_sync: return 1; } -AVCodecParser ff_mlp_parser = { +const AVCodecParser ff_mlp_parser = { .codec_ids = { AV_CODEC_ID_MLP, AV_CODEC_ID_TRUEHD }, .priv_data_size = sizeof(MLPParseContext), .parser_init = mlp_init, diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c index 9ca0f14976..afa10c7727 100644 --- a/libavcodec/mpeg4video_parser.c +++ b/libavcodec/mpeg4video_parser.c @@ -153,7 +153,7 @@ static int mpeg4video_parse(AVCodecParserContext *s, return next; } -AVCodecParser ff_mpeg4video_parser = { +const AVCodecParser ff_mpeg4video_parser = { .codec_ids = { AV_CODEC_ID_MPEG4 }, .priv_data_size = sizeof(struct Mp4vParseContext), .parser_init = mpeg4video_parse_init, diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index 1005e89aae..2549503d35 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -135,7 +135,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, } -AVCodecParser ff_mpegaudio_parser = { +const AVCodecParser ff_mpegaudio_parser = { .codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3, AV_CODEC_ID_MP3ADU }, .priv_data_size = sizeof(MpegAudioParseContext), .parser_parse = mpegaudio_parse, diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index c02cd7f92f..4e4f569b13 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -236,7 +236,7 @@ static int mpegvideo_parse_init(AVCodecParserContext *s) return 0; } -AVCodecParser ff_mpegvideo_parser = { +const AVCodecParser ff_mpegvideo_parser = { .codec_ids = { AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO }, .priv_data_size = sizeof(struct MpvParseContext), .parser_init = mpegvideo_parse_init, diff --git a/libavcodec/opus_parser.c b/libavcodec/opus_parser.c index 28b0933900..726c010f67 100644 --- a/libavcodec/opus_parser.c +++ b/libavcodec/opus_parser.c @@ -190,7 +190,7 @@ static int opus_parse(AVCodecParserContext *ctx, AVCodecContext *avctx, return next; } -AVCodecParser ff_opus_parser = { +const AVCodecParser ff_opus_parser = { .codec_ids = { AV_CODEC_ID_OPUS }, .priv_data_size = sizeof(OpusParseContext), .parser_parse = opus_parse, diff --git a/libavcodec/parsers.c b/libavcodec/parsers.c index 40b42e6d1a..5ab1a226d9 100644 --- a/libavcodec/parsers.c +++ b/libavcodec/parsers.c @@ -20,58 +20,58 @@ #include "avcodec.h" -extern AVCodecParser ff_aac_parser; -extern AVCodecParser ff_aac_latm_parser; -extern AVCodecParser ff_ac3_parser; -extern AVCodecParser ff_adx_parser; -extern AVCodecParser ff_av1_parser; -extern AVCodecParser ff_avs2_parser; -extern AVCodecParser ff_avs3_parser; -extern AVCodecParser ff_bmp_parser; -extern AVCodecParser ff_cavsvideo_parser; -extern AVCodecParser ff_cook_parser; -extern AVCodecParser ff_cri_parser; -extern AVCodecParser ff_dca_parser; -extern AVCodecParser ff_dirac_parser; -extern AVCodecParser ff_dnxhd_parser; -extern AVCodecParser ff_dolby_e_parser; -extern AVCodecParser ff_dpx_parser; -extern AVCodecParser ff_dvaudio_parser; -extern AVCodecParser ff_dvbsub_parser; -extern AVCodecParser ff_dvdsub_parser; -extern AVCodecParser ff_dvd_nav_parser; -extern AVCodecParser ff_flac_parser; -extern AVCodecParser ff_g723_1_parser; -extern AVCodecParser ff_g729_parser; -extern AVCodecParser ff_gif_parser; -extern AVCodecParser ff_gsm_parser; -extern AVCodecParser ff_h261_parser; -extern AVCodecParser ff_h263_parser; -extern AVCodecParser ff_h264_parser; -extern AVCodecParser ff_hevc_parser; -extern AVCodecParser ff_ipu_parser; -extern AVCodecParser ff_jpeg2000_parser; -extern AVCodecParser ff_mjpeg_parser; -extern AVCodecParser ff_mlp_parser; -extern AVCodecParser ff_mpeg4video_parser; -extern AVCodecParser ff_mpegaudio_parser; -extern AVCodecParser ff_mpegvideo_parser; -extern AVCodecParser ff_opus_parser; -extern AVCodecParser ff_png_parser; -extern AVCodecParser ff_pnm_parser; -extern AVCodecParser ff_rv30_parser; -extern AVCodecParser ff_rv40_parser; -extern AVCodecParser ff_sbc_parser; -extern AVCodecParser ff_sipr_parser; -extern AVCodecParser ff_tak_parser; -extern AVCodecParser ff_vc1_parser; -extern AVCodecParser ff_vorbis_parser; -extern AVCodecParser ff_vp3_parser; -extern AVCodecParser ff_vp8_parser; -extern AVCodecParser ff_vp9_parser; -extern AVCodecParser ff_webp_parser; -extern AVCodecParser ff_xbm_parser; -extern AVCodecParser ff_xma_parser; +extern const AVCodecParser ff_aac_parser; +extern const AVCodecParser ff_aac_latm_parser; +extern const AVCodecParser ff_ac3_parser; +extern const AVCodecParser ff_adx_parser; +extern const AVCodecParser ff_av1_parser; +extern const AVCodecParser ff_avs2_parser; +extern const AVCodecParser ff_avs3_parser; +extern const AVCodecParser ff_bmp_parser; +extern const AVCodecParser ff_cavsvideo_parser; +extern const AVCodecParser ff_cook_parser; +extern const AVCodecParser ff_cri_parser; +extern const AVCodecParser ff_dca_parser; +extern const AVCodecParser ff_dirac_parser; +extern const AVCodecParser ff_dnxhd_parser; +extern const AVCodecParser ff_dolby_e_parser; +extern const AVCodecParser ff_dpx_parser; +extern const AVCodecParser ff_dvaudio_parser; +extern const AVCodecParser ff_dvbsub_parser; +extern const AVCodecParser ff_dvdsub_parser; +extern const AVCodecParser ff_dvd_nav_parser; +extern const AVCodecParser ff_flac_parser; +extern const AVCodecParser ff_g723_1_parser; +extern const AVCodecParser ff_g729_parser; +extern const AVCodecParser ff_gif_parser; +extern const AVCodecParser ff_gsm_parser; +extern const AVCodecParser ff_h261_parser; +extern const AVCodecParser ff_h263_parser; +extern const AVCodecParser ff_h264_parser; +extern const AVCodecParser ff_hevc_parser; +extern const AVCodecParser ff_ipu_parser; +extern const AVCodecParser ff_jpeg2000_parser; +extern const AVCodecParser ff_mjpeg_parser; +extern const AVCodecParser ff_mlp_parser; +extern const AVCodecParser ff_mpeg4video_parser; +extern const AVCodecParser ff_mpegaudio_parser; +extern const AVCodecParser ff_mpegvideo_parser; +extern const AVCodecParser ff_opus_parser; +extern const AVCodecParser ff_png_parser; +extern const AVCodecParser ff_pnm_parser; +extern const AVCodecParser ff_rv30_parser; +extern const AVCodecParser ff_rv40_parser; +extern const AVCodecParser ff_sbc_parser; +extern const AVCodecParser ff_sipr_parser; +extern const AVCodecParser ff_tak_parser; +extern const AVCodecParser ff_vc1_parser; +extern const AVCodecParser ff_vorbis_parser; +extern const AVCodecParser ff_vp3_parser; +extern const AVCodecParser ff_vp8_parser; +extern const AVCodecParser ff_vp9_parser; +extern const AVCodecParser ff_webp_parser; +extern const AVCodecParser ff_xbm_parser; +extern const AVCodecParser ff_xma_parser; #include "libavcodec/parser_list.c" diff --git a/libavcodec/png_parser.c b/libavcodec/png_parser.c index 9ec8551a1b..314de1b436 100644 --- a/libavcodec/png_parser.c +++ b/libavcodec/png_parser.c @@ -110,7 +110,7 @@ flush: return next; } -AVCodecParser ff_png_parser = { +const AVCodecParser ff_png_parser = { .codec_ids = { AV_CODEC_ID_PNG }, .priv_data_size = sizeof(PNGParseContext), .parser_parse = png_parse, diff --git a/libavcodec/pnm_parser.c b/libavcodec/pnm_parser.c index a822c17a2e..f8eb2e7eda 100644 --- a/libavcodec/pnm_parser.c +++ b/libavcodec/pnm_parser.c @@ -131,7 +131,7 @@ end: return next; } -AVCodecParser ff_pnm_parser = { +const AVCodecParser ff_pnm_parser = { .codec_ids = { AV_CODEC_ID_PGM, AV_CODEC_ID_PGMYUV, AV_CODEC_ID_PPM, AV_CODEC_ID_PBM, AV_CODEC_ID_PAM }, .priv_data_size = sizeof(PNMParseContext), diff --git a/libavcodec/rv34_parser.c b/libavcodec/rv34_parser.c index 765d390550..03469ed0d1 100644 --- a/libavcodec/rv34_parser.c +++ b/libavcodec/rv34_parser.c @@ -77,7 +77,7 @@ static int rv34_parse(AVCodecParserContext *s, } #if CONFIG_RV30_PARSER -AVCodecParser ff_rv30_parser = { +const AVCodecParser ff_rv30_parser = { .codec_ids = { AV_CODEC_ID_RV30 }, .priv_data_size = sizeof(RV34ParseContext), .parser_parse = rv34_parse, @@ -85,7 +85,7 @@ AVCodecParser ff_rv30_parser = { #endif #if CONFIG_RV40_PARSER -AVCodecParser ff_rv40_parser = { +const AVCodecParser ff_rv40_parser = { .codec_ids = { AV_CODEC_ID_RV40 }, .priv_data_size = sizeof(RV34ParseContext), .parser_parse = rv34_parse, diff --git a/libavcodec/sbc_parser.c b/libavcodec/sbc_parser.c index 5549b1951c..8bf726b39e 100644 --- a/libavcodec/sbc_parser.c +++ b/libavcodec/sbc_parser.c @@ -112,7 +112,7 @@ static int sbc_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_sbc_parser = { +const AVCodecParser ff_sbc_parser = { .codec_ids = { AV_CODEC_ID_SBC }, .priv_data_size = sizeof(SBCParseContext), .parser_parse = sbc_parse, diff --git a/libavcodec/sipr_parser.c b/libavcodec/sipr_parser.c index fba25e1028..e01da3c8a8 100644 --- a/libavcodec/sipr_parser.c +++ b/libavcodec/sipr_parser.c @@ -66,7 +66,7 @@ static int sipr_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return next; } -AVCodecParser ff_sipr_parser = { +const AVCodecParser ff_sipr_parser = { .codec_ids = { AV_CODEC_ID_SIPR }, .priv_data_size = sizeof(SiprParserContext), .parser_parse = sipr_parse, diff --git a/libavcodec/tak_parser.c b/libavcodec/tak_parser.c index 3604b35443..b9f47db8ac 100644 --- a/libavcodec/tak_parser.c +++ b/libavcodec/tak_parser.c @@ -122,7 +122,7 @@ fail: return buf_size + consumed; } -AVCodecParser ff_tak_parser = { +const AVCodecParser ff_tak_parser = { .codec_ids = { AV_CODEC_ID_TAK }, .priv_data_size = sizeof(TAKParseContext), .parser_parse = tak_parse, diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 1a9d3c0140..0f17d299e1 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -287,7 +287,7 @@ static av_cold int vc1_parse_init(AVCodecParserContext *s) return 0; } -AVCodecParser ff_vc1_parser = { +const AVCodecParser ff_vc1_parser = { .codec_ids = { AV_CODEC_ID_VC1 }, .priv_data_size = sizeof(VC1ParseContext), .parser_init = vc1_parse_init, diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c index 0b2c97cde5..194ae13da3 100644 --- a/libavcodec/vorbis_parser.c +++ b/libavcodec/vorbis_parser.c @@ -332,7 +332,7 @@ static void vorbis_parser_close(AVCodecParserContext *ctx) av_vorbis_parse_free(&s->vp); } -AVCodecParser ff_vorbis_parser = { +const AVCodecParser ff_vorbis_parser = { .codec_ids = { AV_CODEC_ID_VORBIS }, .priv_data_size = sizeof(VorbisParseContext), .parser_parse = vorbis_parse, diff --git a/libavcodec/vp3_parser.c b/libavcodec/vp3_parser.c index 7ee046c543..1bed43e779 100644 --- a/libavcodec/vp3_parser.c +++ b/libavcodec/vp3_parser.c @@ -35,7 +35,7 @@ static int parse(AVCodecParserContext *s, return buf_size; } -AVCodecParser ff_vp3_parser = { +const AVCodecParser ff_vp3_parser = { .codec_ids = { AV_CODEC_ID_THEORA, AV_CODEC_ID_VP3, AV_CODEC_ID_VP6, AV_CODEC_ID_VP6F, AV_CODEC_ID_VP6A diff --git a/libavcodec/vp8_parser.c b/libavcodec/vp8_parser.c index 7ce35e7535..98b752bfb9 100644 --- a/libavcodec/vp8_parser.c +++ b/libavcodec/vp8_parser.c @@ -73,7 +73,7 @@ static int parse(AVCodecParserContext *s, return buf_size; } -AVCodecParser ff_vp8_parser = { +const AVCodecParser ff_vp8_parser = { .codec_ids = { AV_CODEC_ID_VP8 }, .parser_parse = parse, }; diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c index c957a75667..ffcb93505f 100644 --- a/libavcodec/vp9_parser.c +++ b/libavcodec/vp9_parser.c @@ -64,7 +64,7 @@ static int parse(AVCodecParserContext *ctx, return size; } -AVCodecParser ff_vp9_parser = { +const AVCodecParser ff_vp9_parser = { .codec_ids = { AV_CODEC_ID_VP9 }, .parser_parse = parse, }; diff --git a/libavcodec/webp_parser.c b/libavcodec/webp_parser.c index fdb7c38350..bd5f94dac5 100644 --- a/libavcodec/webp_parser.c +++ b/libavcodec/webp_parser.c @@ -104,7 +104,7 @@ flush: return next; } -AVCodecParser ff_webp_parser = { +const AVCodecParser ff_webp_parser = { .codec_ids = { AV_CODEC_ID_WEBP }, .priv_data_size = sizeof(WebPParseContext), .parser_parse = webp_parse, diff --git a/libavcodec/xbm_parser.c b/libavcodec/xbm_parser.c index 6b0eea69ad..28aae49ee3 100644 --- a/libavcodec/xbm_parser.c +++ b/libavcodec/xbm_parser.c @@ -97,7 +97,7 @@ static int xbm_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -AVCodecParser ff_xbm_parser = { +const AVCodecParser ff_xbm_parser = { .codec_ids = { AV_CODEC_ID_XBM }, .priv_data_size = sizeof(XBMParseContext), .parser_init = xbm_init, diff --git a/libavcodec/xma_parser.c b/libavcodec/xma_parser.c index 0513679272..dc8a197c67 100644 --- a/libavcodec/xma_parser.c +++ b/libavcodec/xma_parser.c @@ -55,7 +55,7 @@ static int xma_parse(AVCodecParserContext *s1, AVCodecContext *avctx, return buf_size; } -AVCodecParser ff_xma_parser = { +const AVCodecParser ff_xma_parser = { .codec_ids = { AV_CODEC_ID_XMA2 }, .priv_data_size = sizeof(XMAParserContext), .parser_parse = xma_parse, From patchwork Mon Apr 19 14:10:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27070 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp566888iob; Mon, 19 Apr 2021 07:25:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdeVi8X3OwN/AK+yfWtHqjo6MjZms7YjrJzE15kfgN+9eyZfsApL7THRkit4xlDpb9YG6q X-Received: by 2002:aa7:cf16:: with SMTP id a22mr6328287edy.23.1618842301784; Mon, 19 Apr 2021 07:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842301; cv=none; d=google.com; s=arc-20160816; b=DBfDlhWvzcDEL9k+dTOvmi9Fvviatn8iBGHvTmmVTSPGgSEnT51TTWylZpABY8DQOT a9rzEoJakgVdmpsZMw4rvNu5ld8jVz2OD1bJz5Y9ezwN+uT0zR/elSi3DMDQIFeL+tcp /rmQ0CW6YPnCf2PSsT545i9CGdugX64EtECIKfqca1dSTRA71jHETaPEbIChAxLB+XAd NhYJQ6JIaHroZHCsZCey5Gx9ZJevrduCLpXXImlUJr088aG7m1iR0Dn/gTQvphqUOzIS NVU8Fw6bFdEzKONUVy3n7aTiSupIpodk4F5DNV1OzsjRokuiEoO3AncoFYNr6fq5lYUF eVUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=6G20VCmPgl8yihUaI9aQFu4JWnTS2sUBs5CA0TVWvJ8=; b=Kk8C/d9Jekc6NemQqYgngHSjtOVdpVyaqwAKIR94zuqywlkqcjUU4pyXtgASCiTX8m RobuH4WQCgLD1RpJt7xozx7B7aSyVXaFOlKIICWXKPrbfYA3iW/RZNRmSxU85zg1pEj9 wLlcugqqF9dvGp7I4T+S7UnEt+LMZn5gwyFTvLk43i4Z4QhdRTR0bd2CvAtYM0FZGv5d Ep1RMTT7LbS6d7RzaXDWEsAj5LLIbRh6htlaKQmu4zKW9hbQxWDzJJagVmsSG+M14qnT GxKukMjsYKLhST6dzKa3j+yRNED5kc4BNyyVVEksk1+GFj5bS5Zzdij36kGZsyJWB5fq wMpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=NuigSref; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s21si12976993ejm.689.2021.04.19.07.25.01; Mon, 19 Apr 2021 07:25: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=@gmail.com header.s=20161025 header.b=NuigSref; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B5469689F14; Mon, 19 Apr 2021 17:12:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CC114680856 for ; Mon, 19 Apr 2021 17:12:47 +0300 (EEST) Received: by mail-qk1-f176.google.com with SMTP id s5so27075895qkj.5 for ; Mon, 19 Apr 2021 07:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+pxUAhNilDZrFeQMD8P+bwVz3x8o08kWJBtTu9BFAy0=; b=NuigSrefmW+s+Xi6uw3cmprTKWgK5+ZKIB5x4uZNHbj9QTQujBmhgi5/nY0zuqqBgH KOQbqD04RmGHzI9yP/HSNTpfEwiWsqKPiTY/1Guoc7EXAMfy7646FhVyKBKrDj50tl8l jpJAGEOUm0EklwxxRp3rhwY5gLK7cE8dXVewwsPNjU/2llScND0SMoAhJy/shcg5xo5n UfDObTT5XTaDumg1KE1Vq6BEnhrrE7MurNbVJeTCA254xrrfIUdAw5UCgiaxPj6OVFNE 52yxBsAgCbiKq64VoBgsu8u0TyZuz2Ru91IGsTt8kThY8/s0Oqus316dx5aCAIl3g4k5 WntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+pxUAhNilDZrFeQMD8P+bwVz3x8o08kWJBtTu9BFAy0=; b=o+/Fvo08xnbjHjy+tq2Gtk/weg7shQ1YLEm685Pph2ai4k07Dsgik93U9JKe/vWT71 SVuNWCrh7H9jam64FpyRpXF+Vq5ab2/SSVqlR5HfnS31lD8WxqY36vkByy77MN2pouvm nJTyfofOu0Tt8aPpK+vzLZg4SRX7s3rrRlfmLXXnWB8gFVBzJrf3ENDzc3wLJWg4NAZt eBHm3YC3muwwkGRXcoX2y3tzjUbnZA3n6bZ2wxpu02VSqbYdiFg9EeesZX3JZ7h4TAP/ Qz3dkNX72xsH6kO5iVWWci4GwMdonKPX0sqIfeU9MoZp0LsP3EHO9cZP0b81KgSCWZ5d cV+g== X-Gm-Message-State: AOAM533DPYXR5Vjqcqb5RXyMVPdMWcndtXpIcFAue+Txk6Rhj/KWplLs K7YjLuDu4MXyBiBmdE/vxJpUBuUMVWI= X-Received: by 2002:a05:620a:1181:: with SMTP id b1mr12061998qkk.81.1618841566209; Mon, 19 Apr 2021 07:12:46 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:45 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:10:18 -0300 Message-Id: <20210419141024.8174-82-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 81/87] avcodec: Move all AVCodecParser.split functions to remove_extradata_bsf 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: QpXgAOQunpcQ From: Andreas Rheinhardt The remove_extradata bsf is the only user of these functions. Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 4 +- libavcodec/av1_parser.c | 25 +--- libavcodec/avs2_parser.c | 1 - libavcodec/avs3_parser.c | 1 - libavcodec/cavs_parser.c | 1 - libavcodec/h264_parser.c | 38 ------ libavcodec/hevc_parser.c | 34 ----- libavcodec/mpeg4video_parser.c | 1 - libavcodec/mpegvideo_parser.c | 18 --- libavcodec/parser.c | 14 --- libavcodec/remove_extradata_bsf.c | 201 +++++++++++++++++++++++++----- libavcodec/vc1_parser.c | 19 --- 12 files changed, 171 insertions(+), 186 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index a640c548e5..c19a3cb60d 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1075,7 +1075,7 @@ OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \ mpeg4audio.o OBJS-$(CONFIG_AC3_PARSER) += ac3tab.o aac_ac3_parser.o OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o adx.o -OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o av1_parse.o +OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o OBJS-$(CONFIG_AVS2_PARSER) += avs2_parser.o OBJS-$(CONFIG_AVS3_PARSER) += avs3_parser.o OBJS-$(CONFIG_BMP_PARSER) += bmp_parser.o @@ -1159,7 +1159,7 @@ OBJS-$(CONFIG_NULL_BSF) += null_bsf.o OBJS-$(CONFIG_OPUS_METADATA_BSF) += opus_metadata_bsf.o OBJS-$(CONFIG_PCM_RECHUNK_BSF) += pcm_rechunk_bsf.o OBJS-$(CONFIG_PRORES_METADATA_BSF) += prores_metadata_bsf.o -OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += remove_extradata_bsf.o +OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += remove_extradata_bsf.o av1_parse.o OBJS-$(CONFIG_SETTS_BSF) += setts_bsf.o OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o OBJS-$(CONFIG_TRACE_HEADERS_BSF) += trace_headers_bsf.o diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 578f5293c8..b6c8004ee3 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "av1_parse.h" +#include "libavutil/avassert.h" #include "cbs.h" #include "cbs_av1.h" #include "internal.h" @@ -205,33 +205,10 @@ static void av1_parser_close(AVCodecParserContext *ctx) ff_cbs_close(&s->cbc); } -static int av1_parser_split(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) -{ - AV1OBU obu; - const uint8_t *ptr = buf, *end = buf + buf_size; - - while (ptr < end) { - int len = ff_av1_extract_obu(&obu, ptr, buf_size, avctx); - if (len < 0) - break; - - if (obu.type == AV1_OBU_FRAME_HEADER || - obu.type == AV1_OBU_FRAME) { - return ptr - buf; - } - ptr += len; - buf_size -= len; - } - - return 0; -} - const AVCodecParser ff_av1_parser = { .codec_ids = { AV_CODEC_ID_AV1 }, .priv_data_size = sizeof(AV1ParseContext), .parser_init = av1_parser_init, .parser_close = av1_parser_close, .parser_parse = av1_parser_parse, - .split = av1_parser_split, }; diff --git a/libavcodec/avs2_parser.c b/libavcodec/avs2_parser.c index 059faf77c5..b7d5d7774e 100644 --- a/libavcodec/avs2_parser.c +++ b/libavcodec/avs2_parser.c @@ -91,5 +91,4 @@ const AVCodecParser ff_avs2_parser = { .priv_data_size = sizeof(ParseContext), .parser_parse = avs2_parse, .parser_close = ff_parse_close, - .split = ff_mpeg4video_split, }; diff --git a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c index b0e720a844..1a05ea042e 100644 --- a/libavcodec/avs3_parser.c +++ b/libavcodec/avs3_parser.c @@ -175,5 +175,4 @@ const AVCodecParser ff_avs3_parser = { .priv_data_size = sizeof(ParseContext), .parser_parse = avs3_parse, .parser_close = ff_parse_close, - .split = ff_mpeg4video_split, }; diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c index 20adca1dbc..03f392c2e5 100644 --- a/libavcodec/cavs_parser.c +++ b/libavcodec/cavs_parser.c @@ -102,5 +102,4 @@ const AVCodecParser ff_cavsvideo_parser = { .priv_data_size = sizeof(ParseContext), .parser_parse = cavsvideo_parse, .parser_close = ff_parse_close, - .split = ff_mpeg4video_split, }; diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 880ccb50fa..d3c56cc188 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -644,43 +644,6 @@ static int h264_parse(AVCodecParserContext *s, return next; } -static int h264_split(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) -{ - uint32_t state = -1; - int has_sps = 0; - int has_pps = 0; - const uint8_t *ptr = buf, *end = buf + buf_size; - int nalu_type; - - while (ptr < end) { - ptr = avpriv_find_start_code(ptr, end, &state); - if ((state & 0xFFFFFF00) != 0x100) - break; - nalu_type = state & 0x1F; - if (nalu_type == H264_NAL_SPS) { - has_sps = 1; - } else if (nalu_type == H264_NAL_PPS) - has_pps = 1; - /* else if (nalu_type == 0x01 || - * nalu_type == 0x02 || - * nalu_type == 0x05) { - * } - */ - else if ((nalu_type != H264_NAL_SEI || has_pps) && - nalu_type != H264_NAL_AUD && nalu_type != H264_NAL_SPS_EXT && - nalu_type != 0x0f) { - if (has_sps) { - while (ptr - 4 > buf && ptr[-5] == 0) - ptr--; - return ptr - 4 - buf; - } - } - } - - return 0; -} - static void h264_close(AVCodecParserContext *s) { H264ParseContext *p = s->priv_data; @@ -708,5 +671,4 @@ const AVCodecParser ff_h264_parser = { .parser_init = init, .parser_parse = h264_parse, .parser_close = h264_close, - .split = h264_split, }; diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index 320d4eb562..c944a6aacd 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -336,39 +336,6 @@ static int hevc_parse(AVCodecParserContext *s, AVCodecContext *avctx, return next; } -// Split after the parameter sets at the beginning of the stream if they exist. -static int hevc_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size) -{ - const uint8_t *ptr = buf, *end = buf + buf_size; - uint32_t state = -1; - int has_vps = 0; - int has_sps = 0; - int has_pps = 0; - int nut; - - while (ptr < end) { - ptr = avpriv_find_start_code(ptr, end, &state); - if ((state >> 8) != START_CODE) - break; - nut = (state >> 1) & 0x3F; - if (nut == HEVC_NAL_VPS) - has_vps = 1; - else if (nut == HEVC_NAL_SPS) - has_sps = 1; - else if (nut == HEVC_NAL_PPS) - has_pps = 1; - else if ((nut != HEVC_NAL_SEI_PREFIX || has_pps) && - nut != HEVC_NAL_AUD) { - if (has_vps && has_sps) { - while (ptr - 4 > buf && ptr[-5] == 0) - ptr--; - return ptr - 4 - buf; - } - } - } - return 0; -} - static void hevc_parser_close(AVCodecParserContext *s) { HEVCParserContext *ctx = s->priv_data; @@ -385,5 +352,4 @@ const AVCodecParser ff_hevc_parser = { .priv_data_size = sizeof(HEVCParserContext), .parser_parse = hevc_parse, .parser_close = hevc_parser_close, - .split = hevc_split, }; diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c index afa10c7727..1b0e2555da 100644 --- a/libavcodec/mpeg4video_parser.c +++ b/libavcodec/mpeg4video_parser.c @@ -159,5 +159,4 @@ const AVCodecParser ff_mpeg4video_parser = { .parser_init = mpeg4video_parse_init, .parser_parse = mpeg4video_parse, .parser_close = ff_parse_close, - .split = ff_mpeg4video_split, }; diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index 4e4f569b13..7864224643 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -213,23 +213,6 @@ static int mpegvideo_parse(AVCodecParserContext *s, return next; } -static int mpegvideo_split(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) -{ - int i; - uint32_t state= -1; - int found=0; - - for(i=0; i= 0x100) - return i-3; - } - return 0; -} - static int mpegvideo_parse_init(AVCodecParserContext *s) { s->pict_type = AV_PICTURE_TYPE_NONE; // first frame might be partial @@ -242,5 +225,4 @@ const AVCodecParser ff_mpegvideo_parser = { .parser_init = mpegvideo_parse_init, .parser_parse = mpegvideo_parse, .parser_close = ff_parse_close, - .split = mpegvideo_split, }; diff --git a/libavcodec/parser.c b/libavcodec/parser.c index f81a62d592..fc57246965 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -285,17 +285,3 @@ void ff_parse_close(AVCodecParserContext *s) av_freep(&pc->buffer); } - -int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size) -{ - uint32_t state = -1; - const uint8_t *ptr = buf, *end = buf + buf_size; - - while (ptr < end) { - ptr = avpriv_find_start_code(ptr, end, &state); - if (state == 0x1B3 || state == 0x1B6) - return ptr - 4 - buf; - } - - return 0; -} diff --git a/libavcodec/remove_extradata_bsf.c b/libavcodec/remove_extradata_bsf.c index 5783b075f0..1d5f193f89 100644 --- a/libavcodec/remove_extradata_bsf.c +++ b/libavcodec/remove_extradata_bsf.c @@ -21,9 +21,13 @@ #include "libavutil/log.h" #include "libavutil/opt.h" -#include "avcodec.h" +#include "av1_parse.h" #include "bsf.h" #include "bsf_internal.h" +#include "h264.h" +#include "hevc.h" +#include "internal.h" +#include "vc1_common.h" enum RemoveFreq { REMOVE_FREQ_KEYFRAME, @@ -31,63 +35,196 @@ enum RemoveFreq { REMOVE_FREQ_NONKEYFRAME, }; +#define START_CODE 0x000001 + typedef struct RemoveExtradataContext { const AVClass *class; int freq; - - AVCodecParserContext *parser; - AVCodecContext *avctx; } RemoveExtradataContext; -static int remove_extradata(AVBSFContext *ctx, AVPacket *pkt) +static int av1_split(const uint8_t *buf, int buf_size, void *logctx) { - RemoveExtradataContext *s = ctx->priv_data; + AV1OBU obu; + const uint8_t *ptr = buf, *end = buf + buf_size; - int ret; + while (ptr < end) { + int len = ff_av1_extract_obu(&obu, ptr, buf_size, logctx); + if (len < 0) + break; - ret = ff_bsf_get_packet_ref(ctx, pkt); - if (ret < 0) - return ret; + if (obu.type == AV1_OBU_FRAME_HEADER || + obu.type == AV1_OBU_FRAME) { + return ptr - buf; + } + ptr += len; + buf_size -= len; + } + + return 0; +} - if (s->parser && s->parser->parser->split) { - if (s->freq == REMOVE_FREQ_ALL || - (s->freq == REMOVE_FREQ_NONKEYFRAME && !(pkt->flags & AV_PKT_FLAG_KEY)) || - (s->freq == REMOVE_FREQ_KEYFRAME && pkt->flags & AV_PKT_FLAG_KEY)) { - int i = s->parser->parser->split(s->avctx, pkt->data, pkt->size); - pkt->data += i; - pkt->size -= i; +static int h264_split(const uint8_t *buf, int buf_size) +{ + const uint8_t *ptr = buf, *end = buf + buf_size; + uint32_t state = -1; + int has_sps = 0; + int has_pps = 0; + int nalu_type; + + while (ptr < end) { + ptr = avpriv_find_start_code(ptr, end, &state); + if ((state & 0xFFFFFF00) != 0x100) + break; + nalu_type = state & 0x1F; + if (nalu_type == H264_NAL_SPS) { + has_sps = 1; + } else if (nalu_type == H264_NAL_PPS) + has_pps = 1; + /* else if (nalu_type == 0x01 || + * nalu_type == 0x02 || + * nalu_type == 0x05) { + * } + */ + else if ((nalu_type != H264_NAL_SEI || has_pps) && + nalu_type != H264_NAL_AUD && nalu_type != H264_NAL_SPS_EXT && + nalu_type != 0x0f) { + if (has_sps) { + while (ptr - 4 > buf && ptr[-5] == 0) + ptr--; + return ptr - 4 - buf; + } } } return 0; } -static int remove_extradata_init(AVBSFContext *ctx) +// Split after the parameter sets at the beginning of the stream if they exist. +static int hevc_split(const uint8_t *buf, int buf_size) { - RemoveExtradataContext *s = ctx->priv_data; - int ret; + const uint8_t *ptr = buf, *end = buf + buf_size; + uint32_t state = -1; + int has_vps = 0; + int has_sps = 0; + int has_pps = 0; + int nut; + + while (ptr < end) { + ptr = avpriv_find_start_code(ptr, end, &state); + if ((state >> 8) != START_CODE) + break; + nut = (state >> 1) & 0x3F; + if (nut == HEVC_NAL_VPS) + has_vps = 1; + else if (nut == HEVC_NAL_SPS) + has_sps = 1; + else if (nut == HEVC_NAL_PPS) + has_pps = 1; + else if ((nut != HEVC_NAL_SEI_PREFIX || has_pps) && + nut != HEVC_NAL_AUD) { + if (has_vps && has_sps) { + while (ptr - 4 > buf && ptr[-5] == 0) + ptr--; + return ptr - 4 - buf; + } + } + } + return 0; +} - s->parser = av_parser_init(ctx->par_in->codec_id); +static int mpegvideo_split(const uint8_t *buf, int buf_size) +{ + uint32_t state = -1; + int found = 0; + + for (int i = 0; i < buf_size; i++) { + state = (state << 8) | buf[i]; + if (state == 0x1B3) { + found = 1; + } else if (found && state != 0x1B5 && state < 0x200 && state >= 0x100) + return i - 3; + } + return 0; +} - if (s->parser) { - s->avctx = avcodec_alloc_context3(NULL); - if (!s->avctx) - return AVERROR(ENOMEM); +static int mpeg4video_split(const uint8_t *buf, int buf_size) +{ + const uint8_t *ptr = buf, *end = buf + buf_size; + uint32_t state = -1; - ret = avcodec_parameters_to_context(s->avctx, ctx->par_in); - if (ret < 0) - return ret; + while (ptr < end) { + ptr = avpriv_find_start_code(ptr, end, &state); + if (state == 0x1B3 || state == 0x1B6) + return ptr - 4 - buf; } return 0; } -static void remove_extradata_close(AVBSFContext *ctx) +static int vc1_split(const uint8_t *buf, int buf_size) +{ + const uint8_t *ptr = buf, *end = buf + buf_size; + uint32_t state = -1; + int charged = 0; + + while (ptr < end) { + ptr = avpriv_find_start_code(ptr, end, &state); + if (state == VC1_CODE_SEQHDR || state == VC1_CODE_ENTRYPOINT) { + charged = 1; + } else if (charged && IS_MARKER(state)) + return ptr - 4 - buf; + } + + return 0; +} + +static int remove_extradata(AVBSFContext *ctx, AVPacket *pkt) { RemoveExtradataContext *s = ctx->priv_data; - avcodec_free_context(&s->avctx); - av_parser_close(s->parser); + int ret; + + ret = ff_bsf_get_packet_ref(ctx, pkt); + if (ret < 0) + return ret; + + if (s->freq == REMOVE_FREQ_ALL || + (s->freq == REMOVE_FREQ_NONKEYFRAME && !(pkt->flags & AV_PKT_FLAG_KEY)) || + (s->freq == REMOVE_FREQ_KEYFRAME && pkt->flags & AV_PKT_FLAG_KEY)) { + int i; + + switch (ctx->par_in->codec_id) { + case AV_CODEC_ID_AV1: + i = av1_split(pkt->data, pkt->size, ctx); + break; + case AV_CODEC_ID_AVS2: + case AV_CODEC_ID_AVS3: + case AV_CODEC_ID_CAVS: + case AV_CODEC_ID_MPEG4: + i = mpeg4video_split(pkt->data, pkt->size); + break; + case AV_CODEC_ID_H264: + i = h264_split(pkt->data, pkt->size); + break; + case AV_CODEC_ID_HEVC: + i = hevc_split(pkt->data, pkt->size); + break; + case AV_CODEC_ID_MPEG1VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: + i = mpegvideo_split(pkt->data, pkt->size); + break; + case AV_CODEC_ID_VC1: + i = vc1_split(pkt->data, pkt->size); + break; + default: + i = 0; + } + + pkt->data += i; + pkt->size -= i; + } + + return 0; } #define OFFSET(x) offsetof(RemoveExtradataContext, x) @@ -112,7 +249,5 @@ const AVBitStreamFilter ff_remove_extradata_bsf = { .name = "remove_extra", .priv_data_size = sizeof(RemoveExtradataContext), .priv_class = &remove_extradata_class, - .init = remove_extradata_init, - .close = remove_extradata_close, .filter = remove_extradata, }; diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 0f17d299e1..00896ddb09 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -256,24 +256,6 @@ static int vc1_parse(AVCodecParserContext *s, return next; } -static int vc1_split(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) -{ - uint32_t state = -1; - int charged = 0; - const uint8_t *ptr = buf, *end = buf + buf_size; - - while (ptr < end) { - ptr = avpriv_find_start_code(ptr, end, &state); - if (state == VC1_CODE_SEQHDR || state == VC1_CODE_ENTRYPOINT) { - charged = 1; - } else if (charged && IS_MARKER(state)) - return ptr - 4 - buf; - } - - return 0; -} - static av_cold int vc1_parse_init(AVCodecParserContext *s) { VC1ParseContext *vpc = s->priv_data; @@ -293,5 +275,4 @@ const AVCodecParser ff_vc1_parser = { .parser_init = vc1_parse_init, .parser_parse = vc1_parse, .parser_close = ff_parse_close, - .split = vc1_split, }; From patchwork Mon Apr 19 14:15:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27069 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp567173iob; Mon, 19 Apr 2021 07:25:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYyoEWFetV7GqotWbZJR51hLSvzcfjBxgOyzJu1vYwbI1OHUDOXYNk4X4eFHdoA8a4JWZ6 X-Received: by 2002:a05:6402:5107:: with SMTP id m7mr10996755edd.75.1618842316352; Mon, 19 Apr 2021 07:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842316; cv=none; d=google.com; s=arc-20160816; b=CzRUKK1ximHwJNElSidqQ6/Yg+0bmW24vTRII2TMIsXkXE6q2ujNK8qv+RJJ8+j6uQ PubkyCf6CplosOTPLm0NabF3A+SLFtIX2AWZ/QTpaM9pP7Gpm0GvekXG5cBthKFdSVNK HDA6gC2HOL2bTOU5wQnZtnzE37GbZEkOUF5JSsBNLKURTSLH1VtlPgUtLOHNojoJ6RYV bupP6hvm+Ft6dMOLPsVqodh3xySjiCl46bpcqRyLXkkzo4vuto6DnvYfRqMpdkrNWKuU 9haQCyXg31muof9KCCiO4wZVEp1csgGE8N5DOV/OZJmBk1I7iQ6IrB9qvUexoQAz8x5G KIog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=PKohraLoXNuCWiESpw+BRkYZCn9uJhbZFKKlVMThqHA=; b=ipxuLrNtqvuLZxgKKCOryvTTvMKAEHqAr3aPuOimlALcW1Rm2z8VRSIMyz1GADPASK KIX1X4OQikL2MilF6F7yPzQ1F9hTdJHQLcq/mPIHFUJRre3Lv6UA/UkMENG4KQf9SKlV ielafA7fxaDXYoCJIQxMM1Ba9SW9Kkc3k4+tHU/8aqxAk0bQQJU4Je9AYTiuKXI3tenS JHvFIiPlTcr1vUlIuciKx5gm5SVlN52CHoOUuPgVO/qJYNr2+q9il6VU70WjBbsZ2CIX ebeibZqIM85PwsPywWIvNDrDo6jgS9xFPWppkTO97v2g4LP4IEvsWKvmfX3yFPQjDytP r97Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=G0QvIj9V; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gx20si12441901ejc.378.2021.04.19.07.25.16; Mon, 19 Apr 2021 07:25: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=@gmail.com header.s=20161025 header.b=G0QvIj9V; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 08BC6689FB4; Mon, 19 Apr 2021 17:16:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0F97F688057 for ; Mon, 19 Apr 2021 17:16:14 +0300 (EEST) Received: by mail-qk1-f171.google.com with SMTP id y136so3774967qkb.1 for ; Mon, 19 Apr 2021 07:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Irz2TLUcnOWIgjmgJz8xL/HO/AOizYiFRcYwHjCAtRE=; b=G0QvIj9VYn8QtZo4VNOW65+4lIO1j7zkdc6i2kgsh2EHj2coquRMimDM24Dgy/VWEx /lT5b7qxlbGSi7BsOSeUlOyfuzRawYk+pzXKUmnq3LUTLQx/U9QsAod2+fJn9YFYn+I3 CG7mIqpzIzQaDEeHZmGc7DfzSyyUlL2FOZ6ebr80XFVmuTBZkrUoYM49Zc1eA2ylXh6f odE1tQsNKyFysLhw2CcOPzv3UrXPGfDSfSqWTBkdkZFxChe8hjqtP+nsZFiyswjZ/2RH 8JKdbtvsyDpzv+qhSUFt9++RiqtxEVWc5vupOCFtXjP3QYW2SC9ePttj//xUwSU+lI6N WNpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Irz2TLUcnOWIgjmgJz8xL/HO/AOizYiFRcYwHjCAtRE=; b=oiBCP0FL6qbawq0sTKOVmJv7P2nSgYRoMu6b1ZNiiUVO8sd9M9xf8xWiQYdmIylEU5 FQu3XusbfHIpy7jJcHNKz+cPg5ENjQrDGqIdxsvzHdiJ3UyZbrDWL5QmjFDnk2+FwmFC C6Kwkl4zOpbPMjK/Y4kAmW+wdhixawAccxdw/agarioF9AUUQUCJ2XrW0ZZD6b7FitEf e0iI0OZgvzvCv4BeA2VklOticsWAJGRLNRsaXy+9WkcIN3B95Wur+5xd3Rp3r3O6W9jg GtcelivTsUtfFeFaIAh5LuIY0nvG7Fdw9H3ZsJAvnnew2fIppnxI6PlNNLdJx9PyXHBw vNLQ== X-Gm-Message-State: AOAM531rrmWaSea0e7cfN2IUmrGV+YJfj9Kv1BpBh6N2VlnQReOhKWQV 82158GC12jSHSs+9tX5SB29vK/Za0go= X-Received: by 2002:a37:b987:: with SMTP id j129mr12009016qkf.174.1618841772244; Mon, 19 Apr 2021 07:16:12 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id r18sm3398434qtn.90.2021.04.19.07.16.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:16:11 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:15:22 -0300 Message-Id: <20210419141522.8329-1-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 82/87] avformat: remove deprecated AVStream.codec 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mRj7O4g1/xbO Signed-off-by: James Almer --- fftools/ffmpeg_opt.c | 13 --- libavformat/avformat.h | 8 +- libavformat/dump.c | 24 ------ libavformat/isom.c | 12 +-- libavformat/mov.c | 17 ---- libavformat/movenc.c | 38 +-------- libavformat/mux.c | 27 ------- libavformat/sdp.c | 18 ----- libavformat/segment.c | 6 -- libavformat/utils.c | 164 +------------------------------------- libavformat/version.h | 3 - libavformat/yuv4mpegenc.c | 7 -- 12 files changed, 7 insertions(+), 330 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index e66141f3ab..c0b9f023bd 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2442,19 +2442,6 @@ loop_end: avio_closep(&pb); } -#if FF_API_LAVF_AVCTX - for (i = nb_output_streams - oc->nb_streams; i < nb_output_streams; i++) { //for all streams of this output file - AVDictionaryEntry *e; - ost = output_streams[i]; - - if ((ost->stream_copy || ost->attachment_filename) - && (e = av_dict_get(o->g->codec_opts, "flags", NULL, AV_DICT_IGNORE_SUFFIX)) - && (!e->key[5] || check_stream_specifier(oc, ost->st, e->key+6))) - if (av_opt_set(ost->st->codec, "flags", e->value, 0) < 0) - exit_program(1); - } -#endif - if (!oc->nb_streams && !(oc->oformat->flags & AVFMT_NOSTREAMS)) { av_dump_format(oc, nb_output_files - 1, oc->url, 1); av_log(NULL, AV_LOG_ERROR, "Output file #%d does not contain any stream\n", nb_output_files - 1); diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 28069d45dc..3e307efb16 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -839,13 +839,7 @@ typedef struct AVStream { * encoding: set by the user, replaced by libavformat if left unset */ int id; -#if FF_API_LAVF_AVCTX - /** - * @deprecated use the codecpar struct instead - */ - attribute_deprecated - AVCodecContext *codec; -#endif + void *priv_data; /** diff --git a/libavformat/dump.c b/libavformat/dump.c index a520b01e2d..47d3b4ca9a 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -522,18 +522,6 @@ static void dump_stream_format(const AVFormatContext *ic, int i, return; } -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - // Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext - avctx->properties = st->codec->properties; - avctx->codec = st->codec->codec; - avctx->qmin = st->codec->qmin; - avctx->qmax = st->codec->qmax; - avctx->coded_width = st->codec->coded_width; - avctx->coded_height = st->codec->coded_height; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (separator) av_opt_set(avctx, "dump_separator", separator, 0); avcodec_string(buf, sizeof(buf), avctx, is_output); @@ -567,13 +555,7 @@ FF_ENABLE_DEPRECATION_WARNINGS int fps = st->avg_frame_rate.den && st->avg_frame_rate.num; int tbr = st->r_frame_rate.den && st->r_frame_rate.num; int tbn = st->time_base.den && st->time_base.num; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - int tbc = st->codec->time_base.den && st->codec->time_base.num; -FF_ENABLE_DEPRECATION_WARNINGS -#else int tbc = 0; -#endif if (fps || tbr || tbn || tbc) av_log(NULL, AV_LOG_INFO, "%s", separator); @@ -584,12 +566,6 @@ FF_ENABLE_DEPRECATION_WARNINGS print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr"); if (tbn) print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn"); -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (tbc) - print_fps(1 / av_q2d(st->codec->time_base), "tbc"); -FF_ENABLE_DEPRECATION_WARNINGS -#endif } if (st->disposition & AV_DISPOSITION_DEFAULT) diff --git a/libavformat/isom.c b/libavformat/isom.c index df98779149..35c5eb982e 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -329,22 +329,12 @@ static const AVCodecTag mp4_audio_types[] = { int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb) { enum AVCodecID codec_id; - unsigned v; int len, tag; int ret; int object_type_id = avio_r8(pb); avio_r8(pb); /* stream type */ avio_rb24(pb); /* buffer size db */ - - v = avio_rb32(pb); - - // TODO: fix this with codecpar -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (v < INT32_MAX) - st->codec->rc_max_rate = v; -FF_ENABLE_DEPRECATION_WARNINGS -#endif + avio_rb32(pb); /* rc_max_rate */ st->codecpar->bit_rate = avio_rb32(pb); /* avg bitrate */ diff --git a/libavformat/mov.c b/libavformat/mov.c index 77ab45aa61..f6e96f31eb 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -804,12 +804,6 @@ static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (st->codecpar->channels > 1 && bsmod == 0x7) *ast = AV_AUDIO_SERVICE_TYPE_KARAOKE; -#if FF_API_LAVF_AVCTX - FF_DISABLE_DEPRECATION_WARNINGS - st->codec->audio_service_type = *ast; - FF_ENABLE_DEPRECATION_WARNINGS -#endif - return 0; } @@ -844,12 +838,6 @@ static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (st->codecpar->channels > 1 && bsmod == 0x7) *ast = AV_AUDIO_SERVICE_TYPE_KARAOKE; -#if FF_API_LAVF_AVCTX - FF_DISABLE_DEPRECATION_WARNINGS - st->codec->audio_service_type = *ast; - FF_ENABLE_DEPRECATION_WARNINGS -#endif - return 0; } @@ -2340,11 +2328,6 @@ static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb, tmcd_ctx->tmcd_flags = val; st->avg_frame_rate.num = AV_RB32(st->codecpar->extradata + 8); /* timescale */ st->avg_frame_rate.den = AV_RB32(st->codecpar->extradata + 12); /* frameDuration */ -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - st->codec->time_base = av_inv_q(st->avg_frame_rate); -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (size > 30) { uint32_t len = AV_RB32(st->codecpar->extradata + 18); /* name atom length */ uint32_t format = AV_RB32(st->codecpar->extradata + 22); diff --git a/libavformat/movenc.c b/libavformat/movenc.c index a315377ef6..b3d1fda435 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1459,27 +1459,9 @@ static int mov_get_dv_codec_tag(AVFormatContext *s, MOVTrack *track) return tag; } -static AVRational find_fps(AVFormatContext *s, AVStream *st) -{ - AVRational rate = st->avg_frame_rate; - -#if FF_API_LAVF_AVCTX - FF_DISABLE_DEPRECATION_WARNINGS - rate = av_inv_q(st->codec->time_base); - if (av_timecode_check_frame_rate(rate) < 0) { - av_log(s, AV_LOG_DEBUG, "timecode: tbc=%d/%d invalid, fallback on %d/%d\n", - rate.num, rate.den, st->avg_frame_rate.num, st->avg_frame_rate.den); - rate = st->avg_frame_rate; - } - FF_ENABLE_DEPRECATION_WARNINGS -#endif - - return rate; -} - static int defined_frame_rate(AVFormatContext *s, AVStream *st) { - AVRational rational_framerate = find_fps(s, st); + AVRational rational_framerate = st->avg_frame_rate; int rate = 0; if (rational_framerate.den != 0) rate = av_q2d(rational_framerate); @@ -2234,13 +2216,6 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex track->par->codec_id != AV_CODEC_ID_DNXHD) { int field_order = track->par->field_order; -#if FF_API_LAVF_AVCTX - FF_DISABLE_DEPRECATION_WARNINGS - if (field_order != track->st->codec->field_order && track->st->codec->field_order != AV_FIELD_UNKNOWN) - field_order = track->st->codec->field_order; - FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (field_order != AV_FIELD_UNKNOWN) mov_write_fiel_tag(pb, track, field_order); } @@ -2354,15 +2329,8 @@ static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track) AVDictionaryEntry *t = NULL; if (!track->st->avg_frame_rate.num || !track->st->avg_frame_rate.den) { -#if FF_API_LAVF_AVCTX - FF_DISABLE_DEPRECATION_WARNINGS - frame_duration = av_rescale(track->timescale, track->st->codec->time_base.num, track->st->codec->time_base.den); - nb_frames = ROUNDED_DIV(track->st->codec->time_base.den, track->st->codec->time_base.num); - FF_ENABLE_DEPRECATION_WARNINGS -#else av_log(NULL, AV_LOG_ERROR, "avg_frame_rate not set for tmcd track.\n"); return AVERROR(EINVAL); -#endif } else { frame_duration = av_rescale(track->timescale, track->st->avg_frame_rate.den, track->st->avg_frame_rate.num); nb_frames = ROUNDED_DIV(track->st->avg_frame_rate.num, track->st->avg_frame_rate.den); @@ -6199,7 +6167,7 @@ static int mov_check_timecode_track(AVFormatContext *s, AVTimecode *tc, int src_ int ret; /* compute the frame number */ - ret = av_timecode_init_from_string(tc, find_fps(s, s->streams[src_index]), tcstr, s); + ret = av_timecode_init_from_string(tc, s->streams[src_index]->avg_frame_rate, tcstr, s); return ret; } @@ -6210,7 +6178,7 @@ static int mov_create_timecode_track(AVFormatContext *s, int index, int src_inde AVStream *src_st = s->streams[src_index]; uint8_t data[4]; AVPacket *pkt = mov->pkt; - AVRational rate = find_fps(s, src_st); + AVRational rate = src_st->avg_frame_rate; int ret; /* tmcd track based on video stream */ diff --git a/libavformat/mux.c b/libavformat/mux.c index 1c08c74b90..eab58aa225 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -247,19 +247,6 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options) goto fail; } -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (s->nb_streams && s->streams[0]->codec->flags & AV_CODEC_FLAG_BITEXACT) { - if (!(s->flags & AVFMT_FLAG_BITEXACT)) { - av_log(s, AV_LOG_WARNING, - "The AVFormatContext is not in set to bitexact mode, only " - "the AVCodecContext. If this is not intended, set " - "AVFormatContext.flags |= AVFMT_FLAG_BITEXACT.\n"); - } - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - // some sanity checks if (s->nb_streams == 0 && !(of->flags & AVFMT_NOSTREAMS)) { av_log(s, AV_LOG_ERROR, "No streams to mux were specified\n"); @@ -271,20 +258,6 @@ FF_ENABLE_DEPRECATION_WARNINGS st = s->streams[i]; par = st->codecpar; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (st->codecpar->codec_type == AVMEDIA_TYPE_UNKNOWN && - st->codec->codec_type != AVMEDIA_TYPE_UNKNOWN) { - av_log(s, AV_LOG_WARNING, "Using AVStream.codec to pass codec " - "parameters to muxers is deprecated, use AVStream.codecpar " - "instead.\n"); - ret = avcodec_parameters_from_context(st->codecpar, st->codec); - if (ret < 0) - goto fail; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (!st->time_base.num) { /* fall back on the default timebase values */ if (par->codec_type == AVMEDIA_TYPE_AUDIO && par->sample_rate) diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 95f3fbb876..1200e553f9 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -704,24 +704,6 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int case AV_CODEC_ID_SPEEX: av_strlcatf(buff, size, "a=rtpmap:%d speex/%d\r\n", payload_type, p->sample_rate); -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (st->codec) { - const char *mode; - uint64_t vad_option; - - if (st->codec->flags & AV_CODEC_FLAG_QSCALE) - mode = "on"; - else if (!av_opt_get_int(st->codec, "vad", AV_OPT_FLAG_ENCODING_PARAM, &vad_option) && vad_option) - mode = "vad"; - else - mode = "off"; - - av_strlcatf(buff, size, "a=fmtp:%d vbr=%s\r\n", - payload_type, mode); - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif break; case AV_CODEC_ID_OPUS: /* The opus RTP draft says that all opus streams MUST be declared diff --git a/libavformat/segment.c b/libavformat/segment.c index faa8eb8f92..74106445e6 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -178,12 +178,6 @@ static int segment_mux_init(AVFormatContext *s) } else { opar->codec_tag = 0; } -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (ipar->codec_tag == MKTAG('t','m','c','d')) - st->codec->time_base = ist->codec->time_base; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } return 0; diff --git a/libavformat/utils.c b/libavformat/utils.c index 2f66f539a6..49bf19b2b0 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -158,13 +158,6 @@ int ff_copy_whiteblacklists(AVFormatContext *dst, const AVFormatContext *src) static const AVCodec *find_decoder(AVFormatContext *s, const AVStream *st, enum AVCodecID codec_id) { -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (st->codec->codec) - return st->codec->codec; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - switch (st->codecpar->codec_type) { case AVMEDIA_TYPE_VIDEO: if (s->video_codec) return s->video_codec; @@ -354,12 +347,6 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, st->codecpar->codec_id = fmt_id_type[i].id; st->codecpar->codec_type = fmt_id_type[i].type; st->internal->need_context_update = 1; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - st->codec->codec_type = st->codecpar->codec_type; - st->codec->codec_id = st->codecpar->codec_id; -FF_ENABLE_DEPRECATION_WARNINGS -#endif return score; } } @@ -480,15 +467,6 @@ static int update_stream_avctx(AVFormatContext *s) if (ret < 0) return ret; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - /* update deprecated public codec context */ - ret = avcodec_parameters_to_context(st->codec, st->codecpar); - if (ret < 0) - return ret; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - st->internal->need_context_update = 0; } return 0; @@ -920,13 +898,6 @@ void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStrea av_mul_q(av_inv_q(st->internal->avctx->time_base), (AVRational){1, st->internal->avctx->ticks_per_frame}); int frame_size, sample_rate; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if ((!codec_framerate.den || !codec_framerate.num) && st->codec->time_base.den && st->codec->time_base.num) - codec_framerate = av_mul_q(av_inv_q(st->codec->time_base), (AVRational){1, st->codec->ticks_per_frame}); -FF_ENABLE_DEPRECATION_WARNINGS -#endif - *pnum = 0; *pden = 0; switch (st->codecpar->codec_type) { @@ -1547,17 +1518,6 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) return ret; } -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - /* update deprecated public codec context */ - ret = avcodec_parameters_to_context(st->codec, st->codecpar); - if (ret < 0) { - av_packet_unref(pkt); - return ret; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - st->internal->need_context_update = 0; } @@ -1680,10 +1640,6 @@ FF_ENABLE_DEPRECATION_WARNINGS av_opt_set_dict_val(s, "metadata", NULL, AV_OPT_SEARCH_CHILDREN); } -#if FF_API_LAVF_AVCTX - update_stream_avctx(s); -#endif - if (s->debug & FF_FDEBUG_TS) av_log(s, AV_LOG_DEBUG, "read_frame_internal stream=%d, pts=%s, dts=%s, " @@ -3632,15 +3588,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } /* check if the caller has overridden the codec id */ -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (st->codec->codec_id != st->internal->orig_codec_id) { - st->codecpar->codec_id = st->codec->codec_id; - st->codecpar->codec_type = st->codec->codec_type; - st->internal->orig_codec_id = st->codec->codec_id; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif // only for the split stuff if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE) && st->internal->request_probe <= 0) { st->parser = av_parser_init(st->codecpar->codec_id); @@ -4123,42 +4070,6 @@ FF_ENABLE_DEPRECATION_WARNINGS goto find_stream_info_err; } -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - ret = avcodec_parameters_to_context(st->codec, st->codecpar); - if (ret < 0) - goto find_stream_info_err; - - // The old API (AVStream.codec) "requires" the resolution to be adjusted - // by the lowres factor. - if (st->internal->avctx->lowres && st->internal->avctx->width) { - st->codec->lowres = st->internal->avctx->lowres; - st->codec->width = st->internal->avctx->width; - st->codec->height = st->internal->avctx->height; - } - - if (st->codec->codec_tag != MKTAG('t','m','c','d')) { - st->codec->time_base = st->internal->avctx->time_base; - st->codec->ticks_per_frame = st->internal->avctx->ticks_per_frame; - } - st->codec->framerate = st->avg_frame_rate; - - if (st->internal->avctx->subtitle_header) { - st->codec->subtitle_header = av_malloc(st->internal->avctx->subtitle_header_size); - if (!st->codec->subtitle_header) - goto find_stream_info_err; - st->codec->subtitle_header_size = st->internal->avctx->subtitle_header_size; - memcpy(st->codec->subtitle_header, st->internal->avctx->subtitle_header, - st->codec->subtitle_header_size); - } - - // Fields unavailable in AVCodecParameters - st->codec->coded_width = st->internal->avctx->coded_width; - st->codec->coded_height = st->internal->avctx->coded_height; - st->codec->properties = st->internal->avctx->properties; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - st->internal->avctx_inited = 0; } @@ -4368,11 +4279,6 @@ static void free_stream(AVStream **pst) av_dict_free(&st->metadata); avcodec_parameters_free(&st->codecpar); -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - avcodec_free_context(&st->codec); -FF_ENABLE_DEPRECATION_WARNINGS -#endif av_freep(&st->priv_data); av_freep(pst); @@ -4480,16 +4386,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c) if (!st) return NULL; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - st->codec = avcodec_alloc_context3(c); - if (!st->codec) { - av_free(st); - return NULL; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - st->internal = av_mallocz(sizeof(*st->internal)); if (!st->internal) goto fail; @@ -4508,13 +4404,6 @@ FF_ENABLE_DEPRECATION_WARNINGS goto fail; if (s->iformat) { -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - /* no default bitrate if decoding */ - st->codec->bit_rate = 0; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - /* default pts setting is MPEG-like */ avpriv_set_pts_info(st, 33, 1, 90000); /* we set the current DTS to 0 so that formats without any timestamps @@ -4922,11 +4811,6 @@ void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, return; } s->time_base = new_tb; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - s->codec->pkt_timebase = new_tb; -FF_ENABLE_DEPRECATION_WARNINGS -#endif s->internal->avctx->pkt_timebase = new_tb; s->pts_wrap_bits = pts_wrap_bits; } @@ -5154,16 +5038,8 @@ static int match_stream_specifier(AVFormatContext *s, AVStream *st, if (*spec && *spec++ != ':') /* If we are not at the end, then another specifier must follow. */ return AVERROR(EINVAL); -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - if (type != st->codecpar->codec_type - && (st->codecpar->codec_type != AVMEDIA_TYPE_UNKNOWN || st->codec->codec_type != type)) - match = 0; - FF_ENABLE_DEPRECATION_WARNINGS -#else if (type != st->codecpar->codec_type) match = 0; -#endif if (nopic && (st->disposition & AV_DISPOSITION_ATTACHED_PIC)) match = 0; } else if (*spec == 'p' && *(spec + 1) == ':') { @@ -5230,35 +5106,16 @@ FF_DISABLE_DEPRECATION_WARNINGS return match && ret; } else if (*spec == 'u' && *(spec + 1) == '\0') { AVCodecParameters *par = st->codecpar; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - AVCodecContext *codec = st->codec; -FF_ENABLE_DEPRECATION_WARNINGS -#endif int val; switch (par->codec_type) { case AVMEDIA_TYPE_AUDIO: val = par->sample_rate && par->channels; -#if FF_API_LAVF_AVCTX - val = val || (codec->sample_rate && codec->channels); -#endif - if (par->format == AV_SAMPLE_FMT_NONE -#if FF_API_LAVF_AVCTX - && codec->sample_fmt == AV_SAMPLE_FMT_NONE -#endif - ) + if (par->format == AV_SAMPLE_FMT_NONE) return 0; break; case AVMEDIA_TYPE_VIDEO: val = par->width && par->height; -#if FF_API_LAVF_AVCTX - val = val || (codec->width && codec->height); -#endif - if (par->format == AV_PIX_FMT_NONE -#if FF_API_LAVF_AVCTX - && codec->pix_fmt == AV_PIX_FMT_NONE -#endif - ) + if (par->format == AV_PIX_FMT_NONE) return 0; break; case AVMEDIA_TYPE_UNKNOWN: @@ -5268,11 +5125,7 @@ FF_ENABLE_DEPRECATION_WARNINGS val = 1; break; } -#if FF_API_LAVF_AVCTX - return match && ((par->codec_id != AV_CODEC_ID_NONE || codec->codec_id != AV_CODEC_ID_NONE) && val != 0); -#else return match && (par->codec_id != AV_CODEC_ID_NONE && val != 0); -#endif } else { return AVERROR(EINVAL); } @@ -5684,15 +5537,8 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, const AVCodecContext *dec_ctx; AVCodecContext *enc_ctx; -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - dec_ctx = ist->codec; - enc_ctx = ost->codec; -FF_ENABLE_DEPRECATION_WARNINGS -#else dec_ctx = ist->internal->avctx; enc_ctx = ost->internal->avctx; -#endif enc_ctx->time_base = ist->time_base; /* @@ -5748,13 +5594,7 @@ FF_ENABLE_DEPRECATION_WARNINGS AVRational av_stream_get_codec_timebase(const AVStream *st) { // See avformat_transfer_internal_stream_timing_info() TODO. -#if FF_API_LAVF_AVCTX -FF_DISABLE_DEPRECATION_WARNINGS - return st->codec->time_base; -FF_ENABLE_DEPRECATION_WARNINGS -#else return st->internal->avctx->time_base; -#endif } void ff_format_set_url(AVFormatContext *s, char *url) diff --git a/libavformat/version.h b/libavformat/version.h index e6b2807f22..75568212c2 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -55,9 +55,6 @@ * at once through the bump. This improves the git bisect-ability of the change. * */ -#ifndef FF_API_LAVF_AVCTX -#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_LAVF_PRIV_OPT #define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) #endif diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c index 6b53780ba0..f21f2dce92 100644 --- a/libavformat/yuv4mpegenc.c +++ b/libavformat/yuv4mpegenc.c @@ -50,13 +50,6 @@ static int yuv4_write_header(AVFormatContext *s) if (aspectn == 0 && aspectd == 1) aspectd = 0; // 0:0 means unknown -#if FF_API_LAVF_AVCTX - FF_DISABLE_DEPRECATION_WARNINGS - if (field_order != st->codec->field_order && st->codec->field_order != AV_FIELD_UNKNOWN) - field_order = st->codec->field_order; - FF_ENABLE_DEPRECATION_WARNINGS -#endif - switch(st->codecpar->color_range) { case AVCOL_RANGE_MPEG: colorrange = " XCOLORRANGE=LIMITED"; From patchwork Mon Apr 19 14:16:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27081 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp567634iob; Mon, 19 Apr 2021 07:25:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyedsTMIu3klnxJFwEiwVZhjY46os9jWPKSeoDAe+LBPbmhQgDoRF1lxxlH2Djor3NxY9uJ X-Received: by 2002:a17:906:b890:: with SMTP id hb16mr22340568ejb.221.1618842344071; Mon, 19 Apr 2021 07:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842344; cv=none; d=google.com; s=arc-20160816; b=dp46ZHTmr6Mu4hoJaFgP6GuUr2HzcL4TKMHFZlqVJfGHw+TBHBr+iX/Xa7L3N6egSB H/HzNZl/sKbXO6zU1ibq728FxzZYRCtf2pbI1wnxjCrnth66pResAKIjXxzg5RrnCGXx TFxMT/tF7Zt2pKF/jqISzWGxH9rTgYkR0Y7978GGH8cZtCh5Gsf3TNKuRNDvV1O8AwdH fqfBNincPOvzO88YvAuqzhHhpfQBySXftDKUD0uEoIEJLjuC4TEhiZf1EvnZudjHyU/k R7vAuhLAV4FJoDLKbAt65RMJN9c1b41XccqucboTFMmMxM4Ygqp1o2XaCM6tC+hLysUr AGOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=THMCuv54m7WuCvPvtH2G3SArruB+xpChngC8/Z9ytg0=; b=hEIirHY/6Du0+ib+bZFogpPUaJedwOJ6lXc+2n6OV+JkIIqwk9P/Y6nmWfgNzwjL6j CyeIXw0oiGVA+d/QFsqpejO80g+EHAC/FdokB+5cyGtjlvNFQSqfly0nUuz/NW8Kccm+ wc/sU3M4MUuRHbakAHEmcc3VOxSSf4pTlvCBIPl9W06+MT7D4rExXtZqfgGfj/fIdfk7 UN2AoDc1wcLwP+kH2J9wFt13Ip12f14oZ8VEpsSXxCGYw8ixMhXBVO/Ja3Ojtonzrk1B a6RstbfVV7pdw85X34lT/Hl9rF1+smK8i31j/q+kaqtC7RzmHB5il98WLUO1D2NuZPR2 ajYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Fwvs3BWc; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x7si5777352ejs.644.2021.04.19.07.25.43; Mon, 19 Apr 2021 07:25:44 -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=@gmail.com header.s=20161025 header.b=Fwvs3BWc; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 16C5468A05D; Mon, 19 Apr 2021 17:16:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 320106880FA for ; Mon, 19 Apr 2021 17:16:36 +0300 (EEST) Received: by mail-qk1-f181.google.com with SMTP id i12so4337299qke.3 for ; Mon, 19 Apr 2021 07:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=OfeXzeHP5Crn3Wwuxb7bJUStbjvLjoOo2xjHRDwCB5M=; b=Fwvs3BWcSquqza7Krn030kwM5eu+N12YC+wiX6D/Ez1X/JN1CNO2cpkOatZ8Gdxcy9 dToZDB+FRwTq6viDlac5XWGIGqg7fYxLmYEY94ELxg4vjxQP4KHyxskLV/LlmioHrSY6 PAHjkF2Cwdv3HR+WI1yP1VSpZOFGawuEuVCOwhHTxRcwZnTwV5xGQejiyToe3Z3uGUTc k1RjM95mcFkQQXCCbD9fCSG+4rLKn13K/V8Unh3fo7jebA64NcKpT1IRSvFuKMQhLtoE ymQFbleSpOZccyeojzOyJNtPkbY0nYP8Cy5pSZFmUYF7+9BMcLuXyMBMxs5ud4fiUmBI PDfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OfeXzeHP5Crn3Wwuxb7bJUStbjvLjoOo2xjHRDwCB5M=; b=HaIVXhYqgtGgSBqSrEt3EOOhqhkqR0GJqHoo9Lcv2stp4mq/hSvCFL6Jrbvl7BpBU7 nIs2jdobwz1tq+8bsZIVzrw0ejrsX+tnWx0eYQlE6lEo7yE+nNXXqsRaeDuoYrMQp/Xj g0r7zpmKzo+QQRKbReeh/9wY1lRF5q1Ja5W9J8aEwcqXsctDu01H0DKFxiTfuB9UKUWS cigqfweShwhAaF5oMXu0aZnm8iEL+5K+wRUyEi0B1TGp/4T2fCsh/T/Rqv+GAzS2+UGH j6PKDNoxHFeQnmfWI5WA9LOUoWuGdJoszyf2glr4GLI55rfSFN0EHza1cyDAUrLp13Od 6ULg== X-Gm-Message-State: AOAM531yfZiMd8EV86SEKksZiDQlbQ9zNFy7fLx4+2lULV4EZPTPY+WH oFPxDBK+fenz46kvOHXiUsxmc890FTo= X-Received: by 2002:a37:e10d:: with SMTP id c13mr12343677qkm.322.1618841795334; Mon, 19 Apr 2021 07:16:35 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f16sm10057451qkl.25.2021.04.19.07.16.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:16:35 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:16:21 -0300 Message-Id: <20210419141621.8379-1-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 83/87] avutil: remove deprecated AVClass.child_class_next 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mwFwaWSnSTcr Signed-off-by: James Almer --- libavcodec/bitstream_filters.c | 22 -------------------- libavcodec/bsf.c | 3 --- libavcodec/bsf_internal.h | 4 ---- libavcodec/options.c | 22 -------------------- libavfilter/af_aresample.c | 10 --------- libavfilter/avfilter.c | 27 ------------------------ libavfilter/framesync.h | 4 ---- libavfilter/vf_scale.c | 13 ------------ libavfilter/vf_spp.c | 10 --------- libavformat/avio.c | 3 --- libavformat/aviobuf.c | 10 --------- libavformat/options.c | 38 ---------------------------------- libavformat/protocols.c | 21 ------------------- libavformat/url.h | 4 ---- libavutil/log.h | 13 ------------ libavutil/opt.c | 19 ----------------- libavutil/opt.h | 13 ------------ libavutil/version.h | 3 --- 18 files changed, 239 deletions(-) diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c index 3de2af92d3..e03326515b 100644 --- a/libavcodec/bitstream_filters.c +++ b/libavcodec/bitstream_filters.c @@ -91,28 +91,6 @@ const AVBitStreamFilter *av_bsf_get_by_name(const char *name) return NULL; } -#if FF_API_CHILD_CLASS_NEXT -const AVClass *ff_bsf_child_class_next(const AVClass *prev) -{ - const AVBitStreamFilter *f = NULL; - void *i = 0; - - /* find the filter that corresponds to prev */ - while (prev && (f = av_bsf_iterate(&i))) { - if (f->priv_class == prev) { - break; - } - } - - /* find next filter with priv options */ - while ((f = av_bsf_iterate(&i))) { - if (f->priv_class) - return f->priv_class; - } - return NULL; -} -#endif - const AVClass *ff_bsf_child_class_iterate(void **opaque) { const AVBitStreamFilter *f; diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 543fe87b30..9d67ea5395 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -80,9 +80,6 @@ static const AVClass bsf_class = { .item_name = bsf_to_name, .version = LIBAVUTIL_VERSION_INT, .child_next = bsf_child_next, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = ff_bsf_child_class_next, -#endif .child_class_iterate = ff_bsf_child_class_iterate, .category = AV_CLASS_CATEGORY_BITSTREAM_FILTER, }; diff --git a/libavcodec/bsf_internal.h b/libavcodec/bsf_internal.h index b78c134bdd..06979fdaa3 100644 --- a/libavcodec/bsf_internal.h +++ b/libavcodec/bsf_internal.h @@ -42,10 +42,6 @@ int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt); */ int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt); -#if FF_API_CHILD_CLASS_NEXT -const AVClass *ff_bsf_child_class_next(const AVClass *prev); -#endif - const AVClass *ff_bsf_child_class_iterate(void **opaque); #endif /* AVCODEC_BSF_INTERNAL_H */ diff --git a/libavcodec/options.c b/libavcodec/options.c index 369110b8d0..bba6078b62 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -53,25 +53,6 @@ static void *codec_child_next(void *obj, void *prev) return NULL; } -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *codec_child_class_next(const AVClass *prev) -{ - void *iter = NULL; - const AVCodec *c = NULL; - - /* find the codec that corresponds to prev */ - while (prev && (c = av_codec_iterate(&iter))) - if (c->priv_class == prev) - break; - - /* find next codec with priv options */ - while (c = av_codec_iterate(&iter)) - if (c->priv_class) - return c->priv_class; - return NULL; -} -#endif - static const AVClass *codec_child_class_iterate(void **iter) { const AVCodec *c; @@ -96,9 +77,6 @@ static const AVClass av_codec_context_class = { .version = LIBAVUTIL_VERSION_INT, .log_level_offset_offset = offsetof(AVCodecContext, log_level_offset), .child_next = codec_child_next, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = codec_child_class_next, -#endif .child_class_iterate = codec_child_class_iterate, .category = AV_CLASS_CATEGORY_ENCODER, .get_category = get_category, diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index e54bd3eb41..f8e03061a5 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -293,13 +293,6 @@ static int request_frame(AVFilterLink *outlink) return ret; } -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *resample_child_class_next(const AVClass *prev) -{ - return prev ? NULL : swr_get_class(); -} -#endif - static const AVClass *resample_child_class_iterate(void **iter) { const AVClass *c = *iter ? NULL : swr_get_class(); @@ -326,9 +319,6 @@ static const AVClass aresample_class = { .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = resample_child_class_next, -#endif .child_class_iterate = resample_child_class_iterate, .child_next = resample_child_next, }; diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 6e12c8fa05..c04afc6639 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -571,30 +571,6 @@ static void *filter_child_next(void *obj, void *prev) return NULL; } -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *filter_child_class_next(const AVClass *prev) -{ - void *opaque = NULL; - const AVFilter *f = NULL; - - /* find the filter that corresponds to prev */ - while (prev && (f = av_filter_iterate(&opaque))) - if (f->priv_class == prev) - break; - - /* could not find filter corresponding to prev */ - if (prev && !f) - return NULL; - - /* find next filter with specific options */ - while ((f = av_filter_iterate(&opaque))) - if (f->priv_class) - return f->priv_class; - - return NULL; -} -#endif - static const AVClass *filter_child_class_iterate(void **iter) { const AVFilter *f; @@ -627,9 +603,6 @@ static const AVClass avfilter_class = { .version = LIBAVUTIL_VERSION_INT, .category = AV_CLASS_CATEGORY_FILTER, .child_next = filter_child_next, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = filter_child_class_next, -#endif .child_class_iterate = filter_child_class_iterate, .option = avfilter_options, }; diff --git a/libavfilter/framesync.h b/libavfilter/framesync.h index 51bab16285..fb85e8aec7 100644 --- a/libavfilter/framesync.h +++ b/libavfilter/framesync.h @@ -305,9 +305,6 @@ static int name##_framesync_preinit(AVFilterContext *ctx) { \ ff_framesync_preinit(&s->field); \ return 0; \ } \ -static const AVClass *name##_child_class_next(const AVClass *prev) { \ - return prev ? NULL : ff_framesync_get_class(); \ -} \ static void *name##_child_next(void *obj, void *prev) { \ context *s = obj; \ s->fs.class = ff_framesync_get_class(); /* FIXME */ \ @@ -319,7 +316,6 @@ static const AVClass name##_class = { \ .option = name##_options, \ .version = LIBAVUTIL_VERSION_INT, \ .category = AV_CLASS_CATEGORY_FILTER, \ - .child_class_next = name##_child_class_next, \ .child_class_iterate = ff_framesync_child_class_iterate, \ .child_next = name##_child_next, \ } diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 3add31bace..7f68a51913 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -879,13 +879,6 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar return ret; } -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *child_class_next(const AVClass *prev) -{ - return prev ? NULL : sws_get_class(); -} -#endif - static const AVClass *child_class_iterate(void **iter) { const AVClass *c = *iter ? NULL : sws_get_class(); @@ -950,9 +943,6 @@ static const AVClass scale_class = { .option = scale_options, .version = LIBAVUTIL_VERSION_INT, .category = AV_CLASS_CATEGORY_FILTER, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = child_class_next, -#endif .child_class_iterate = child_class_iterate, }; @@ -993,9 +983,6 @@ static const AVClass scale2ref_class = { .option = scale_options, .version = LIBAVUTIL_VERSION_INT, .category = AV_CLASS_CATEGORY_FILTER, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = child_class_next, -#endif .child_class_iterate = child_class_iterate, }; diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index 6ea7e7458f..c548d86d72 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -46,13 +46,6 @@ enum mode { NB_MODES }; -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *child_class_next(const AVClass *prev) -{ - return prev ? NULL : avcodec_dct_get_class(); -} -#endif - static const AVClass *child_class_iterate(void **iter) { const AVClass *c = *iter ? NULL : avcodec_dct_get_class(); @@ -85,9 +78,6 @@ static const AVClass spp_class = { .option = spp_options, .version = LIBAVUTIL_VERSION_INT, .category = AV_CLASS_CATEGORY_FILTER, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = child_class_next, -#endif .child_class_iterate = child_class_iterate, .child_next = child_next, }; diff --git a/libavformat/avio.c b/libavformat/avio.c index 8011482e76..2974f4b2b4 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -67,9 +67,6 @@ const AVClass ffurl_context_class = { .option = options, .version = LIBAVUTIL_VERSION_INT, .child_next = urlcontext_child_next, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = ff_urlcontext_child_class_next, -#endif .child_class_iterate = ff_urlcontext_child_class_iterate, }; /*@}*/ diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 1ecc7fb095..ddfa4ecbf1 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -48,13 +48,6 @@ static void *ff_avio_child_next(void *obj, void *prev) return prev ? NULL : s->opaque; } -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *ff_avio_child_class_next(const AVClass *prev) -{ - return prev ? NULL : &ffurl_context_class; -} -#endif - static const AVClass *child_class_iterate(void **iter) { const AVClass *c = *iter ? NULL : &ffurl_context_class; @@ -76,9 +69,6 @@ const AVClass ff_avio_class = { .version = LIBAVUTIL_VERSION_INT, .option = ff_avio_options, .child_next = ff_avio_child_next, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = ff_avio_child_class_next, -#endif .child_class_iterate = child_class_iterate, }; diff --git a/libavformat/options.c b/libavformat/options.c index 632d450c90..dccb6faa73 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -54,41 +54,6 @@ static void *format_child_next(void *obj, void *prev) return NULL; } -#if FF_API_CHILD_CLASS_NEXT -static const AVClass *format_child_class_next(const AVClass *prev) -{ - const AVInputFormat *ifmt = NULL; - const AVOutputFormat *ofmt = NULL; - void *ifmt_iter = NULL, *ofmt_iter = NULL; - - if (!prev) - return &ff_avio_class; - - while ((ifmt = av_demuxer_iterate(&ifmt_iter))) - if (ifmt->priv_class == prev) - break; - - if (!ifmt) { - ifmt_iter = NULL; - while ((ofmt = av_muxer_iterate(&ofmt_iter))) - if (ofmt->priv_class == prev) - break; - } - if (!ofmt) { - ofmt_iter = NULL; - while ((ifmt = av_demuxer_iterate(&ifmt_iter))) - if (ifmt->priv_class) - return ifmt->priv_class; - } - - while ((ofmt = av_muxer_iterate(&ofmt_iter))) - if (ofmt->priv_class) - return ofmt->priv_class; - - return NULL; -} -#endif - enum { CHILD_CLASS_ITER_AVIO = 0, CHILD_CLASS_ITER_MUX, @@ -158,9 +123,6 @@ static const AVClass av_format_context_class = { .option = avformat_options, .version = LIBAVUTIL_VERSION_INT, .child_next = format_child_next, -#if FF_API_CHILD_CLASS_NEXT - .child_class_next = format_child_class_next, -#endif .child_class_iterate = format_child_class_iterate, .category = AV_CLASS_CATEGORY_MUXER, .get_category = get_category, diff --git a/libavformat/protocols.c b/libavformat/protocols.c index fb6fabdce5..4b6b1c8e98 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -75,27 +75,6 @@ extern const URLProtocol ff_libzmq_protocol; #include "libavformat/protocol_list.c" -#if FF_API_CHILD_CLASS_NEXT -const AVClass *ff_urlcontext_child_class_next(const AVClass *prev) -{ - int i; - - /* find the protocol that corresponds to prev */ - for (i = 0; prev && url_protocols[i]; i++) { - if (url_protocols[i]->priv_data_class == prev) { - i++; - break; - } - } - - /* find next protocol with priv options */ - for (; url_protocols[i]; i++) - if (url_protocols[i]->priv_data_class) - return url_protocols[i]->priv_data_class; - return NULL; -} -#endif - const AVClass *ff_urlcontext_child_class_iterate(void **iter) { const AVClass *ret = NULL; diff --git a/libavformat/url.h b/libavformat/url.h index 3bb1cf89f7..40e6c1d17c 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -329,10 +329,6 @@ int ff_make_absolute_url(char *buf, int size, const char *base, */ AVIODirEntry *ff_alloc_dir_entry(void); -#if FF_API_CHILD_CLASS_NEXT -const AVClass *ff_urlcontext_child_class_next(const AVClass *prev); -#endif - const AVClass *ff_urlcontext_child_class_iterate(void **iter); /** diff --git a/libavutil/log.h b/libavutil/log.h index 8edd6bbf2b..c2f1232a16 100644 --- a/libavutil/log.h +++ b/libavutil/log.h @@ -112,19 +112,6 @@ typedef struct AVClass { */ void* (*child_next)(void *obj, void *prev); -#if FF_API_CHILD_CLASS_NEXT - /** - * Return an AVClass corresponding to the next potential - * AVOptions-enabled child. - * - * The difference between child_next and this is that - * child_next iterates over _already existing_ objects, while - * child_class_next iterates over _all possible_ children. - */ - attribute_deprecated - const struct AVClass* (*child_class_next)(const struct AVClass *prev); -#endif - /** * Category used for visualization (like color) * This is only set if the category is equal for all objects using this class. diff --git a/libavutil/opt.c b/libavutil/opt.c index 590146b5fb..4124efd9b6 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1717,29 +1717,10 @@ void *av_opt_child_next(void *obj, void *prev) return NULL; } -#if FF_API_CHILD_CLASS_NEXT -FF_DISABLE_DEPRECATION_WARNINGS -const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *prev) -{ - if (parent->child_class_next) - return parent->child_class_next(prev); - return NULL; -} -FF_ENABLE_DEPRECATION_WARNINGS -#endif - const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter) { if (parent->child_class_iterate) return parent->child_class_iterate(iter); -#if FF_API_CHILD_CLASS_NEXT -FF_DISABLE_DEPRECATION_WARNINGS - if (parent->child_class_next) { - *iter = parent->child_class_next(*iter); - return *iter; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif return NULL; } diff --git a/libavutil/opt.h b/libavutil/opt.h index 8dc020a820..c2329e5589 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -648,19 +648,6 @@ const AVOption *av_opt_next(const void *obj, const AVOption *prev); */ void *av_opt_child_next(void *obj, void *prev); -#if FF_API_CHILD_CLASS_NEXT -/** - * Iterate over potential AVOptions-enabled children of parent. - * - * @param prev result of a previous call to this function or NULL - * @return AVClass corresponding to next potential child or NULL - * - * @deprecated use av_opt_child_class_iterate - */ -attribute_deprecated -const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *prev); -#endif - /** * Iterate over potential AVOptions-enabled children of parent. * diff --git a/libavutil/version.h b/libavutil/version.h index b61467ed9d..eb380bc0d7 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -105,9 +105,6 @@ * @{ */ -#ifndef FF_API_CHILD_CLASS_NEXT -#define FF_API_CHILD_CLASS_NEXT (LIBAVUTIL_VERSION_MAJOR < 57) -#endif #ifndef FF_API_D2STR #define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58) #endif From patchwork Mon Apr 19 14:16:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27076 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp568174iob; Mon, 19 Apr 2021 07:26:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHvwR1DO51vs5IKNMt28g39qKLHi64x/WA3SYaNKhSs5ABMXrmgRxUylrIEJf+NvLm9Mkj X-Received: by 2002:a05:6402:520b:: with SMTP id s11mr26384137edd.212.1618842383336; Mon, 19 Apr 2021 07:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842383; cv=none; d=google.com; s=arc-20160816; b=Ae0jzEH+lUdygzU8MxmxPKdRmLik1YZ5hcA/eRiAJO0kdG09hZevyk0Lw5tVH7XEJk IbB3mOBNJsQnmG5hKKCph8a+xbPQuO7VdsSaCaMu40q0dIbN136fj6dmBxLh+gjRdvmf uR7kWgnvl2CnZMnU7ex9TJwpU46O3p0cBqUoqqQcwAP6f6WohAQiIDKCG5eN7v2p1Xz2 NzNWu4GZG1OfFtWUjEg+whRtH3nB5AStoSipAriY/HLSJowbJBhxS3KdMAEgXMnC8i2q 8ypXy6+tqpN7Xid4OmHI2GIuaE47SsOy2fZcxQu9269gvGG9Dc8fre6bMzwkLZPweHJu pzKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=OXM9yeaKOCNGmt2b560PZZHyC1zDwIUJWo8mDVHp7Pc=; b=ccV3bkw+xWdpoUDIK4JuXBVQoe17Sxc6+zxddTh9vH6G+7fZqBtHvZ77bqa++eBcxB xOwpYNaGrPTXyDMBip+7pWubbDPcrFGXEfnU4vAar4UQizQJRg2GGJdCoRsKWMNEalcf J4KknFY3GpgwfdVaKLXiM83e1Vn8ybTZwWqp8p/a1s46JCEh4HetyLAbcpMAVkHVkY6Q CwBHSLJB28xHZQlOPI/RZJHf8H8/u7BRrtKgzQcbyT9A9V4oOvlCB/Qmyl/0vNCPsYQK jaOEF9XutC4e2EqIAN3ByEWdh7InG91xaznCdJUZbVYb/lnIs9jvRvLfKj2mHnYClYY0 0fKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=nNDq3Qt1; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y13si11097012edr.168.2021.04.19.07.26.23; Mon, 19 Apr 2021 07:26:23 -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=@gmail.com header.s=20161025 header.b=nNDq3Qt1; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 48A0868A08E; Mon, 19 Apr 2021 17:17:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB559680514 for ; Mon, 19 Apr 2021 17:16:56 +0300 (EEST) Received: by mail-qt1-f180.google.com with SMTP id m16so25506059qtx.9 for ; Mon, 19 Apr 2021 07:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=aK4jDz/60TgTc0h7W1NPh+ofshXpg9rSD1dCRpFiL7Y=; b=nNDq3Qt1bGT/QWxznFpoqCYyntYeaJFKV79pbVLsw/nm9TjwR+frPCXht/MVrpISIs d7agD25ML9l033c8AtFmRqdikHHubitIkd7lRttU2xe22Kk5ee+RDpuCrdTJFXZauLAr hppN4DT3C7SuqL71WiExavrVozwp1A7Fodw7GBcy4P0ri5UdeKQH2b65qsBPe3LsxxDn gSqbDKqoFYCGauhROab2W1Q7etF3leC9z0WKjUuJYlE9VsWqgE8nYYCfflrurbAqls5t PmunteArZFCvvn0Q01QcxXMy2h//Bb68a8f8I/5WnVAWJnDqfekOQoNZXGi8b8a1ZVFl OVqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aK4jDz/60TgTc0h7W1NPh+ofshXpg9rSD1dCRpFiL7Y=; b=OnZDyr8yPl5AqIdTFt209b+rujxpihry2AE6ZTYWFSpeu3Ct9M8RiBdbYBOxJ1deZM c3ezX9HGTJgXTu8GVQlkYGx3EK6vqYdOwTc/bgGyYz/p0kGpDMcGTkqLDrGV/NQ0CCYT 9LOzXWkf8bTPYNEehJEQyI/TP6IPFaRP/Uxag2Sp2q4BdZzoIE9lRgDaltti1T3YbZsG rma14EqbYep0MxdM29jjFLxujRWmwBmT2J7YZ8FxN9PkD+onoXjgbiZUZ611UfVeHzzd fcjpxkq3wU/dTkrPTHYsZxLka2QGO9jOIGnu7RqXELrub7hr0Y8u9nAHMyMo/+ZVyNRt ee9A== X-Gm-Message-State: AOAM533Retl5uQQ2FbFFv8kDsv02mWb2xLh2qjDspJrw2oAEmiQfN7zn SwXAcsEcMiMKW8PTQuIGrwTcomxu3T8= X-Received: by 2002:ac8:7c56:: with SMTP id o22mr11980014qtv.80.1618841815546; Mon, 19 Apr 2021 07:16:55 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id r18sm3400743qtn.90.2021.04.19.07.16.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:16:55 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:16:42 -0300 Message-Id: <20210419141642.8429-1-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 84/87] avfilter/buffersrc: postpone removal of sws_param 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pWAoBRAOKF5o It was depreacted less than two years ago Signed-off-by: James Almer --- libavfilter/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/version.h b/libavfilter/version.h index ebac663e0d..dcac3e91ef 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -51,7 +51,7 @@ */ #ifndef FF_API_SWS_PARAM_OPTION -#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 8) +#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9) #endif #ifndef FF_API_BUFFERSINK_ALLOC #define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) From patchwork Mon Apr 19 14:17:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27082 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp568651iob; Mon, 19 Apr 2021 07:27:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtHybnrMDQji+bn9KKlp/9SRCuvBIFDonKVDGOi4TvWnHoBFssoTXZOuOYoAmvWTgf88pq X-Received: by 2002:a05:6402:31af:: with SMTP id dj15mr14122256edb.231.1618842422693; Mon, 19 Apr 2021 07:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842422; cv=none; d=google.com; s=arc-20160816; b=wZR31/5AjvXM7c5bjXxXyETydnsGEx99Zc2M5ZwoLbOGwFB0gn3GGTr2bC078Bkf/u LS7GvDVmLYdyCGqyhQMIsoX0agMPWkAIdx1hPe+INaNfPTLss5IZvhfLb07yra6uccLI w2iRYjv6VGBBBogBHYI2drmca+/eyjy+sBlSmzhxHueto2Y3eFX9SGEz5AJrVycDPjsZ fknVs0k+nvCV9GxiQgyMzsbqUq5Odn6RQZIO1ZbjPuy3PNl9RTV4AqysdJHRM7NS4s0O x8r3pcIMezyHWKuSsuLxRu6XCLu6r9qvCQej7CC1ezgEVgpaAFLmuKqlscVVm9kvcvHU WMbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=FBE46LUu89uIuw+5qCDdiS8J35IsZAtEhlekRoswOF8=; b=pzAp/C9X8CsgJrmG3fHYlV6xL9ms/z6Ii6Aw4Kuy9Rgt9kHrgqOeWXmodg40TzbdYz 8viMsXmL2VWrj0IPNr5sn+3DoVTjYSpIv3d8DlQMhIOngl+5KDTbUCWIMbLef4xCtAqi 3afEiKOVq3CJe/xVsLMi63SaGs4pad3TbsDBnvDmxcH6H+VxWOHNW8qduNOOzqLHIgEg I1nlJbSHjowqn8Q+G924fFKG+d49yFGL/sOT/McYBU4kNupmSuHhpGezTG/Q1Ix2O5GI JiWbf/sj2jjv+2iRAe55BZ9COadLahAVFeL94M+IdU85z+UEN9Ni7Omx12xfpYdm6iqB Ih5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=pJzR5N60; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e9si3513235edz.510.2021.04.19.07.27.01; Mon, 19 Apr 2021 07:27:02 -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=@gmail.com header.s=20161025 header.b=pJzR5N60; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8D93C68A241; Mon, 19 Apr 2021 17:18:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7703E68A20B for ; Mon, 19 Apr 2021 17:17:55 +0300 (EEST) Received: by mail-qk1-f169.google.com with SMTP id d15so22863181qkc.9 for ; Mon, 19 Apr 2021 07:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=GmBubB95+U/XKzP9Pwg7etfkSo/iRY2uK2f5mGtT7RI=; b=pJzR5N60fZqqf5jaQAcDtK1e+73hv8zXxOgTvBBABn+HdkrqdYHZSkpSWIxCoRo1MD p3DTFyxrz94WofDD+bQL5JLSsW1K5jVF5JstOubUUqktXs8F0/ehk6cAIWdruM7OfF+y zQzPUFPwqowMwHQjEzN2UVvwMMh1lPRwQBW+fjfbvXp5FH9yBOHjJroTiWKQfw/6B3AL TKi8M8RxnAEIuLk+Xw68p2wullNC1KW75pwluWCQNaGA2wsnH+eWM/4KcZzRa3B+N8zD L4p7lMqLQNUDrJQldP9T3KKJhgfigg2/jRgVHXjTF3OTJp05yjR3A6tkiOGkIyd/cxrn 6bVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GmBubB95+U/XKzP9Pwg7etfkSo/iRY2uK2f5mGtT7RI=; b=Ho/RAxz09eZ9QWyAACaqpyCWueFr0SVJSUw+DWqeXbC7umfDL/S00nGSe8y1HEQ5xj kl2nW62f/WhmJSeuO4Y9YyBCnwFc83BZdEqGtiMSvfHzJ5nDYflj5q9bOfmamaUrgTmb 1YC5AOnj7tqoLM9HppatBEDC0NpZifUhIHQuo7Wu66qHK73dQryxC9aiLtJrNnJk77oI sqDCCJW9pFgyqoDhweE/hh+Wl6KUalSf7wBhoJIP+kZ6ET5FaZqiKI0I8LwI+JJ5e7c0 40XBjxUckH4cHRckn7dN7atg4pQWzYYGtdWQnnKwlAR48eRAlgH+NCbBM7Em2xHHFa8T DbcQ== X-Gm-Message-State: AOAM531vkWf2zJuuLiDjI3njdLPlEx0ju2NmnLxj0T0eugPYIKqhJuVF MHk+bMxK4bXF1/3D0XQngUSgYP4cl1U= X-Received: by 2002:a37:7246:: with SMTP id n67mr11509936qkc.71.1618841874197; Mon, 19 Apr 2021 07:17:54 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id l24sm9314837qtp.18.2021.04.19.07.17.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:17:53 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:17:42 -0300 Message-Id: <20210419141742.8479-1-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 85/87] avcodec: postpone removal of deprecated codec caps 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: zpgvy3Z3JkSQ This was deprecated only a year ago Signed-off-by: James Almer --- libavcodec/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/version.h b/libavcodec/version.h index 75fde1f8c7..df2801401f 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -58,7 +58,7 @@ #define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 59) #endif #ifndef FF_API_UNUSED_CODEC_CAPS -#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 59) +#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60) #endif #ifndef FF_API_THREAD_SAFE_CALLBACKS #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) From patchwork Mon Apr 19 14:18:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27074 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp569092iob; Mon, 19 Apr 2021 07:27:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAe00EmY74UxOeZ27NT8a4fIX0cq3waIVtQAVIXHL5M16B+hEmimsDcf3J0KFxoYrJDY8Q X-Received: by 2002:a50:fe81:: with SMTP id d1mr26635917edt.308.1618842459803; Mon, 19 Apr 2021 07:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842459; cv=none; d=google.com; s=arc-20160816; b=Wx2SaX3eEGy5z94wjf1ngxdPDeBsOmKhPwM/eU8ooFdojt7XdlLluPr9/AVfSyrIIi jNfFpF8UI8+hobLRHIODLhIYkKJPpzbUA3qogaXZMsbS2V3U+Buse0t9F9e2GiZFn88n m8BuBMn86F1Z7ZTeEo/OgeilqFJqLhy6qyjpaC6ySA6xwQ9kRJSRgiry54Nv/YemxWas 5bO0WzAYnR7au593rhlPSooi3Nntte8RsaWKqO0wvTwhcKa+1toEYRoTaxS166Icinjd w8r4nS3BaCuMoQM+X3xJMWDlE14LyF1q+jKutA9Qznuu6HWe3K+Ynf/Dj9SDqjtGn1H8 XSgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=8RM36O8M+V4q9U8eexU2bzd2eN/mVopVyzyBQHCpcf0=; b=y9ytBjKSw811vk2RYHTtenZJzmPUj42h3cxkXNjz9qBkPRZvttfIcR1s6j5zVHd0V7 m1jwB6VLe03+cnhKf0uC8Gsxb38eX+G/o0Sz0e3lvgN2+qf5BP797/W1bP9jjSt5wvdc pEQzPCeXdQUID6AxnBesNFCkt3Q7kae7Hgx0P7aw7wGmf0l1J3RBEg8JYeVrV+bA4jdL 7/vi/fIshgDCD+h0jvCjAKCtSrWCanNaTH84jIUNSNQxDfPe2XU82silHojTnERKZl8i dMSss9NOyCLX2ppxr/ufF7fMpRt25Fu3YFeCQ53OAbwKS5g7kVsLaxMLc8jaDbhjYJX+ WYhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=tXVu7Lbb; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dp21si12228716ejc.61.2021.04.19.07.27.39; Mon, 19 Apr 2021 07:27:39 -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=@gmail.com header.s=20161025 header.b=tXVu7Lbb; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9C69268A2B1; Mon, 19 Apr 2021 17:18:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9AFC868A2A0 for ; Mon, 19 Apr 2021 17:18:19 +0300 (EEST) Received: by mail-qt1-f169.google.com with SMTP id 18so12735073qtz.6 for ; Mon, 19 Apr 2021 07:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=fFCn/hejaMSLfx5xNlBxRCtX5vHO4fruXOob1sfC5OA=; b=tXVu7LbbIcpzxWyn2zX5RZ1ftHLQPEV/cPspWaPwcoCaLc3WFIaDRH0G9hmrQwOBe3 a4nT7JiPIG9RMSC9kJChnTcgFC/2qP1R4mfqaRcA6DUclWrD6bvea+Mc2NakAhyEbZ6Z AzilHYuC9f+Y0um5xHWMBwOCL1MD8yXbDFjEAJBmDNbbx1rSSVegFZOjslBKUcdZhdDF gyfAjB3OZ7Ol2aSJGrf/viCXtKedK3dVTtFEar9ttdzsAOmSH6TVXexYKwqLrRQFtHQ5 0KkxYU3XxsJhsklvB+kPZk8QzzDiiXh8jRdCuqaOw6gjz4IUF2rL9RjqNl1dbckBOa/Q z3XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fFCn/hejaMSLfx5xNlBxRCtX5vHO4fruXOob1sfC5OA=; b=pzOZayk0NvBv/NmGNLCyLY0XGO0Zi4axdN0s2oPgvEmro1U8Xg7tkXWm5RmI9FncpR Rvq6fDHKIdtLYjHTAJYWhP9U2bCDuHUJb5BsrrlDoMPki4nT3eZcVketsU2vcE1LbgoB WgNLO9ZefW7+PN/ASH6Pbo3joCGridwm+ddciGfz/GO3Vrs/NEoSewtKFko8UXFqs6pB 49P7tlRUtN7+Q6wG7wU+IoAjaRLF+n8gdS0o7QWE2freOekhOuq8vnn6q4G46QW/5S2j n+1iQUXl/OMAdUhSKF4BrtuddeeHMaOyrP8H0HJB6kTGUd1C0il/WWzdI0eAQcejsuUo w9GQ== X-Gm-Message-State: AOAM530OCGA2yLj5xorRHB7CGtK0UNmQiZVUChyw9HReM29JdmLfp9I/ 1Z35EoO9lBqm8lx9SNquJiZcfg2PaF8= X-Received: by 2002:a05:622a:486:: with SMTP id p6mr12098862qtx.98.1618841898099; Mon, 19 Apr 2021 07:18:18 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id l71sm794417qke.27.2021.04.19.07.18.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:18:17 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:18:05 -0300 Message-Id: <20210419141805.8529-1-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 86/87] avcodec: postpone removal of deprecated libopenh264 wrapper options 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4Mhb7f/NStRF They were deprecated only a year ago Signed-off-by: James Almer --- libavcodec/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/version.h b/libavcodec/version.h index df2801401f..414cfee1cd 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -52,10 +52,10 @@ */ #ifndef FF_API_OPENH264_SLICE_MODE -#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 59) +#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60) #endif #ifndef FF_API_OPENH264_CABAC -#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 59) +#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60) #endif #ifndef FF_API_UNUSED_CODEC_CAPS #define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60) From patchwork Mon Apr 19 14:18:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27083 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp569501iob; Mon, 19 Apr 2021 07:28:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHOQKSx3bxp83Or2MmY34vlEMQDh9WaehCHZL32D351SJJRjZ8D7XU7jufuXvlSwVWiNrC X-Received: by 2002:a17:906:aecd:: with SMTP id me13mr22576101ejb.324.1618842490539; Mon, 19 Apr 2021 07:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618842490; cv=none; d=google.com; s=arc-20160816; b=K4Gw/88p1qhxjW+cf6l1zpIy+FQuQJ3XCkhpbGd42huXGaoda8tfzT/ZhtyWCzjdR3 dOt6HQWWM4NLkAwVpHcQvNz2QUFvSA8pqO24Ju+H/p9DVKUowoqi80jLLHRIEDHMqJ31 5pSMSt/NCgbKzQXbiGp4oeiDqwg7a7/tb8DqODJ0FC6BV8dZ8e+tYDH6DUuPq7SBd/0x sWgCr7Lv0Io9zPZ3Y0f3LoRmDJ/F9MuqwGM5pGpHR6YFlWOEUHS2ivp8thkkbtJAr/kE LviOT1ttl6ddGQyI7WkqIKojX+odxDqALAKxnaW8akIPMSs/AW9T6EoAqkqUC5b7agEE GD3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=nifGTvXTfDOv3LinmNnmqSeAqMn73AimOnZSZGNOTtc=; b=mzVyxp0AQIy0xGC2i086BHv8ecWm9WY8x6/fn6fk4cjmnlNBX+NPb1Wn0fVeMcByzj S0pP7UG0WB/ehXcjt2REj4Tft6ZBZjnEndT4m+yQrlmnfqWOiThm2N07jN4Rx1mEVZJq 0eXc4LTeAMMr2mGJXGDakvv0idQC6WsU0QgSWCXODBf2UW7KqNe/mOqusEu5jIgrv1pZ QBdwbW+r03h+D5MhjoAVqYxYb2NCiy8+uXicgtVF22lpbyGrzUZ22Ur0W1ZnSUiJc18W gpwv12Pg7BBBZrKF7wLBdkSlNhd2TNrDQNCafCCcNSKBr7PZ245z2U1gw+vkdEK7ssUq aU7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=pdQvgc3c; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u2si8767856edx.37.2021.04.19.07.28.10; Mon, 19 Apr 2021 07:28: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=@gmail.com header.s=20161025 header.b=pdQvgc3c; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AAC4B68A2C3; Mon, 19 Apr 2021 17:18:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7DF4168A2F6 for ; Mon, 19 Apr 2021 17:18:41 +0300 (EEST) Received: by mail-qt1-f172.google.com with SMTP id a18so2390489qtj.10 for ; Mon, 19 Apr 2021 07:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FesZm/k7/H63hyq5Qad1L+9a8zcLbhdwI/tYsy5bJ5s=; b=pdQvgc3cng7ksPcHp65AtWz2whxSx0k51QwyfgpJ3Z59LyKMLxZWQOS5dA6ncUYlDk PSjSd1901/uH5ogzBOAIH7sHg5Z1jxkJXQKZxJH3DKqe44oNCAhEAcbb+xQihWpUsjus nGB0ecXiCAQyyRxOZj3EGTidPeOl59P9xG8YitPHDr+evWHvwJs4DIvIw/pqvoZd1UJx gHqJ4j/d85ty2IBKCkBGPlyPDG7ggKvhAno9PtoXL0rF3Dm8mop6iG+EDUkRu1Cwmy35 WutunWGBZtZZLT55iAQPEq1TKKgn1/yo5c/k9+q0k0HAkYVn4Wyj2kWLS3yM9C54aavF tcAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FesZm/k7/H63hyq5Qad1L+9a8zcLbhdwI/tYsy5bJ5s=; b=Dpqk5OjThhUwRKCGE0JYHbzzKM4afvrG5Wz5vvfxL7yUVKsDvZ2KDx/h5OUvU1SYVU XkFdiFKvWoOavV0ttilpyunYbevrSlL3R+j/mz+btS1dXj1mO5KGUz3S8hfgbijrXATC LiAddLqkEWR+5sOzNcFqXUF5XcZZ/OYV/On0WH0DKP0ZsBLsQnxH8oEAspXGMfwB4xy2 dp+J6oyHPD7RK7ufWCJ7hJO5ePrDIeXL2GHTuJqp/w+eHn2gm4bnmH/oHJ8AvAjRIb0H nTWsYHvg86h2awbdfQAgJMZOe05/3m2vk0XzRfi92AN6dU2L2/odAQv7k+seVxUSWqYE TSMg== X-Gm-Message-State: AOAM533ohGmtWCyFw1/6gvgdcPf+ylloYKALYUVLHyr28JkUcaut0l9z C0SrYlII9DP+pQeSPwLQlBWORnmpw8w= X-Received: by 2002:ac8:5ad5:: with SMTP id d21mr12101518qtd.198.1618841919983; Mon, 19 Apr 2021 07:18:39 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id k126sm9694315qkb.4.2021.04.19.07.18.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:18:39 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:18:25 -0300 Message-Id: <20210419141825.8579-1-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 87/87] Bump major versions of all libraries. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: NfJMPNT8f9GG From: Anton Khirnov --- libavcodec/version.h | 6 +++--- libavdevice/version.h | 4 ++-- libavfilter/version.h | 4 ++-- libavformat/version.h | 4 ++-- libavutil/version.h | 4 ++-- libpostproc/version.h | 4 ++-- libswresample/version.h | 4 ++-- libswscale/version.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libavcodec/version.h b/libavcodec/version.h index 414cfee1cd..8d37666d5e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -27,9 +27,9 @@ #include "libavutil/version.h" -#define LIBAVCODEC_VERSION_MAJOR 58 -#define LIBAVCODEC_VERSION_MINOR 136 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MAJOR 59 +#define LIBAVCODEC_VERSION_MINOR 0 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/libavdevice/version.h b/libavdevice/version.h index 9fea3252c1..6021a0dd65 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -27,8 +27,8 @@ #include "libavutil/version.h" -#define LIBAVDEVICE_VERSION_MAJOR 58 -#define LIBAVDEVICE_VERSION_MINOR 14 +#define LIBAVDEVICE_VERSION_MAJOR 59 +#define LIBAVDEVICE_VERSION_MINOR 0 #define LIBAVDEVICE_VERSION_MICRO 100 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ diff --git a/libavfilter/version.h b/libavfilter/version.h index dcac3e91ef..4325551d95 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -29,8 +29,8 @@ #include "libavutil/version.h" -#define LIBAVFILTER_VERSION_MAJOR 7 -#define LIBAVFILTER_VERSION_MINOR 111 +#define LIBAVFILTER_VERSION_MAJOR 8 +#define LIBAVFILTER_VERSION_MINOR 0 #define LIBAVFILTER_VERSION_MICRO 100 diff --git a/libavformat/version.h b/libavformat/version.h index 75568212c2..987a38dbb4 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -31,8 +31,8 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here -#define LIBAVFORMAT_VERSION_MAJOR 58 -#define LIBAVFORMAT_VERSION_MINOR 78 +#define LIBAVFORMAT_VERSION_MAJOR 59 +#define LIBAVFORMAT_VERSION_MINOR 0 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --git a/libavutil/version.h b/libavutil/version.h index eb380bc0d7..e11eaa20d0 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -78,8 +78,8 @@ * @{ */ -#define LIBAVUTIL_VERSION_MAJOR 56 -#define LIBAVUTIL_VERSION_MINOR 73 +#define LIBAVUTIL_VERSION_MAJOR 57 +#define LIBAVUTIL_VERSION_MINOR 0 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ diff --git a/libpostproc/version.h b/libpostproc/version.h index 2dca25328a..3819b68997 100644 --- a/libpostproc/version.h +++ b/libpostproc/version.h @@ -28,8 +28,8 @@ #include "libavutil/avutil.h" -#define LIBPOSTPROC_VERSION_MAJOR 55 -#define LIBPOSTPROC_VERSION_MINOR 10 +#define LIBPOSTPROC_VERSION_MAJOR 56 +#define LIBPOSTPROC_VERSION_MINOR 0 #define LIBPOSTPROC_VERSION_MICRO 100 #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ diff --git a/libswresample/version.h b/libswresample/version.h index 35cf7f0c14..ed7ce529d2 100644 --- a/libswresample/version.h +++ b/libswresample/version.h @@ -28,8 +28,8 @@ #include "libavutil/avutil.h" -#define LIBSWRESAMPLE_VERSION_MAJOR 3 -#define LIBSWRESAMPLE_VERSION_MINOR 10 +#define LIBSWRESAMPLE_VERSION_MAJOR 4 +#define LIBSWRESAMPLE_VERSION_MINOR 0 #define LIBSWRESAMPLE_VERSION_MICRO 100 #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ diff --git a/libswscale/version.h b/libswscale/version.h index f7bade61ca..f86a8049c1 100644 --- a/libswscale/version.h +++ b/libswscale/version.h @@ -26,8 +26,8 @@ #include "libavutil/version.h" -#define LIBSWSCALE_VERSION_MAJOR 5 -#define LIBSWSCALE_VERSION_MINOR 10 +#define LIBSWSCALE_VERSION_MAJOR 6 +#define LIBSWSCALE_VERSION_MINOR 0 #define LIBSWSCALE_VERSION_MICRO 100 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ From patchwork Mon Apr 19 18:09:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 27135 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp1270465yba; Mon, 19 Apr 2021 11:10:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPZe4SEgHzUmD4op94sDbOppLFOH2S34+oF/TyhwfUeH5hHr14k1eBTxIHFIjBqHO4qGXb X-Received: by 2002:a17:906:fb81:: with SMTP id lr1mr22276454ejb.62.1618855805496; Mon, 19 Apr 2021 11:10:05 -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 z24si12374101ejj.101.2021.04.19.11.09.57; Mon, 19 Apr 2021 11:10:05 -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=hySL6FhR; 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 DBC1D6883DD; Mon, 19 Apr 2021 21:09:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074027.outbound.protection.outlook.com [40.92.74.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CB650687FAC for ; Mon, 19 Apr 2021 21:09:48 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P5Az9U6vbQ/yKNoqBWpF7VLiNN5L4sG5CT9rMlfLAc9F5TqgIt4c1G6SkZYmlydcneY4FpBSOC26TRAUu0LTC9DuXbVryl9KIuN0qI0Hlp2qdDhwmmyIxek+uYf37iM9IAeZmOCx5q1nrPxhpXSZZGidZikxXPSCcICckZbIVzD762N0VnQec4Kg1Ln5jN6qXBQhl9d+6Bq9XG7WHg8S6NX4dYmKyzTSlrkfYihxFxAFVU+L5uA1CLGfpfrhQ9gcvLQmF+6xP1SqREl88tNUy8lc4NU+aXK06Jg7oQifPCe5uokXjv3tw0nEflGgFx3pdwLzaIX5zdFEekCEWTxTsg== 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-SenderADCheck; bh=MJERgIy9AcocQqO701X/d+N9jq/mMZMcLGE509IGMD8=; b=f6DeR07X/TB3kGryk5/J/QQ21uLdR+EfpCIaF5q7YnZDUNnaskU3jijFq6EXvvqEPc/JDkL5qf3higyw7TVvlvUMiOIMi5yPP7ZEghSYo2hYcdlGAFLCDpdzUbSraFM+yqkWCO/fk8qyiRpCm73S+dhHGfeTYzI/2TCmxSRD/lUWdMKx5f8SJU9kqCQcYEExB7YDoJV8/ecgvst2Uy02omirpBp0iy/rgKvX+8aLw+ao762aOs1Y4kwoxBzDkX8bkMnK9Uz/rMF9r6K5YbwORv1k/B0zKy8v0cMXwZDRyCnie2jupI7Ljn2jsGLd0hqdWFpBP1YhV2JaUBmu1GPR+w== 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=MJERgIy9AcocQqO701X/d+N9jq/mMZMcLGE509IGMD8=; b=hySL6FhRr+DMJiIqckngGx+NDehp9YGz9LrGH6s4pQO+XoeAi6h2ORkE2IvevMtEY98MKLKgBREDHiIjcCtR1EOyi+HWW/csV8D0EPhueEBDhqAx5hUnJXvlDYZ+t7uyuAViMXNDwAW8FNXtb0mTkV0tWjeWh9MWuHCUzQQwDSbEemVce5g/W24HK38oQMG30sv64WJF/B0QRs4Xx6RawtEVMalbilTRhH1rF8Q2FiE3iUqtxBtk/KMwEnbYf+ZqYIGI3jzVbwVg3JKFDSh6Z16AWW2sOE6L81lsk86dBw3mypHsh0xEugLxeOCGK1zM7JZiOD4hRf9PXTJjJjTw4A== Received: from HE1EUR04FT056.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::45) by HE1EUR04HT159.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Mon, 19 Apr 2021 18:09:25 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e0d::46) by HE1EUR04FT056.mail.protection.outlook.com (2a01:111:e400:7e0d::301) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Mon, 19 Apr 2021 18:09:25 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:C487E06CF00B4EDAB3D8940038C3458839BB5DDE0FA2D9DC042BFDA81B48D328; UpperCasedChecksum:2A3CB60868440CC79F28CF7B730FC1837B82F332A037EA35D1067EAA19AADF63; SizeAsReceived:7481; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.024; Mon, 19 Apr 2021 18:09:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 20:09:04 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> X-TMN: [B7ky9lcbhTs+ZuGdDRYuZKUxqkn7j6YX] X-ClientProxiedBy: PR3PR09CA0013.eurprd09.prod.outlook.com (2603:10a6:102:b7::18) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210419180906.784013-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by PR3PR09CA0013.eurprd09.prod.outlook.com (2603:10a6:102:b7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Mon, 19 Apr 2021 18:09:17 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: d4282a29-6d3b-424c-3993-08d9035e3f52 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXso3HBMtYYIuL6f8PkhXcHdTMQNi+QF/yhzmJKaC62FI+qrJkuKmIOkVYDXfHcN6W7UKZ3LzD3gaYsPmJWQLPomrM3gVSAoEF2PHk0Q78OXQvuv2ni0a0wY3BVBSFvp1MwklYqF6+Sp0EuMfzdNwlgk+wzqUi1NB7LLHJDoPNXYWJFGfkuxt5WTo1vLA+aURF+rNxzfkpIgMWWGUr6PSXeh+ZZ13crMTZWzOF92ZRx7b8832OV800KoGirp/h9IqbenkYygg3A3N4YDCUXEM/Nlr7LZpxUD9CG/qqhwmYXRcN41+LFAIhnUsroyWHNcHOPTxlzhpBY4ONI/RUDEo6+UFGG7wY3haVpPm+IURcFc5vf6pqiwXuCIpg7T7B909MFbNfUIXeYGu6+G+4wgQVVicd8DTYFoeRASeU4L04lVtyWJK/QYXL10Cu/vB3QfYYjFD4/E6WKJ/NOMXcl+Z1g0zRGvxb/YAGki3pxB6dF+Emcjcl4loYkTxNTglJS4F0x17WCjsg93rZqq6oQJgSfheDLLkUzuElGucimn7gqWdfoL4NDBUfi/HF6RkDtAEr6tXAFGg4pWojyHEOgHf05renkp03S0W+tlBTkA6jyVB2IxH1kzGMj/7dgXcIyXlbIwYlwrmXFJYJixOQ+ebaVD+UTyK8sZZqvSAwW2Mmy1xPf2JmqONnMM2UdRMva9rzRji+ZTOFNxB4JbIdxjw/OL5AiVd5f2rQ= X-MS-TrafficTypeDiagnostic: HE1EUR04HT159: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ayQbb/Vh0rgM5CM7WWFAOcQiegOguVzrT21RmSmO3+9/U3NK3gug+Ud27Up+AM/DUjs9V/uCLgds1B9T1s0Jb5JaczlizkK3EYTcGYof+ykOHORWf6Lh6jkoXwu+UCTge6xG6VOjka4toqeAczdaVDZo8LOeUdvK+6/oWIbM5hO6VtLjul+gSM+WzC45+5kQSj/KR0JYq1xQO1PgpZAPx29xL1nrt/FvfVtRwE8OzgspcZn5lau5f2tTyh0U0LFQpAyq3QH2BToy3ImVFvpzeeSlQiSgMxlQU2cEOByKc450lzCWfwSQpxFGm8Pgf4pZugiOZR4wgiDrVLsZriNH8VqJfRlbjJ497l+CoPUuc+UXetW5a0TNcSakTfEOFBslEBnpuTdsl3pTquGOUOoJSA== X-MS-Exchange-AntiSpam-MessageData: c5mhhnM0M3Vh2QUTf50JYvm59fHLfL52bUth+VkwQ6KusR6Arbsac8XobIXxLx+89WUdew/1kfggvLhDn0+c0eJO7Mxjach69NcoM4GI4/fKSESOaBHcVbipTva5Kn/heC+ivN+nmtGgmnecdDFVMA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4282a29-6d3b-424c-3993-08d9035e3f52 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2021 18:09:19.2020 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT056.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT159 Subject: [FFmpeg-devel] [PATCH 88/90] avfilter: Constify all AVFilters 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: QRb5e7VypZZp Content-Length: 273884 This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt --- configure | 4 +- libavfilter/aeval.c | 4 +- libavfilter/af_acontrast.c | 2 +- libavfilter/af_acopy.c | 2 +- libavfilter/af_acrossover.c | 2 +- libavfilter/af_acrusher.c | 2 +- libavfilter/af_adeclick.c | 4 +- libavfilter/af_adelay.c | 2 +- libavfilter/af_adenorm.c | 2 +- libavfilter/af_aderivative.c | 4 +- libavfilter/af_aecho.c | 2 +- libavfilter/af_aemphasis.c | 2 +- libavfilter/af_aexciter.c | 2 +- libavfilter/af_afade.c | 4 +- libavfilter/af_afftdn.c | 2 +- libavfilter/af_afftfilt.c | 2 +- libavfilter/af_afir.c | 2 +- libavfilter/af_aformat.c | 2 +- libavfilter/af_afreqshift.c | 4 +- libavfilter/af_agate.c | 4 +- libavfilter/af_aiir.c | 2 +- libavfilter/af_alimiter.c | 2 +- libavfilter/af_amerge.c | 2 +- libavfilter/af_amix.c | 2 +- libavfilter/af_amultiply.c | 2 +- libavfilter/af_anequalizer.c | 2 +- libavfilter/af_anlmdn.c | 2 +- libavfilter/af_anlms.c | 2 +- libavfilter/af_anull.c | 2 +- libavfilter/af_apad.c | 2 +- libavfilter/af_aphaser.c | 2 +- libavfilter/af_apulsator.c | 2 +- libavfilter/af_aresample.c | 2 +- libavfilter/af_arnndn.c | 2 +- libavfilter/af_asetnsamples.c | 2 +- libavfilter/af_asetrate.c | 2 +- libavfilter/af_ashowinfo.c | 2 +- libavfilter/af_asoftclip.c | 2 +- libavfilter/af_asr.c | 2 +- libavfilter/af_astats.c | 2 +- libavfilter/af_asubboost.c | 2 +- libavfilter/af_asupercut.c | 8 +- libavfilter/af_atempo.c | 2 +- libavfilter/af_axcorrelate.c | 2 +- libavfilter/af_biquads.c | 2 +- libavfilter/af_bs2b.c | 2 +- libavfilter/af_channelmap.c | 2 +- libavfilter/af_channelsplit.c | 2 +- libavfilter/af_chorus.c | 2 +- libavfilter/af_compand.c | 2 +- libavfilter/af_compensationdelay.c | 2 +- libavfilter/af_crossfeed.c | 2 +- libavfilter/af_crystalizer.c | 2 +- libavfilter/af_dcshift.c | 2 +- libavfilter/af_deesser.c | 2 +- libavfilter/af_drmeter.c | 2 +- libavfilter/af_dynaudnorm.c | 2 +- libavfilter/af_earwax.c | 2 +- libavfilter/af_extrastereo.c | 2 +- libavfilter/af_firequalizer.c | 2 +- libavfilter/af_flanger.c | 2 +- libavfilter/af_haas.c | 2 +- libavfilter/af_hdcd.c | 2 +- libavfilter/af_headphone.c | 2 +- libavfilter/af_join.c | 2 +- libavfilter/af_ladspa.c | 2 +- libavfilter/af_loudnorm.c | 2 +- libavfilter/af_lv2.c | 2 +- libavfilter/af_mcompand.c | 2 +- libavfilter/af_pan.c | 2 +- libavfilter/af_replaygain.c | 2 +- libavfilter/af_rubberband.c | 2 +- libavfilter/af_sidechaincompress.c | 4 +- libavfilter/af_silencedetect.c | 2 +- libavfilter/af_silenceremove.c | 2 +- libavfilter/af_sofalizer.c | 2 +- libavfilter/af_speechnorm.c | 2 +- libavfilter/af_stereotools.c | 2 +- libavfilter/af_stereowiden.c | 2 +- libavfilter/af_superequalizer.c | 2 +- libavfilter/af_surround.c | 2 +- libavfilter/af_tremolo.c | 2 +- libavfilter/af_vibrato.c | 2 +- libavfilter/af_volume.c | 2 +- libavfilter/af_volumedetect.c | 2 +- libavfilter/allfilters.c | 980 ++++++++++++++-------------- libavfilter/asink_anullsink.c | 2 +- libavfilter/asrc_afirsrc.c | 2 +- libavfilter/asrc_anoisesrc.c | 2 +- libavfilter/asrc_anullsrc.c | 2 +- libavfilter/asrc_flite.c | 2 +- libavfilter/asrc_hilbert.c | 2 +- libavfilter/asrc_sinc.c | 2 +- libavfilter/asrc_sine.c | 2 +- libavfilter/avf_abitscope.c | 2 +- libavfilter/avf_ahistogram.c | 2 +- libavfilter/avf_aphasemeter.c | 2 +- libavfilter/avf_avectorscope.c | 2 +- libavfilter/avf_concat.c | 2 +- libavfilter/avf_showcqt.c | 2 +- libavfilter/avf_showfreqs.c | 2 +- libavfilter/avf_showspatial.c | 2 +- libavfilter/avf_showspectrum.c | 4 +- libavfilter/avf_showvolume.c | 2 +- libavfilter/avf_showwaves.c | 4 +- libavfilter/buffersink.c | 4 +- libavfilter/buffersrc.c | 4 +- libavfilter/f_bench.c | 4 +- libavfilter/f_cue.c | 4 +- libavfilter/f_drawgraph.c | 4 +- libavfilter/f_ebur128.c | 2 +- libavfilter/f_graphmonitor.c | 4 +- libavfilter/f_interleave.c | 4 +- libavfilter/f_loop.c | 4 +- libavfilter/f_metadata.c | 4 +- libavfilter/f_perms.c | 4 +- libavfilter/f_realtime.c | 4 +- libavfilter/f_reverse.c | 4 +- libavfilter/f_select.c | 4 +- libavfilter/f_sendcmd.c | 4 +- libavfilter/f_sidedata.c | 4 +- libavfilter/f_streamselect.c | 4 +- libavfilter/f_zmq.c | 4 +- libavfilter/fifo.c | 4 +- libavfilter/setpts.c | 4 +- libavfilter/settb.c | 4 +- libavfilter/split.c | 4 +- libavfilter/src_movie.c | 4 +- libavfilter/trim.c | 4 +- libavfilter/vaf_spectrumsynth.c | 2 +- libavfilter/vf_addroi.c | 2 +- libavfilter/vf_alphamerge.c | 2 +- libavfilter/vf_amplify.c | 2 +- libavfilter/vf_aspect.c | 4 +- libavfilter/vf_atadenoise.c | 2 +- libavfilter/vf_avgblur.c | 2 +- libavfilter/vf_avgblur_opencl.c | 4 +- libavfilter/vf_avgblur_vulkan.c | 2 +- libavfilter/vf_bbox.c | 2 +- libavfilter/vf_bilateral.c | 2 +- libavfilter/vf_bitplanenoise.c | 2 +- libavfilter/vf_blackdetect.c | 2 +- libavfilter/vf_blackframe.c | 2 +- libavfilter/vf_blend.c | 4 +- libavfilter/vf_bm3d.c | 2 +- libavfilter/vf_boxblur.c | 2 +- libavfilter/vf_bwdif.c | 2 +- libavfilter/vf_cas.c | 2 +- libavfilter/vf_chromaber_vulkan.c | 2 +- libavfilter/vf_chromakey.c | 4 +- libavfilter/vf_chromanr.c | 2 +- libavfilter/vf_chromashift.c | 4 +- libavfilter/vf_ciescope.c | 2 +- libavfilter/vf_codecview.c | 2 +- libavfilter/vf_colorbalance.c | 2 +- libavfilter/vf_colorchannelmixer.c | 2 +- libavfilter/vf_colorconstancy.c | 2 +- libavfilter/vf_colorcontrast.c | 2 +- libavfilter/vf_colorcorrect.c | 2 +- libavfilter/vf_colorize.c | 2 +- libavfilter/vf_colorkey.c | 4 +- libavfilter/vf_colorkey_opencl.c | 2 +- libavfilter/vf_colorlevels.c | 2 +- libavfilter/vf_colormatrix.c | 2 +- libavfilter/vf_colorspace.c | 2 +- libavfilter/vf_colortemperature.c | 2 +- libavfilter/vf_convolution.c | 10 +- libavfilter/vf_convolution_opencl.c | 8 +- libavfilter/vf_convolve.c | 4 +- libavfilter/vf_copy.c | 2 +- libavfilter/vf_coreimage.m | 4 +- libavfilter/vf_cover_rect.c | 2 +- libavfilter/vf_crop.c | 2 +- libavfilter/vf_cropdetect.c | 2 +- libavfilter/vf_curves.c | 2 +- libavfilter/vf_datascope.c | 6 +- libavfilter/vf_dblur.c | 2 +- libavfilter/vf_dctdnoiz.c | 2 +- libavfilter/vf_deband.c | 2 +- libavfilter/vf_deblock.c | 2 +- libavfilter/vf_decimate.c | 2 +- libavfilter/vf_dedot.c | 2 +- libavfilter/vf_deflicker.c | 2 +- libavfilter/vf_deinterlace_qsv.c | 2 +- libavfilter/vf_deinterlace_vaapi.c | 2 +- libavfilter/vf_dejudder.c | 2 +- libavfilter/vf_delogo.c | 2 +- libavfilter/vf_derain.c | 2 +- libavfilter/vf_deshake.c | 2 +- libavfilter/vf_deshake_opencl.c | 2 +- libavfilter/vf_despill.c | 2 +- libavfilter/vf_detelecine.c | 2 +- libavfilter/vf_displace.c | 2 +- libavfilter/vf_dnn_detect.c | 2 +- libavfilter/vf_dnn_processing.c | 2 +- libavfilter/vf_drawbox.c | 4 +- libavfilter/vf_drawtext.c | 2 +- libavfilter/vf_edgedetect.c | 2 +- libavfilter/vf_elbg.c | 2 +- libavfilter/vf_entropy.c | 2 +- libavfilter/vf_epx.c | 2 +- libavfilter/vf_eq.c | 2 +- libavfilter/vf_estdif.c | 2 +- libavfilter/vf_exposure.c | 2 +- libavfilter/vf_extractplanes.c | 4 +- libavfilter/vf_fade.c | 2 +- libavfilter/vf_fftdnoiz.c | 2 +- libavfilter/vf_fftfilt.c | 2 +- libavfilter/vf_field.c | 2 +- libavfilter/vf_fieldhint.c | 2 +- libavfilter/vf_fieldmatch.c | 2 +- libavfilter/vf_fieldorder.c | 2 +- libavfilter/vf_fillborders.c | 2 +- libavfilter/vf_find_rect.c | 2 +- libavfilter/vf_floodfill.c | 2 +- libavfilter/vf_format.c | 4 +- libavfilter/vf_fps.c | 2 +- libavfilter/vf_framepack.c | 2 +- libavfilter/vf_framerate.c | 2 +- libavfilter/vf_framestep.c | 2 +- libavfilter/vf_freezedetect.c | 2 +- libavfilter/vf_freezeframes.c | 2 +- libavfilter/vf_frei0r.c | 4 +- libavfilter/vf_fspp.c | 2 +- libavfilter/vf_gblur.c | 2 +- libavfilter/vf_geq.c | 2 +- libavfilter/vf_gradfun.c | 2 +- libavfilter/vf_hflip.c | 2 +- libavfilter/vf_histeq.c | 2 +- libavfilter/vf_histogram.c | 4 +- libavfilter/vf_hqdn3d.c | 2 +- libavfilter/vf_hqx.c | 2 +- libavfilter/vf_hue.c | 2 +- libavfilter/vf_hwdownload.c | 2 +- libavfilter/vf_hwmap.c | 2 +- libavfilter/vf_hwupload.c | 2 +- libavfilter/vf_hwupload_cuda.c | 2 +- libavfilter/vf_hysteresis.c | 2 +- libavfilter/vf_identity.c | 4 +- libavfilter/vf_idet.c | 2 +- libavfilter/vf_il.c | 2 +- libavfilter/vf_kerndeint.c | 2 +- libavfilter/vf_lagfun.c | 2 +- libavfilter/vf_lenscorrection.c | 2 +- libavfilter/vf_lensfun.c | 2 +- libavfilter/vf_libopencv.c | 2 +- libavfilter/vf_libvmaf.c | 2 +- libavfilter/vf_limiter.c | 2 +- libavfilter/vf_lumakey.c | 2 +- libavfilter/vf_lut.c | 2 +- libavfilter/vf_lut2.c | 4 +- libavfilter/vf_lut3d.c | 6 +- libavfilter/vf_maskedclamp.c | 2 +- libavfilter/vf_maskedmerge.c | 2 +- libavfilter/vf_maskedminmax.c | 4 +- libavfilter/vf_maskedthreshold.c | 2 +- libavfilter/vf_maskfun.c | 2 +- libavfilter/vf_mcdeint.c | 2 +- libavfilter/vf_median.c | 2 +- libavfilter/vf_mergeplanes.c | 2 +- libavfilter/vf_mestimate.c | 2 +- libavfilter/vf_midequalizer.c | 2 +- libavfilter/vf_minterpolate.c | 2 +- libavfilter/vf_misc_vaapi.c | 4 +- libavfilter/vf_mix.c | 4 +- libavfilter/vf_monochrome.c | 2 +- libavfilter/vf_mpdecimate.c | 2 +- libavfilter/vf_neighbor.c | 2 +- libavfilter/vf_neighbor_opencl.c | 4 +- libavfilter/vf_nlmeans.c | 2 +- libavfilter/vf_nlmeans_opencl.c | 2 +- libavfilter/vf_nnedi.c | 2 +- libavfilter/vf_noise.c | 2 +- libavfilter/vf_normalize.c | 2 +- libavfilter/vf_null.c | 2 +- libavfilter/vf_ocr.c | 2 +- libavfilter/vf_overlay.c | 2 +- libavfilter/vf_overlay_cuda.c | 2 +- libavfilter/vf_overlay_opencl.c | 2 +- libavfilter/vf_overlay_qsv.c | 2 +- libavfilter/vf_overlay_vulkan.c | 2 +- libavfilter/vf_owdenoise.c | 2 +- libavfilter/vf_pad.c | 2 +- libavfilter/vf_pad_opencl.c | 2 +- libavfilter/vf_palettegen.c | 2 +- libavfilter/vf_paletteuse.c | 2 +- libavfilter/vf_perspective.c | 2 +- libavfilter/vf_phase.c | 2 +- libavfilter/vf_photosensitivity.c | 2 +- libavfilter/vf_pixdesctest.c | 2 +- libavfilter/vf_pp.c | 2 +- libavfilter/vf_pp7.c | 2 +- libavfilter/vf_premultiply.c | 4 +- libavfilter/vf_procamp_vaapi.c | 2 +- libavfilter/vf_program_opencl.c | 4 +- libavfilter/vf_pseudocolor.c | 2 +- libavfilter/vf_psnr.c | 2 +- libavfilter/vf_pullup.c | 2 +- libavfilter/vf_qp.c | 2 +- libavfilter/vf_random.c | 2 +- libavfilter/vf_readeia608.c | 2 +- libavfilter/vf_readvitc.c | 2 +- libavfilter/vf_remap.c | 2 +- libavfilter/vf_removegrain.c | 2 +- libavfilter/vf_removelogo.c | 2 +- libavfilter/vf_repeatfields.c | 2 +- libavfilter/vf_rotate.c | 2 +- libavfilter/vf_sab.c | 2 +- libavfilter/vf_scale.c | 6 +- libavfilter/vf_scale_cuda.c | 2 +- libavfilter/vf_scale_npp.c | 2 +- libavfilter/vf_scale_qsv.c | 2 +- libavfilter/vf_scale_vaapi.c | 2 +- libavfilter/vf_scale_vulkan.c | 2 +- libavfilter/vf_scdet.c | 2 +- libavfilter/vf_scroll.c | 2 +- libavfilter/vf_selectivecolor.c | 2 +- libavfilter/vf_separatefields.c | 2 +- libavfilter/vf_setparams.c | 6 +- libavfilter/vf_shear.c | 2 +- libavfilter/vf_showinfo.c | 2 +- libavfilter/vf_showpalette.c | 2 +- libavfilter/vf_shuffleframes.c | 2 +- libavfilter/vf_shufflepixels.c | 2 +- libavfilter/vf_shuffleplanes.c | 2 +- libavfilter/vf_signalstats.c | 2 +- libavfilter/vf_signature.c | 2 +- libavfilter/vf_smartblur.c | 2 +- libavfilter/vf_spp.c | 2 +- libavfilter/vf_sr.c | 2 +- libavfilter/vf_ssim.c | 2 +- libavfilter/vf_stack.c | 6 +- libavfilter/vf_stereo3d.c | 2 +- libavfilter/vf_subtitles.c | 4 +- libavfilter/vf_super2xsai.c | 2 +- libavfilter/vf_swaprect.c | 2 +- libavfilter/vf_swapuv.c | 2 +- libavfilter/vf_telecine.c | 2 +- libavfilter/vf_threshold.c | 2 +- libavfilter/vf_thumbnail.c | 2 +- libavfilter/vf_thumbnail_cuda.c | 2 +- libavfilter/vf_tile.c | 2 +- libavfilter/vf_tinterlace.c | 4 +- libavfilter/vf_tmidequalizer.c | 2 +- libavfilter/vf_tonemap.c | 2 +- libavfilter/vf_tonemap_opencl.c | 2 +- libavfilter/vf_tonemap_vaapi.c | 2 +- libavfilter/vf_tpad.c | 2 +- libavfilter/vf_transpose.c | 2 +- libavfilter/vf_transpose_npp.c | 2 +- libavfilter/vf_transpose_opencl.c | 2 +- libavfilter/vf_transpose_vaapi.c | 2 +- libavfilter/vf_unsharp.c | 2 +- libavfilter/vf_unsharp_opencl.c | 2 +- libavfilter/vf_untile.c | 2 +- libavfilter/vf_uspp.c | 2 +- libavfilter/vf_v360.c | 2 +- libavfilter/vf_vaguedenoiser.c | 2 +- libavfilter/vf_vectorscope.c | 2 +- libavfilter/vf_vflip.c | 2 +- libavfilter/vf_vfrdet.c | 2 +- libavfilter/vf_vibrance.c | 2 +- libavfilter/vf_vidstabdetect.c | 2 +- libavfilter/vf_vidstabtransform.c | 2 +- libavfilter/vf_vif.c | 2 +- libavfilter/vf_vignette.c | 2 +- libavfilter/vf_vmafmotion.c | 2 +- libavfilter/vf_vpp_qsv.c | 2 +- libavfilter/vf_w3fdif.c | 2 +- libavfilter/vf_waveform.c | 2 +- libavfilter/vf_weave.c | 4 +- libavfilter/vf_xbr.c | 2 +- libavfilter/vf_xfade.c | 2 +- libavfilter/vf_xfade_opencl.c | 2 +- libavfilter/vf_xmedian.c | 4 +- libavfilter/vf_yadif.c | 2 +- libavfilter/vf_yadif_cuda.c | 2 +- libavfilter/vf_yaepblur.c | 2 +- libavfilter/vf_zoompan.c | 2 +- libavfilter/vf_zscale.c | 2 +- libavfilter/vsink_nullsink.c | 2 +- libavfilter/vsrc_cellauto.c | 2 +- libavfilter/vsrc_gradients.c | 2 +- libavfilter/vsrc_life.c | 2 +- libavfilter/vsrc_mandelbrot.c | 2 +- libavfilter/vsrc_mptestsrc.c | 2 +- libavfilter/vsrc_sierpinski.c | 2 +- libavfilter/vsrc_testsrc.c | 26 +- 388 files changed, 967 insertions(+), 967 deletions(-) diff --git a/configure b/configure index d14eb552ea..d74c9fe3da 100755 --- a/configure +++ b/configure @@ -3902,7 +3902,7 @@ find_things_extern(){ find_filters_extern(){ file=$source_path/$1 - sed -n 's/^extern AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file + sed -n 's/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file } FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c) @@ -7639,7 +7639,7 @@ cp_if_changed $TMPH libavutil/avconfig.h # full_filter_name_foo=vf_foo # full_filter_name_bar=asrc_bar # ... -eval "$(sed -n "s/^extern AVFilter ff_\([avfsinkrc]\{2,5\}\)_\(.*\);/full_filter_name_\2=\1_\2/p" $source_path/libavfilter/allfilters.c)" +eval "$(sed -n "s/^extern const AVFilter ff_\([avfsinkrc]\{2,5\}\)_\(.*\);/full_filter_name_\2=\1_\2/p" $source_path/libavfilter/allfilters.c)" # generate the lists of enabled components print_enabled_components(){ diff --git a/libavfilter/aeval.c b/libavfilter/aeval.c index d5437431ab..ed7cf502de 100644 --- a/libavfilter/aeval.c +++ b/libavfilter/aeval.c @@ -322,7 +322,7 @@ static const AVFilterPad aevalsrc_outputs[] = { { NULL } }; -AVFilter ff_asrc_aevalsrc = { +const AVFilter ff_asrc_aevalsrc = { .name = "aevalsrc", .description = NULL_IF_CONFIG_SMALL("Generate an audio signal generated by an expression."), .query_formats = query_formats, @@ -473,7 +473,7 @@ static const AVFilterPad aeval_outputs[] = { { NULL } }; -AVFilter ff_af_aeval = { +const AVFilter ff_af_aeval = { .name = "aeval", .description = NULL_IF_CONFIG_SMALL("Filter audio signal according to a specified expression."), .query_formats = aeval_query_formats, diff --git a/libavfilter/af_acontrast.c b/libavfilter/af_acontrast.c index e08053146e..69fe6b7e22 100644 --- a/libavfilter/af_acontrast.c +++ b/libavfilter/af_acontrast.c @@ -208,7 +208,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_acontrast = { +const AVFilter ff_af_acontrast = { .name = "acontrast", .description = NULL_IF_CONFIG_SMALL("Simple audio dynamic range compression/expansion filter."), .query_formats = query_formats, diff --git a/libavfilter/af_acopy.c b/libavfilter/af_acopy.c index 2d915019db..29551996d9 100644 --- a/libavfilter/af_acopy.c +++ b/libavfilter/af_acopy.c @@ -62,7 +62,7 @@ static const AVFilterPad acopy_outputs[] = { { NULL } }; -AVFilter ff_af_acopy = { +const AVFilter ff_af_acopy = { .name = "acopy", .description = NULL_IF_CONFIG_SMALL("Copy the input audio unchanged to the output."), .inputs = acopy_inputs, diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c index 03a7ae1119..3ba67b30e1 100644 --- a/libavfilter/af_acrossover.c +++ b/libavfilter/af_acrossover.c @@ -569,7 +569,7 @@ static const AVFilterPad inputs[] = { { NULL } }; -AVFilter ff_af_acrossover = { +const AVFilter ff_af_acrossover = { .name = "acrossover", .description = NULL_IF_CONFIG_SMALL("Split audio into per-bands streams."), .priv_size = sizeof(AudioCrossoverContext), diff --git a/libavfilter/af_acrusher.c b/libavfilter/af_acrusher.c index d3c31c20bd..ce337013ab 100644 --- a/libavfilter/af_acrusher.c +++ b/libavfilter/af_acrusher.c @@ -364,7 +364,7 @@ static const AVFilterPad avfilter_af_acrusher_outputs[] = { { NULL } }; -AVFilter ff_af_acrusher = { +const AVFilter ff_af_acrusher = { .name = "acrusher", .description = NULL_IF_CONFIG_SMALL("Reduce audio bit resolution."), .priv_size = sizeof(ACrusherContext), diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c index c8a41cd60e..798838f522 100644 --- a/libavfilter/af_adeclick.c +++ b/libavfilter/af_adeclick.c @@ -762,7 +762,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_adeclick = { +const AVFilter ff_af_adeclick = { .name = "adeclick", .description = NULL_IF_CONFIG_SMALL("Remove impulsive noise from input audio."), .query_formats = query_formats, @@ -798,7 +798,7 @@ static const AVOption adeclip_options[] = { AVFILTER_DEFINE_CLASS(adeclip); -AVFilter ff_af_adeclip = { +const AVFilter ff_af_adeclip = { .name = "adeclip", .description = NULL_IF_CONFIG_SMALL("Remove clipping from input audio."), .query_formats = query_formats, diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c index 6ac81c2a3e..ba7fac6d5e 100644 --- a/libavfilter/af_adelay.c +++ b/libavfilter/af_adelay.c @@ -345,7 +345,7 @@ static const AVFilterPad adelay_outputs[] = { { NULL } }; -AVFilter ff_af_adelay = { +const AVFilter ff_af_adelay = { .name = "adelay", .description = NULL_IF_CONFIG_SMALL("Delay one or more audio channels."), .query_formats = query_formats, diff --git a/libavfilter/af_adenorm.c b/libavfilter/af_adenorm.c index 992a1fe56a..ee8d26ee73 100644 --- a/libavfilter/af_adenorm.c +++ b/libavfilter/af_adenorm.c @@ -318,7 +318,7 @@ static const AVOption adenorm_options[] = { AVFILTER_DEFINE_CLASS(adenorm); -AVFilter ff_af_adenorm = { +const AVFilter ff_af_adenorm = { .name = "adenorm", .description = NULL_IF_CONFIG_SMALL("Remedy denormals by adding extremely low-level noise."), .query_formats = query_formats, diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c index a591515cbf..6b3e4dd0e4 100644 --- a/libavfilter/af_aderivative.c +++ b/libavfilter/af_aderivative.c @@ -186,7 +186,7 @@ static const AVFilterPad aderivative_outputs[] = { { NULL } }; -AVFilter ff_af_aderivative = { +const AVFilter ff_af_aderivative = { .name = "aderivative", .description = NULL_IF_CONFIG_SMALL("Compute derivative of input audio."), .query_formats = query_formats, @@ -196,7 +196,7 @@ AVFilter ff_af_aderivative = { .outputs = aderivative_outputs, }; -AVFilter ff_af_aintegral = { +const AVFilter ff_af_aintegral = { .name = "aintegral", .description = NULL_IF_CONFIG_SMALL("Compute integral of input audio."), .query_formats = query_formats, diff --git a/libavfilter/af_aecho.c b/libavfilter/af_aecho.c index 7a7b8bccf2..4e45ab9a8b 100644 --- a/libavfilter/af_aecho.c +++ b/libavfilter/af_aecho.c @@ -376,7 +376,7 @@ static const AVFilterPad aecho_outputs[] = { { NULL } }; -AVFilter ff_af_aecho = { +const AVFilter ff_af_aecho = { .name = "aecho", .description = NULL_IF_CONFIG_SMALL("Add echoing to the audio."), .query_formats = query_formats, diff --git a/libavfilter/af_aemphasis.c b/libavfilter/af_aemphasis.c index 50999572c9..66fe7036fa 100644 --- a/libavfilter/af_aemphasis.c +++ b/libavfilter/af_aemphasis.c @@ -400,7 +400,7 @@ static const AVFilterPad avfilter_af_aemphasis_outputs[] = { { NULL } }; -AVFilter ff_af_aemphasis = { +const AVFilter ff_af_aemphasis = { .name = "aemphasis", .description = NULL_IF_CONFIG_SMALL("Audio emphasis."), .priv_size = sizeof(AudioEmphasisContext), diff --git a/libavfilter/af_aexciter.c b/libavfilter/af_aexciter.c index f09c99984c..e7f72cca38 100644 --- a/libavfilter/af_aexciter.c +++ b/libavfilter/af_aexciter.c @@ -303,7 +303,7 @@ static const AVFilterPad avfilter_af_aexciter_outputs[] = { { NULL } }; -AVFilter ff_af_aexciter = { +const AVFilter ff_af_aexciter = { .name = "aexciter", .description = NULL_IF_CONFIG_SMALL("Enhance high frequency part of audio."), .priv_size = sizeof(AExciterContext), diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index 976b6752cd..b22432f2e7 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -365,7 +365,7 @@ static const AVFilterPad avfilter_af_afade_outputs[] = { { NULL } }; -AVFilter ff_af_afade = { +const AVFilter ff_af_afade = { .name = "afade", .description = NULL_IF_CONFIG_SMALL("Fade in/out input audio."), .query_formats = query_formats, @@ -653,7 +653,7 @@ static const AVFilterPad avfilter_af_acrossfade_outputs[] = { { NULL } }; -AVFilter ff_af_acrossfade = { +const AVFilter ff_af_acrossfade = { .name = "acrossfade", .description = NULL_IF_CONFIG_SMALL("Cross fade two input audio streams."), .query_formats = query_formats, diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c index bde5ff6685..064009ffd5 100644 --- a/libavfilter/af_afftdn.c +++ b/libavfilter/af_afftdn.c @@ -1418,7 +1418,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_afftdn = { +const AVFilter ff_af_afftdn = { .name = "afftdn", .description = NULL_IF_CONFIG_SMALL("Denoise audio samples using FFT."), .query_formats = query_formats, diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index 9b9001a44b..6c1ddbe51f 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -476,7 +476,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_afftfilt = { +const AVFilter ff_af_afftfilt = { .name = "afftfilt", .description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to samples in frequency domain."), .priv_size = sizeof(AFFTFiltContext), diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c index 1b4e0a0c9e..26d61d4c0f 100644 --- a/libavfilter/af_afir.c +++ b/libavfilter/af_afir.c @@ -948,7 +948,7 @@ static const AVOption afir_options[] = { AVFILTER_DEFINE_CLASS(afir); -AVFilter ff_af_afir = { +const AVFilter ff_af_afir = { .name = "afir", .description = NULL_IF_CONFIG_SMALL("Apply Finite Impulse Response filter with supplied coefficients in additional stream(s)."), .priv_size = sizeof(AudioFIRContext), diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c index e669f2de83..e9cc4738fd 100644 --- a/libavfilter/af_aformat.c +++ b/libavfilter/af_aformat.c @@ -157,7 +157,7 @@ static const AVFilterPad avfilter_af_aformat_outputs[] = { { NULL } }; -AVFilter ff_af_aformat = { +const AVFilter ff_af_aformat = { .name = "aformat", .description = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."), .init = init, diff --git a/libavfilter/af_afreqshift.c b/libavfilter/af_afreqshift.c index 6141730e03..85a1e65a96 100644 --- a/libavfilter/af_afreqshift.c +++ b/libavfilter/af_afreqshift.c @@ -390,7 +390,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_afreqshift = { +const AVFilter ff_af_afreqshift = { .name = "afreqshift", .description = NULL_IF_CONFIG_SMALL("Apply frequency shifting to input audio."), .query_formats = query_formats, @@ -412,7 +412,7 @@ static const AVOption aphaseshift_options[] = { AVFILTER_DEFINE_CLASS(aphaseshift); -AVFilter ff_af_aphaseshift = { +const AVFilter ff_af_aphaseshift = { .name = "aphaseshift", .description = NULL_IF_CONFIG_SMALL("Apply phase shifting to input audio."), .query_formats = query_formats, diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c index 5fcf6eceb1..a70af800c8 100644 --- a/libavfilter/af_agate.c +++ b/libavfilter/af_agate.c @@ -260,7 +260,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_agate = { +const AVFilter ff_af_agate = { .name = "agate", .description = NULL_IF_CONFIG_SMALL("Audio gate."), .query_formats = query_formats, @@ -437,7 +437,7 @@ static const AVFilterPad sidechaingate_outputs[] = { { NULL } }; -AVFilter ff_af_sidechaingate = { +const AVFilter ff_af_sidechaingate = { .name = "sidechaingate", .description = NULL_IF_CONFIG_SMALL("Audio sidechain gate."), .priv_size = sizeof(AudioGateContext), diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c index 0f4129cfa0..a95f66d6bc 100644 --- a/libavfilter/af_aiir.c +++ b/libavfilter/af_aiir.c @@ -1577,7 +1577,7 @@ static const AVOption aiir_options[] = { AVFILTER_DEFINE_CLASS(aiir); -AVFilter ff_af_aiir = { +const AVFilter ff_af_aiir = { .name = "aiir", .description = NULL_IF_CONFIG_SMALL("Apply Infinite Impulse Response filter with supplied coefficients."), .priv_size = sizeof(AudioIIRContext), diff --git a/libavfilter/af_alimiter.c b/libavfilter/af_alimiter.c index c41e95576f..6ffb585f29 100644 --- a/libavfilter/af_alimiter.c +++ b/libavfilter/af_alimiter.c @@ -362,7 +362,7 @@ static const AVFilterPad alimiter_outputs[] = { { NULL } }; -AVFilter ff_af_alimiter = { +const AVFilter ff_af_alimiter = { .name = "alimiter", .description = NULL_IF_CONFIG_SMALL("Audio lookahead limiter."), .priv_size = sizeof(AudioLimiterContext), diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index a914fd45ca..2e45b7c277 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -347,7 +347,7 @@ static const AVFilterPad amerge_outputs[] = { { NULL } }; -AVFilter ff_af_amerge = { +const AVFilter ff_af_amerge = { .name = "amerge", .description = NULL_IF_CONFIG_SMALL("Merge two or more audio streams into " "a single multi-channel stream."), diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 45a5dadf0a..2296b49243 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -637,7 +637,7 @@ static const AVFilterPad avfilter_af_amix_outputs[] = { { NULL } }; -AVFilter ff_af_amix = { +const AVFilter ff_af_amix = { .name = "amix", .description = NULL_IF_CONFIG_SMALL("Audio mixing."), .priv_size = sizeof(MixContext), diff --git a/libavfilter/af_amultiply.c b/libavfilter/af_amultiply.c index cc032846fa..1cf67ac186 100644 --- a/libavfilter/af_amultiply.c +++ b/libavfilter/af_amultiply.c @@ -205,7 +205,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_amultiply = { +const AVFilter ff_af_amultiply = { .name = "amultiply", .description = NULL_IF_CONFIG_SMALL("Multiply two audio streams."), .priv_size = sizeof(AudioMultiplyContext), diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c index 80e2c690f4..faa0e2a230 100644 --- a/libavfilter/af_anequalizer.c +++ b/libavfilter/af_anequalizer.c @@ -764,7 +764,7 @@ static const AVFilterPad inputs[] = { { NULL } }; -AVFilter ff_af_anequalizer = { +const AVFilter ff_af_anequalizer = { .name = "anequalizer", .description = NULL_IF_CONFIG_SMALL("Apply high-order audio parametric multi band equalizer."), .priv_size = sizeof(AudioNEqualizerContext), diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c index e2661e102f..8be73079bd 100644 --- a/libavfilter/af_anlmdn.c +++ b/libavfilter/af_anlmdn.c @@ -408,7 +408,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_anlmdn = { +const AVFilter ff_af_anlmdn = { .name = "anlmdn", .description = NULL_IF_CONFIG_SMALL("Reduce broadband noise from stream using Non-Local Means."), .query_formats = query_formats, diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c index 55e6946b68..9564441391 100644 --- a/libavfilter/af_anlms.c +++ b/libavfilter/af_anlms.c @@ -314,7 +314,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_anlms = { +const AVFilter ff_af_anlms = { .name = "anlms", .description = NULL_IF_CONFIG_SMALL("Apply Normalized Least-Mean-Squares algorithm to first audio stream."), .priv_size = sizeof(AudioNLMSContext), diff --git a/libavfilter/af_anull.c b/libavfilter/af_anull.c index 1d0af451dc..74f915778f 100644 --- a/libavfilter/af_anull.c +++ b/libavfilter/af_anull.c @@ -43,7 +43,7 @@ static const AVFilterPad avfilter_af_anull_outputs[] = { { NULL } }; -AVFilter ff_af_anull = { +const AVFilter ff_af_anull = { .name = "anull", .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), .inputs = avfilter_af_anull_inputs, diff --git a/libavfilter/af_apad.c b/libavfilter/af_apad.c index fbcf6d1349..8628c0c2e2 100644 --- a/libavfilter/af_apad.c +++ b/libavfilter/af_apad.c @@ -168,7 +168,7 @@ static const AVFilterPad apad_outputs[] = { { NULL } }; -AVFilter ff_af_apad = { +const AVFilter ff_af_apad = { .name = "apad", .description = NULL_IF_CONFIG_SMALL("Pad audio with silence."), .init = init, diff --git a/libavfilter/af_aphaser.c b/libavfilter/af_aphaser.c index bf46cc8fab..e033a6d904 100644 --- a/libavfilter/af_aphaser.c +++ b/libavfilter/af_aphaser.c @@ -290,7 +290,7 @@ static const AVFilterPad aphaser_outputs[] = { { NULL } }; -AVFilter ff_af_aphaser = { +const AVFilter ff_af_aphaser = { .name = "aphaser", .description = NULL_IF_CONFIG_SMALL("Add a phasing effect to the audio."), .query_formats = query_formats, diff --git a/libavfilter/af_apulsator.c b/libavfilter/af_apulsator.c index 67711a28ce..6be61eb905 100644 --- a/libavfilter/af_apulsator.c +++ b/libavfilter/af_apulsator.c @@ -246,7 +246,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_apulsator = { +const AVFilter ff_af_apulsator = { .name = "apulsator", .description = NULL_IF_CONFIG_SMALL("Audio pulsator."), .priv_size = sizeof(AudioPulsatorContext), diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index f8e03061a5..1127ad2718 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -342,7 +342,7 @@ static const AVFilterPad aresample_outputs[] = { { NULL } }; -AVFilter ff_af_aresample = { +const AVFilter ff_af_aresample = { .name = "aresample", .description = NULL_IF_CONFIG_SMALL("Resample audio data."), .init_dict = init_dict, diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c index 049865b589..0c70a32271 100644 --- a/libavfilter/af_arnndn.c +++ b/libavfilter/af_arnndn.c @@ -1619,7 +1619,7 @@ static const AVOption arnndn_options[] = { AVFILTER_DEFINE_CLASS(arnndn); -AVFilter ff_af_arnndn = { +const AVFilter ff_af_arnndn = { .name = "arnndn", .description = NULL_IF_CONFIG_SMALL("Reduce noise from speech using Recurrent Neural Networks."), .query_formats = query_formats, diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c index bbc391a4ff..e05bb80e7a 100644 --- a/libavfilter/af_asetnsamples.c +++ b/libavfilter/af_asetnsamples.c @@ -118,7 +118,7 @@ static const AVFilterPad asetnsamples_outputs[] = { { NULL } }; -AVFilter ff_af_asetnsamples = { +const AVFilter ff_af_asetnsamples = { .name = "asetnsamples", .description = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."), .priv_size = sizeof(ASNSContext), diff --git a/libavfilter/af_asetrate.c b/libavfilter/af_asetrate.c index 2bb75e4a21..f89185d936 100644 --- a/libavfilter/af_asetrate.c +++ b/libavfilter/af_asetrate.c @@ -106,7 +106,7 @@ static const AVFilterPad asetrate_outputs[] = { { NULL } }; -AVFilter ff_af_asetrate = { +const AVFilter ff_af_asetrate = { .name = "asetrate", .description = NULL_IF_CONFIG_SMALL("Change the sample rate without " "altering the data."), diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c index e817ecea37..652197b2d1 100644 --- a/libavfilter/af_ashowinfo.c +++ b/libavfilter/af_ashowinfo.c @@ -254,7 +254,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_ashowinfo = { +const AVFilter ff_af_ashowinfo = { .name = "ashowinfo", .description = NULL_IF_CONFIG_SMALL("Show textual information for each audio frame."), .priv_size = sizeof(AShowInfoContext), diff --git a/libavfilter/af_asoftclip.c b/libavfilter/af_asoftclip.c index 4900cb6ddf..17361ba3a2 100644 --- a/libavfilter/af_asoftclip.c +++ b/libavfilter/af_asoftclip.c @@ -474,7 +474,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_asoftclip = { +const AVFilter ff_af_asoftclip = { .name = "asoftclip", .description = NULL_IF_CONFIG_SMALL("Audio Soft Clipper."), .query_formats = query_formats, diff --git a/libavfilter/af_asr.c b/libavfilter/af_asr.c index 0c08df1356..ff9eff4e38 100644 --- a/libavfilter/af_asr.c +++ b/libavfilter/af_asr.c @@ -168,7 +168,7 @@ static const AVFilterPad asr_outputs[] = { { NULL } }; -AVFilter ff_af_asr = { +const AVFilter ff_af_asr = { .name = "asr", .description = NULL_IF_CONFIG_SMALL("Automatic Speech Recognition."), .priv_size = sizeof(ASRContext), diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index f50cbe199c..51a01aba2f 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -837,7 +837,7 @@ static const AVFilterPad astats_outputs[] = { { NULL } }; -AVFilter ff_af_astats = { +const AVFilter ff_af_astats = { .name = "astats", .description = NULL_IF_CONFIG_SMALL("Show time domain statistics about audio frames."), .query_formats = query_formats, diff --git a/libavfilter/af_asubboost.c b/libavfilter/af_asubboost.c index 4b30c67461..f36ce81552 100644 --- a/libavfilter/af_asubboost.c +++ b/libavfilter/af_asubboost.c @@ -244,7 +244,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_asubboost = { +const AVFilter ff_af_asubboost = { .name = "asubboost", .description = NULL_IF_CONFIG_SMALL("Boost subwoofer frequencies."), .query_formats = query_formats, diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c index d5c9a75d5d..54921cf4c3 100644 --- a/libavfilter/af_asupercut.c +++ b/libavfilter/af_asupercut.c @@ -368,7 +368,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_asupercut = { +const AVFilter ff_af_asupercut = { .name = "asupercut", .description = NULL_IF_CONFIG_SMALL("Cut super frequencies."), .query_formats = query_formats, @@ -391,7 +391,7 @@ static const AVOption asubcut_options[] = { AVFILTER_DEFINE_CLASS(asubcut); -AVFilter ff_af_asubcut = { +const AVFilter ff_af_asubcut = { .name = "asubcut", .description = NULL_IF_CONFIG_SMALL("Cut subwoofer frequencies."), .query_formats = query_formats, @@ -416,7 +416,7 @@ static const AVOption asuperpass_asuperstop_options[] = { #define asuperpass_options asuperpass_asuperstop_options AVFILTER_DEFINE_CLASS(asuperpass); -AVFilter ff_af_asuperpass = { +const AVFilter ff_af_asuperpass = { .name = "asuperpass", .description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-pass filter."), .query_formats = query_formats, @@ -433,7 +433,7 @@ AVFilter ff_af_asuperpass = { #define asuperstop_options asuperpass_asuperstop_options AVFILTER_DEFINE_CLASS(asuperstop); -AVFilter ff_af_asuperstop = { +const AVFilter ff_af_asuperstop = { .name = "asuperstop", .description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-stop filter."), .query_formats = query_formats, diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index e4fc691abe..80a33c43ed 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -1202,7 +1202,7 @@ static const AVFilterPad atempo_outputs[] = { { NULL } }; -AVFilter ff_af_atempo = { +const AVFilter ff_af_atempo = { .name = "atempo", .description = NULL_IF_CONFIG_SMALL("Adjust audio tempo."), .init = init, diff --git a/libavfilter/af_axcorrelate.c b/libavfilter/af_axcorrelate.c index 6e9a028716..abd722b83e 100644 --- a/libavfilter/af_axcorrelate.c +++ b/libavfilter/af_axcorrelate.c @@ -365,7 +365,7 @@ static const AVOption axcorrelate_options[] = { AVFILTER_DEFINE_CLASS(axcorrelate); -AVFilter ff_af_axcorrelate = { +const AVFilter ff_af_axcorrelate = { .name = "axcorrelate", .description = NULL_IF_CONFIG_SMALL("Cross-correlate two audio streams."), .priv_size = sizeof(AudioXCorrelateContext), diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 4a09f8204a..c477906f87 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -877,7 +877,7 @@ static av_cold int name_##_init(AVFilterContext *ctx) \ return 0; \ } \ \ -AVFilter ff_af_##name_ = { \ +const AVFilter ff_af_##name_ = { \ .name = #name_, \ .description = NULL_IF_CONFIG_SMALL(description_), \ .priv_size = sizeof(BiquadsContext), \ diff --git a/libavfilter/af_bs2b.c b/libavfilter/af_bs2b.c index c01b983cd3..7b9958325f 100644 --- a/libavfilter/af_bs2b.c +++ b/libavfilter/af_bs2b.c @@ -211,7 +211,7 @@ static const AVFilterPad bs2b_outputs[] = { { NULL } }; -AVFilter ff_af_bs2b = { +const AVFilter ff_af_bs2b = { .name = "bs2b", .description = NULL_IF_CONFIG_SMALL("Bauer stereo-to-binaural filter."), .query_formats = query_formats, diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index c4b8dd5470..3cdf8b2bd8 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -398,7 +398,7 @@ static const AVFilterPad avfilter_af_channelmap_outputs[] = { { NULL } }; -AVFilter ff_af_channelmap = { +const AVFilter ff_af_channelmap = { .name = "channelmap", .description = NULL_IF_CONFIG_SMALL("Remap audio channels."), .init = channelmap_init, diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c index ad00fe1ba1..3bd3355d88 100644 --- a/libavfilter/af_channelsplit.c +++ b/libavfilter/af_channelsplit.c @@ -168,7 +168,7 @@ static const AVFilterPad avfilter_af_channelsplit_inputs[] = { { NULL } }; -AVFilter ff_af_channelsplit = { +const AVFilter ff_af_channelsplit = { .name = "channelsplit", .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams."), .priv_size = sizeof(ChannelSplitContext), diff --git a/libavfilter/af_chorus.c b/libavfilter/af_chorus.c index 29c47ab14a..72e684bd3a 100644 --- a/libavfilter/af_chorus.c +++ b/libavfilter/af_chorus.c @@ -369,7 +369,7 @@ static const AVFilterPad chorus_outputs[] = { { NULL } }; -AVFilter ff_af_chorus = { +const AVFilter ff_af_chorus = { .name = "chorus", .description = NULL_IF_CONFIG_SMALL("Add a chorus effect to the audio."), .query_formats = query_formats, diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c index 1e75be4f41..62d9c2e941 100644 --- a/libavfilter/af_compand.c +++ b/libavfilter/af_compand.c @@ -585,7 +585,7 @@ static const AVFilterPad compand_outputs[] = { }; -AVFilter ff_af_compand = { +const AVFilter ff_af_compand = { .name = "compand", .description = NULL_IF_CONFIG_SMALL( "Compress or expand audio dynamic range."), diff --git a/libavfilter/af_compensationdelay.c b/libavfilter/af_compensationdelay.c index 525b3d6f3f..f2e0dcd467 100644 --- a/libavfilter/af_compensationdelay.c +++ b/libavfilter/af_compensationdelay.c @@ -186,7 +186,7 @@ static const AVFilterPad compensationdelay_outputs[] = { { NULL } }; -AVFilter ff_af_compensationdelay = { +const AVFilter ff_af_compensationdelay = { .name = "compensationdelay", .description = NULL_IF_CONFIG_SMALL("Audio Compensation Delay Line."), .query_formats = query_formats, diff --git a/libavfilter/af_crossfeed.c b/libavfilter/af_crossfeed.c index fb0a49ec87..7ad9c4f483 100644 --- a/libavfilter/af_crossfeed.c +++ b/libavfilter/af_crossfeed.c @@ -175,7 +175,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_crossfeed = { +const AVFilter ff_af_crossfeed = { .name = "crossfeed", .description = NULL_IF_CONFIG_SMALL("Apply headphone crossfeed filter."), .query_formats = query_formats, diff --git a/libavfilter/af_crystalizer.c b/libavfilter/af_crystalizer.c index d1f44984ac..f4ad326ede 100644 --- a/libavfilter/af_crystalizer.c +++ b/libavfilter/af_crystalizer.c @@ -456,7 +456,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_crystalizer = { +const AVFilter ff_af_crystalizer = { .name = "crystalizer", .description = NULL_IF_CONFIG_SMALL("Simple audio noise sharpening filter."), .query_formats = query_formats, diff --git a/libavfilter/af_dcshift.c b/libavfilter/af_dcshift.c index e007efe05e..1384ad87bf 100644 --- a/libavfilter/af_dcshift.c +++ b/libavfilter/af_dcshift.c @@ -160,7 +160,7 @@ static const AVFilterPad dcshift_outputs[] = { { NULL } }; -AVFilter ff_af_dcshift = { +const AVFilter ff_af_dcshift = { .name = "dcshift", .description = NULL_IF_CONFIG_SMALL("Apply a DC shift to the audio."), .query_formats = query_formats, diff --git a/libavfilter/af_deesser.c b/libavfilter/af_deesser.c index fad3e98f5c..e05ee9f10b 100644 --- a/libavfilter/af_deesser.c +++ b/libavfilter/af_deesser.c @@ -231,7 +231,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_deesser = { +const AVFilter ff_af_deesser = { .name = "deesser", .description = NULL_IF_CONFIG_SMALL("Apply de-essing to the audio."), .query_formats = query_formats, diff --git a/libavfilter/af_drmeter.c b/libavfilter/af_drmeter.c index ecccb65186..3774259da3 100644 --- a/libavfilter/af_drmeter.c +++ b/libavfilter/af_drmeter.c @@ -221,7 +221,7 @@ static const AVFilterPad drmeter_outputs[] = { { NULL } }; -AVFilter ff_af_drmeter = { +const AVFilter ff_af_drmeter = { .name = "drmeter", .description = NULL_IF_CONFIG_SMALL("Measure audio dynamic range."), .query_formats = query_formats, diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index 81fa62b69d..01c99788af 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -868,7 +868,7 @@ static const AVFilterPad avfilter_af_dynaudnorm_outputs[] = { { NULL } }; -AVFilter ff_af_dynaudnorm = { +const AVFilter ff_af_dynaudnorm = { .name = "dynaudnorm", .description = NULL_IF_CONFIG_SMALL("Dynamic Audio Normalizer."), .query_formats = query_formats, diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c index a4434290a7..a5a7e6a5d2 100644 --- a/libavfilter/af_earwax.c +++ b/libavfilter/af_earwax.c @@ -231,7 +231,7 @@ static const AVFilterPad earwax_outputs[] = { { NULL } }; -AVFilter ff_af_earwax = { +const AVFilter ff_af_earwax = { .name = "earwax", .description = NULL_IF_CONFIG_SMALL("Widen the stereo image."), .query_formats = query_formats, diff --git a/libavfilter/af_extrastereo.c b/libavfilter/af_extrastereo.c index d8e4da9a93..0555aa6610 100644 --- a/libavfilter/af_extrastereo.c +++ b/libavfilter/af_extrastereo.c @@ -120,7 +120,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_extrastereo = { +const AVFilter ff_af_extrastereo = { .name = "extrastereo", .description = NULL_IF_CONFIG_SMALL("Increase difference between stereo audio channels."), .query_formats = query_formats, diff --git a/libavfilter/af_firequalizer.c b/libavfilter/af_firequalizer.c index f4513a1c46..c0b7b1aa4d 100644 --- a/libavfilter/af_firequalizer.c +++ b/libavfilter/af_firequalizer.c @@ -968,7 +968,7 @@ static const AVFilterPad firequalizer_outputs[] = { { NULL } }; -AVFilter ff_af_firequalizer = { +const AVFilter ff_af_firequalizer = { .name = "firequalizer", .description = NULL_IF_CONFIG_SMALL("Finite Impulse Response Equalizer."), .uninit = uninit, diff --git a/libavfilter/af_flanger.c b/libavfilter/af_flanger.c index 33c8245ea5..6984ab12d3 100644 --- a/libavfilter/af_flanger.c +++ b/libavfilter/af_flanger.c @@ -233,7 +233,7 @@ static const AVFilterPad flanger_outputs[] = { { NULL } }; -AVFilter ff_af_flanger = { +const AVFilter ff_af_flanger = { .name = "flanger", .description = NULL_IF_CONFIG_SMALL("Apply a flanging effect to the audio."), .query_formats = query_formats, diff --git a/libavfilter/af_haas.c b/libavfilter/af_haas.c index 0cfc93a7d1..b1a207f808 100644 --- a/libavfilter/af_haas.c +++ b/libavfilter/af_haas.c @@ -216,7 +216,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_haas = { +const AVFilter ff_af_haas = { .name = "haas", .description = NULL_IF_CONFIG_SMALL("Apply Haas Stereo Enhancer."), .query_formats = query_formats, diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c index 978f63599b..badac0cce6 100644 --- a/libavfilter/af_hdcd.c +++ b/libavfilter/af_hdcd.c @@ -1772,7 +1772,7 @@ static const AVFilterPad avfilter_af_hdcd_outputs[] = { { NULL } }; -AVFilter ff_af_hdcd = { +const AVFilter ff_af_hdcd = { .name = "hdcd", .description = NULL_IF_CONFIG_SMALL("Apply High Definition Compatible Digital (HDCD) decoding."), .priv_size = sizeof(HDCDContext), diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index edf8e773d7..ad6195662b 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -744,7 +744,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_headphone = { +const AVFilter ff_af_headphone = { .name = "headphone", .description = NULL_IF_CONFIG_SMALL("Apply headphone binaural spatialization with HRTFs in additional streams."), .priv_size = sizeof(HeadphoneContext), diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 8f5df267de..eb60fe9b29 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -528,7 +528,7 @@ static const AVFilterPad avfilter_af_join_outputs[] = { { NULL } }; -AVFilter ff_af_join = { +const AVFilter ff_af_join = { .name = "join", .description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into " "multi-channel output."), diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c index 31adc9c345..4060251670 100644 --- a/libavfilter/af_ladspa.c +++ b/libavfilter/af_ladspa.c @@ -791,7 +791,7 @@ static const AVFilterPad ladspa_outputs[] = { { NULL } }; -AVFilter ff_af_ladspa = { +const AVFilter ff_af_ladspa = { .name = "ladspa", .description = NULL_IF_CONFIG_SMALL("Apply LADSPA effect."), .priv_size = sizeof(LADSPAContext), diff --git a/libavfilter/af_loudnorm.c b/libavfilter/af_loudnorm.c index 06aca8ef4f..5a3e762b27 100644 --- a/libavfilter/af_loudnorm.c +++ b/libavfilter/af_loudnorm.c @@ -919,7 +919,7 @@ static const AVFilterPad avfilter_af_loudnorm_outputs[] = { { NULL } }; -AVFilter ff_af_loudnorm = { +const AVFilter ff_af_loudnorm = { .name = "loudnorm", .description = NULL_IF_CONFIG_SMALL("EBU R128 loudness normalization"), .priv_size = sizeof(LoudNormContext), diff --git a/libavfilter/af_lv2.c b/libavfilter/af_lv2.c index 3dabe566f5..53a58a46ea 100644 --- a/libavfilter/af_lv2.c +++ b/libavfilter/af_lv2.c @@ -588,7 +588,7 @@ static const AVFilterPad lv2_outputs[] = { { NULL } }; -AVFilter ff_af_lv2 = { +const AVFilter ff_af_lv2 = { .name = "lv2", .description = NULL_IF_CONFIG_SMALL("Apply LV2 effect."), .priv_size = sizeof(LV2Context), diff --git a/libavfilter/af_mcompand.c b/libavfilter/af_mcompand.c index d1a3dc123a..ab1c2bff53 100644 --- a/libavfilter/af_mcompand.c +++ b/libavfilter/af_mcompand.c @@ -666,7 +666,7 @@ static const AVFilterPad mcompand_outputs[] = { }; -AVFilter ff_af_mcompand = { +const AVFilter ff_af_mcompand = { .name = "mcompand", .description = NULL_IF_CONFIG_SMALL( "Multiband Compress or expand audio dynamic range."), diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index b628177071..7ae18e9bfe 100644 --- a/libavfilter/af_pan.c +++ b/libavfilter/af_pan.c @@ -448,7 +448,7 @@ static const AVFilterPad pan_outputs[] = { { NULL } }; -AVFilter ff_af_pan = { +const AVFilter ff_af_pan = { .name = "pan", .description = NULL_IF_CONFIG_SMALL("Remix channels with coefficients (panning)."), .priv_size = sizeof(PanContext), diff --git a/libavfilter/af_replaygain.c b/libavfilter/af_replaygain.c index 53fe49d769..a5f5959eb3 100644 --- a/libavfilter/af_replaygain.c +++ b/libavfilter/af_replaygain.c @@ -604,7 +604,7 @@ static const AVFilterPad replaygain_outputs[] = { { NULL } }; -AVFilter ff_af_replaygain = { +const AVFilter ff_af_replaygain = { .name = "replaygain", .description = NULL_IF_CONFIG_SMALL("ReplayGain scanner."), .query_formats = query_formats, diff --git a/libavfilter/af_rubberband.c b/libavfilter/af_rubberband.c index b42e67f09b..bfacbcd245 100644 --- a/libavfilter/af_rubberband.c +++ b/libavfilter/af_rubberband.c @@ -234,7 +234,7 @@ static const AVFilterPad rubberband_outputs[] = { { NULL } }; -AVFilter ff_af_rubberband = { +const AVFilter ff_af_rubberband = { .name = "rubberband", .description = NULL_IF_CONFIG_SMALL("Apply time-stretching and pitch-shifting."), .query_formats = query_formats, diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c index 80d1d8a10b..d20ab57990 100644 --- a/libavfilter/af_sidechaincompress.c +++ b/libavfilter/af_sidechaincompress.c @@ -387,7 +387,7 @@ static const AVFilterPad sidechaincompress_outputs[] = { { NULL } }; -AVFilter ff_af_sidechaincompress = { +const AVFilter ff_af_sidechaincompress = { .name = "sidechaincompress", .description = NULL_IF_CONFIG_SMALL("Sidechain compressor."), .priv_size = sizeof(SidechainCompressContext), @@ -483,7 +483,7 @@ static const AVFilterPad acompressor_outputs[] = { { NULL } }; -AVFilter ff_af_acompressor = { +const AVFilter ff_af_acompressor = { .name = "acompressor", .description = NULL_IF_CONFIG_SMALL("Audio compressor."), .priv_size = sizeof(SidechainCompressContext), diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c index ff3b219e77..53f54d1834 100644 --- a/libavfilter/af_silencedetect.c +++ b/libavfilter/af_silencedetect.c @@ -258,7 +258,7 @@ static const AVFilterPad silencedetect_outputs[] = { { NULL } }; -AVFilter ff_af_silencedetect = { +const AVFilter ff_af_silencedetect = { .name = "silencedetect", .description = NULL_IF_CONFIG_SMALL("Detect silence."), .priv_size = sizeof(SilenceDetectContext), diff --git a/libavfilter/af_silenceremove.c b/libavfilter/af_silenceremove.c index 7dd8c5a1d8..e4b4cd71d2 100644 --- a/libavfilter/af_silenceremove.c +++ b/libavfilter/af_silenceremove.c @@ -668,7 +668,7 @@ static const AVFilterPad silenceremove_outputs[] = { { NULL } }; -AVFilter ff_af_silenceremove = { +const AVFilter ff_af_silenceremove = { .name = "silenceremove", .description = NULL_IF_CONFIG_SMALL("Remove silence."), .priv_size = sizeof(SilenceRemoveContext), diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c index 8a0397f54e..e62cad2499 100644 --- a/libavfilter/af_sofalizer.c +++ b/libavfilter/af_sofalizer.c @@ -1092,7 +1092,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_sofalizer = { +const AVFilter ff_af_sofalizer = { .name = "sofalizer", .description = NULL_IF_CONFIG_SMALL("SOFAlizer (Spatially Oriented Format for Acoustics)."), .priv_size = sizeof(SOFAlizerContext), diff --git a/libavfilter/af_speechnorm.c b/libavfilter/af_speechnorm.c index eb46cf2985..a2b51a1bd8 100644 --- a/libavfilter/af_speechnorm.c +++ b/libavfilter/af_speechnorm.c @@ -565,7 +565,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_speechnorm = { +const AVFilter ff_af_speechnorm = { .name = "speechnorm", .description = NULL_IF_CONFIG_SMALL("Speech Normalizer."), .query_formats = query_formats, diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c index 2c636a27a5..d60fa55ccd 100644 --- a/libavfilter/af_stereotools.c +++ b/libavfilter/af_stereotools.c @@ -375,7 +375,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_stereotools = { +const AVFilter ff_af_stereotools = { .name = "stereotools", .description = NULL_IF_CONFIG_SMALL("Apply various stereo tools."), .query_formats = query_formats, diff --git a/libavfilter/af_stereowiden.c b/libavfilter/af_stereowiden.c index 251f08438e..1fbb635841 100644 --- a/libavfilter/af_stereowiden.c +++ b/libavfilter/af_stereowiden.c @@ -156,7 +156,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_stereowiden = { +const AVFilter ff_af_stereowiden = { .name = "stereowiden", .description = NULL_IF_CONFIG_SMALL("Apply stereo widening effect."), .query_formats = query_formats, diff --git a/libavfilter/af_superequalizer.c b/libavfilter/af_superequalizer.c index f11ec9e6d1..aa8b6376b0 100644 --- a/libavfilter/af_superequalizer.c +++ b/libavfilter/af_superequalizer.c @@ -374,7 +374,7 @@ static const AVOption superequalizer_options[] = { AVFILTER_DEFINE_CLASS(superequalizer); -AVFilter ff_af_superequalizer = { +const AVFilter ff_af_superequalizer = { .name = "superequalizer", .description = NULL_IF_CONFIG_SMALL("Apply 18 band equalization filter."), .priv_size = sizeof(SuperEqualizerContext), diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c index d18b3146e7..3fb7a1bbba 100644 --- a/libavfilter/af_surround.c +++ b/libavfilter/af_surround.c @@ -1785,7 +1785,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_af_surround = { +const AVFilter ff_af_surround = { .name = "surround", .description = NULL_IF_CONFIG_SMALL("Apply audio surround upmix filter."), .query_formats = query_formats, diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c index 6baeb7f110..8f9e310040 100644 --- a/libavfilter/af_tremolo.c +++ b/libavfilter/af_tremolo.c @@ -160,7 +160,7 @@ static const AVFilterPad avfilter_af_tremolo_outputs[] = { { NULL } }; -AVFilter ff_af_tremolo = { +const AVFilter ff_af_tremolo = { .name = "tremolo", .description = NULL_IF_CONFIG_SMALL("Apply tremolo effect."), .priv_size = sizeof(TremoloContext), diff --git a/libavfilter/af_vibrato.c b/libavfilter/af_vibrato.c index 5db1f0f6c9..fe4d194531 100644 --- a/libavfilter/af_vibrato.c +++ b/libavfilter/af_vibrato.c @@ -198,7 +198,7 @@ static const AVFilterPad avfilter_af_vibrato_outputs[] = { { NULL } }; -AVFilter ff_af_vibrato = { +const AVFilter ff_af_vibrato = { .name = "vibrato", .description = NULL_IF_CONFIG_SMALL("Apply vibrato effect."), .priv_size = sizeof(VibratoContext), diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 5fc00d82a4..844ddbeff7 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -477,7 +477,7 @@ static const AVFilterPad avfilter_af_volume_outputs[] = { { NULL } }; -AVFilter ff_af_volume = { +const AVFilter ff_af_volume = { .name = "volume", .description = NULL_IF_CONFIG_SMALL("Change input volume."), .query_formats = query_formats, diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index 43c1ebf02c..61af21797c 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -155,7 +155,7 @@ static const AVFilterPad volumedetect_outputs[] = { { NULL } }; -AVFilter ff_af_volumedetect = { +const AVFilter ff_af_volumedetect = { .name = "volumedetect", .description = NULL_IF_CONFIG_SMALL("Detect audio volume."), .priv_size = sizeof(VolDetectContext), diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 19c2acb63c..931d7dbb0d 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -23,510 +23,510 @@ #include "avfilter.h" #include "config.h" -extern AVFilter ff_af_abench; -extern AVFilter ff_af_acompressor; -extern AVFilter ff_af_acontrast; -extern AVFilter ff_af_acopy; -extern AVFilter ff_af_acue; -extern AVFilter ff_af_acrossfade; -extern AVFilter ff_af_acrossover; -extern AVFilter ff_af_acrusher; -extern AVFilter ff_af_adeclick; -extern AVFilter ff_af_adeclip; -extern AVFilter ff_af_adelay; -extern AVFilter ff_af_adenorm; -extern AVFilter ff_af_aderivative; -extern AVFilter ff_af_aecho; -extern AVFilter ff_af_aemphasis; -extern AVFilter ff_af_aeval; -extern AVFilter ff_af_aexciter; -extern AVFilter ff_af_afade; -extern AVFilter ff_af_afftdn; -extern AVFilter ff_af_afftfilt; -extern AVFilter ff_af_afir; -extern AVFilter ff_af_aformat; -extern AVFilter ff_af_afreqshift; -extern AVFilter ff_af_agate; -extern AVFilter ff_af_aiir; -extern AVFilter ff_af_aintegral; -extern AVFilter ff_af_ainterleave; -extern AVFilter ff_af_alimiter; -extern AVFilter ff_af_allpass; -extern AVFilter ff_af_aloop; -extern AVFilter ff_af_amerge; -extern AVFilter ff_af_ametadata; -extern AVFilter ff_af_amix; -extern AVFilter ff_af_amultiply; -extern AVFilter ff_af_anequalizer; -extern AVFilter ff_af_anlmdn; -extern AVFilter ff_af_anlms; -extern AVFilter ff_af_anull; -extern AVFilter ff_af_apad; -extern AVFilter ff_af_aperms; -extern AVFilter ff_af_aphaser; -extern AVFilter ff_af_aphaseshift; -extern AVFilter ff_af_apulsator; -extern AVFilter ff_af_arealtime; -extern AVFilter ff_af_aresample; -extern AVFilter ff_af_areverse; -extern AVFilter ff_af_arnndn; -extern AVFilter ff_af_aselect; -extern AVFilter ff_af_asendcmd; -extern AVFilter ff_af_asetnsamples; -extern AVFilter ff_af_asetpts; -extern AVFilter ff_af_asetrate; -extern AVFilter ff_af_asettb; -extern AVFilter ff_af_ashowinfo; -extern AVFilter ff_af_asidedata; -extern AVFilter ff_af_asoftclip; -extern AVFilter ff_af_asplit; -extern AVFilter ff_af_asr; -extern AVFilter ff_af_astats; -extern AVFilter ff_af_astreamselect; -extern AVFilter ff_af_asubboost; -extern AVFilter ff_af_asubcut; -extern AVFilter ff_af_asupercut; -extern AVFilter ff_af_asuperpass; -extern AVFilter ff_af_asuperstop; -extern AVFilter ff_af_atempo; -extern AVFilter ff_af_atrim; -extern AVFilter ff_af_axcorrelate; -extern AVFilter ff_af_azmq; -extern AVFilter ff_af_bandpass; -extern AVFilter ff_af_bandreject; -extern AVFilter ff_af_bass; -extern AVFilter ff_af_biquad; -extern AVFilter ff_af_bs2b; -extern AVFilter ff_vf_chromaber_vulkan; -extern AVFilter ff_af_channelmap; -extern AVFilter ff_af_channelsplit; -extern AVFilter ff_af_chorus; -extern AVFilter ff_af_compand; -extern AVFilter ff_af_compensationdelay; -extern AVFilter ff_af_crossfeed; -extern AVFilter ff_af_crystalizer; -extern AVFilter ff_af_dcshift; -extern AVFilter ff_af_deesser; -extern AVFilter ff_af_drmeter; -extern AVFilter ff_af_dynaudnorm; -extern AVFilter ff_af_earwax; -extern AVFilter ff_af_ebur128; -extern AVFilter ff_af_equalizer; -extern AVFilter ff_af_extrastereo; -extern AVFilter ff_af_firequalizer; -extern AVFilter ff_af_flanger; -extern AVFilter ff_af_haas; -extern AVFilter ff_af_hdcd; -extern AVFilter ff_af_headphone; -extern AVFilter ff_af_highpass; -extern AVFilter ff_af_highshelf; -extern AVFilter ff_af_join; -extern AVFilter ff_af_ladspa; -extern AVFilter ff_af_loudnorm; -extern AVFilter ff_af_lowpass; -extern AVFilter ff_af_lowshelf; -extern AVFilter ff_af_lv2; -extern AVFilter ff_af_mcompand; -extern AVFilter ff_af_pan; -extern AVFilter ff_af_replaygain; -extern AVFilter ff_af_rubberband; -extern AVFilter ff_af_sidechaincompress; -extern AVFilter ff_af_sidechaingate; -extern AVFilter ff_af_silencedetect; -extern AVFilter ff_af_silenceremove; -extern AVFilter ff_af_sofalizer; -extern AVFilter ff_af_speechnorm; -extern AVFilter ff_af_stereotools; -extern AVFilter ff_af_stereowiden; -extern AVFilter ff_af_superequalizer; -extern AVFilter ff_af_surround; -extern AVFilter ff_af_treble; -extern AVFilter ff_af_tremolo; -extern AVFilter ff_af_vibrato; -extern AVFilter ff_af_volume; -extern AVFilter ff_af_volumedetect; +extern const AVFilter ff_af_abench; +extern const AVFilter ff_af_acompressor; +extern const AVFilter ff_af_acontrast; +extern const AVFilter ff_af_acopy; +extern const AVFilter ff_af_acue; +extern const AVFilter ff_af_acrossfade; +extern const AVFilter ff_af_acrossover; +extern const AVFilter ff_af_acrusher; +extern const AVFilter ff_af_adeclick; +extern const AVFilter ff_af_adeclip; +extern const AVFilter ff_af_adelay; +extern const AVFilter ff_af_adenorm; +extern const AVFilter ff_af_aderivative; +extern const AVFilter ff_af_aecho; +extern const AVFilter ff_af_aemphasis; +extern const AVFilter ff_af_aeval; +extern const AVFilter ff_af_aexciter; +extern const AVFilter ff_af_afade; +extern const AVFilter ff_af_afftdn; +extern const AVFilter ff_af_afftfilt; +extern const AVFilter ff_af_afir; +extern const AVFilter ff_af_aformat; +extern const AVFilter ff_af_afreqshift; +extern const AVFilter ff_af_agate; +extern const AVFilter ff_af_aiir; +extern const AVFilter ff_af_aintegral; +extern const AVFilter ff_af_ainterleave; +extern const AVFilter ff_af_alimiter; +extern const AVFilter ff_af_allpass; +extern const AVFilter ff_af_aloop; +extern const AVFilter ff_af_amerge; +extern const AVFilter ff_af_ametadata; +extern const AVFilter ff_af_amix; +extern const AVFilter ff_af_amultiply; +extern const AVFilter ff_af_anequalizer; +extern const AVFilter ff_af_anlmdn; +extern const AVFilter ff_af_anlms; +extern const AVFilter ff_af_anull; +extern const AVFilter ff_af_apad; +extern const AVFilter ff_af_aperms; +extern const AVFilter ff_af_aphaser; +extern const AVFilter ff_af_aphaseshift; +extern const AVFilter ff_af_apulsator; +extern const AVFilter ff_af_arealtime; +extern const AVFilter ff_af_aresample; +extern const AVFilter ff_af_areverse; +extern const AVFilter ff_af_arnndn; +extern const AVFilter ff_af_aselect; +extern const AVFilter ff_af_asendcmd; +extern const AVFilter ff_af_asetnsamples; +extern const AVFilter ff_af_asetpts; +extern const AVFilter ff_af_asetrate; +extern const AVFilter ff_af_asettb; +extern const AVFilter ff_af_ashowinfo; +extern const AVFilter ff_af_asidedata; +extern const AVFilter ff_af_asoftclip; +extern const AVFilter ff_af_asplit; +extern const AVFilter ff_af_asr; +extern const AVFilter ff_af_astats; +extern const AVFilter ff_af_astreamselect; +extern const AVFilter ff_af_asubboost; +extern const AVFilter ff_af_asubcut; +extern const AVFilter ff_af_asupercut; +extern const AVFilter ff_af_asuperpass; +extern const AVFilter ff_af_asuperstop; +extern const AVFilter ff_af_atempo; +extern const AVFilter ff_af_atrim; +extern const AVFilter ff_af_axcorrelate; +extern const AVFilter ff_af_azmq; +extern const AVFilter ff_af_bandpass; +extern const AVFilter ff_af_bandreject; +extern const AVFilter ff_af_bass; +extern const AVFilter ff_af_biquad; +extern const AVFilter ff_af_bs2b; +extern const AVFilter ff_vf_chromaber_vulkan; +extern const AVFilter ff_af_channelmap; +extern const AVFilter ff_af_channelsplit; +extern const AVFilter ff_af_chorus; +extern const AVFilter ff_af_compand; +extern const AVFilter ff_af_compensationdelay; +extern const AVFilter ff_af_crossfeed; +extern const AVFilter ff_af_crystalizer; +extern const AVFilter ff_af_dcshift; +extern const AVFilter ff_af_deesser; +extern const AVFilter ff_af_drmeter; +extern const AVFilter ff_af_dynaudnorm; +extern const AVFilter ff_af_earwax; +extern const AVFilter ff_af_ebur128; +extern const AVFilter ff_af_equalizer; +extern const AVFilter ff_af_extrastereo; +extern const AVFilter ff_af_firequalizer; +extern const AVFilter ff_af_flanger; +extern const AVFilter ff_af_haas; +extern const AVFilter ff_af_hdcd; +extern const AVFilter ff_af_headphone; +extern const AVFilter ff_af_highpass; +extern const AVFilter ff_af_highshelf; +extern const AVFilter ff_af_join; +extern const AVFilter ff_af_ladspa; +extern const AVFilter ff_af_loudnorm; +extern const AVFilter ff_af_lowpass; +extern const AVFilter ff_af_lowshelf; +extern const AVFilter ff_af_lv2; +extern const AVFilter ff_af_mcompand; +extern const AVFilter ff_af_pan; +extern const AVFilter ff_af_replaygain; +extern const AVFilter ff_af_rubberband; +extern const AVFilter ff_af_sidechaincompress; +extern const AVFilter ff_af_sidechaingate; +extern const AVFilter ff_af_silencedetect; +extern const AVFilter ff_af_silenceremove; +extern const AVFilter ff_af_sofalizer; +extern const AVFilter ff_af_speechnorm; +extern const AVFilter ff_af_stereotools; +extern const AVFilter ff_af_stereowiden; +extern const AVFilter ff_af_superequalizer; +extern const AVFilter ff_af_surround; +extern const AVFilter ff_af_treble; +extern const AVFilter ff_af_tremolo; +extern const AVFilter ff_af_vibrato; +extern const AVFilter ff_af_volume; +extern const AVFilter ff_af_volumedetect; -extern AVFilter ff_asrc_aevalsrc; -extern AVFilter ff_asrc_afirsrc; -extern AVFilter ff_asrc_anoisesrc; -extern AVFilter ff_asrc_anullsrc; -extern AVFilter ff_asrc_flite; -extern AVFilter ff_asrc_hilbert; -extern AVFilter ff_asrc_sinc; -extern AVFilter ff_asrc_sine; +extern const AVFilter ff_asrc_aevalsrc; +extern const AVFilter ff_asrc_afirsrc; +extern const AVFilter ff_asrc_anoisesrc; +extern const AVFilter ff_asrc_anullsrc; +extern const AVFilter ff_asrc_flite; +extern const AVFilter ff_asrc_hilbert; +extern const AVFilter ff_asrc_sinc; +extern const AVFilter ff_asrc_sine; -extern AVFilter ff_asink_anullsink; +extern const AVFilter ff_asink_anullsink; -extern AVFilter ff_vf_addroi; -extern AVFilter ff_vf_alphaextract; -extern AVFilter ff_vf_alphamerge; -extern AVFilter ff_vf_amplify; -extern AVFilter ff_vf_ass; -extern AVFilter ff_vf_atadenoise; -extern AVFilter ff_vf_avgblur; -extern AVFilter ff_vf_avgblur_opencl; -extern AVFilter ff_vf_avgblur_vulkan; -extern AVFilter ff_vf_bbox; -extern AVFilter ff_vf_bench; -extern AVFilter ff_vf_bilateral; -extern AVFilter ff_vf_bitplanenoise; -extern AVFilter ff_vf_blackdetect; -extern AVFilter ff_vf_blackframe; -extern AVFilter ff_vf_blend; -extern AVFilter ff_vf_bm3d; -extern AVFilter ff_vf_boxblur; -extern AVFilter ff_vf_boxblur_opencl; -extern AVFilter ff_vf_bwdif; -extern AVFilter ff_vf_cas; -extern AVFilter ff_vf_chromahold; -extern AVFilter ff_vf_chromakey; -extern AVFilter ff_vf_chromanr; -extern AVFilter ff_vf_chromashift; -extern AVFilter ff_vf_ciescope; -extern AVFilter ff_vf_codecview; -extern AVFilter ff_vf_colorbalance; -extern AVFilter ff_vf_colorchannelmixer; -extern AVFilter ff_vf_colorcontrast; -extern AVFilter ff_vf_colorcorrect; -extern AVFilter ff_vf_colorize; -extern AVFilter ff_vf_colorkey; -extern AVFilter ff_vf_colorkey_opencl; -extern AVFilter ff_vf_colorhold; -extern AVFilter ff_vf_colorlevels; -extern AVFilter ff_vf_colormatrix; -extern AVFilter ff_vf_colorspace; -extern AVFilter ff_vf_colortemperature; -extern AVFilter ff_vf_convolution; -extern AVFilter ff_vf_convolution_opencl; -extern AVFilter ff_vf_convolve; -extern AVFilter ff_vf_copy; -extern AVFilter ff_vf_coreimage; -extern AVFilter ff_vf_cover_rect; -extern AVFilter ff_vf_crop; -extern AVFilter ff_vf_cropdetect; -extern AVFilter ff_vf_cue; -extern AVFilter ff_vf_curves; -extern AVFilter ff_vf_datascope; -extern AVFilter ff_vf_dblur; -extern AVFilter ff_vf_dctdnoiz; -extern AVFilter ff_vf_deband; -extern AVFilter ff_vf_deblock; -extern AVFilter ff_vf_decimate; -extern AVFilter ff_vf_deconvolve; -extern AVFilter ff_vf_dedot; -extern AVFilter ff_vf_deflate; -extern AVFilter ff_vf_deflicker; -extern AVFilter ff_vf_deinterlace_qsv; -extern AVFilter ff_vf_deinterlace_vaapi; -extern AVFilter ff_vf_dejudder; -extern AVFilter ff_vf_delogo; -extern AVFilter ff_vf_denoise_vaapi; -extern AVFilter ff_vf_derain; -extern AVFilter ff_vf_deshake; -extern AVFilter ff_vf_deshake_opencl; -extern AVFilter ff_vf_despill; -extern AVFilter ff_vf_detelecine; -extern AVFilter ff_vf_dilation; -extern AVFilter ff_vf_dilation_opencl; -extern AVFilter ff_vf_displace; -extern AVFilter ff_vf_dnn_detect; -extern AVFilter ff_vf_dnn_processing; -extern AVFilter ff_vf_doubleweave; -extern AVFilter ff_vf_drawbox; -extern AVFilter ff_vf_drawgraph; -extern AVFilter ff_vf_drawgrid; -extern AVFilter ff_vf_drawtext; -extern AVFilter ff_vf_edgedetect; -extern AVFilter ff_vf_elbg; -extern AVFilter ff_vf_entropy; -extern AVFilter ff_vf_epx; -extern AVFilter ff_vf_eq; -extern AVFilter ff_vf_erosion; -extern AVFilter ff_vf_erosion_opencl; -extern AVFilter ff_vf_estdif; -extern AVFilter ff_vf_exposure; -extern AVFilter ff_vf_extractplanes; -extern AVFilter ff_vf_fade; -extern AVFilter ff_vf_fftdnoiz; -extern AVFilter ff_vf_fftfilt; -extern AVFilter ff_vf_field; -extern AVFilter ff_vf_fieldhint; -extern AVFilter ff_vf_fieldmatch; -extern AVFilter ff_vf_fieldorder; -extern AVFilter ff_vf_fillborders; -extern AVFilter ff_vf_find_rect; -extern AVFilter ff_vf_floodfill; -extern AVFilter ff_vf_format; -extern AVFilter ff_vf_fps; -extern AVFilter ff_vf_framepack; -extern AVFilter ff_vf_framerate; -extern AVFilter ff_vf_framestep; -extern AVFilter ff_vf_freezedetect; -extern AVFilter ff_vf_freezeframes; -extern AVFilter ff_vf_frei0r; -extern AVFilter ff_vf_fspp; -extern AVFilter ff_vf_gblur; -extern AVFilter ff_vf_geq; -extern AVFilter ff_vf_gradfun; -extern AVFilter ff_vf_graphmonitor; -extern AVFilter ff_vf_greyedge; -extern AVFilter ff_vf_haldclut; -extern AVFilter ff_vf_hflip; -extern AVFilter ff_vf_histeq; -extern AVFilter ff_vf_histogram; -extern AVFilter ff_vf_hqdn3d; -extern AVFilter ff_vf_hqx; -extern AVFilter ff_vf_hstack; -extern AVFilter ff_vf_hue; -extern AVFilter ff_vf_hwdownload; -extern AVFilter ff_vf_hwmap; -extern AVFilter ff_vf_hwupload; -extern AVFilter ff_vf_hwupload_cuda; -extern AVFilter ff_vf_hysteresis; -extern AVFilter ff_vf_identity; -extern AVFilter ff_vf_idet; -extern AVFilter ff_vf_il; -extern AVFilter ff_vf_inflate; -extern AVFilter ff_vf_interlace; -extern AVFilter ff_vf_interleave; -extern AVFilter ff_vf_kerndeint; -extern AVFilter ff_vf_kirsch; -extern AVFilter ff_vf_lagfun; -extern AVFilter ff_vf_lenscorrection; -extern AVFilter ff_vf_lensfun; -extern AVFilter ff_vf_libvmaf; -extern AVFilter ff_vf_limiter; -extern AVFilter ff_vf_loop; -extern AVFilter ff_vf_lumakey; -extern AVFilter ff_vf_lut; -extern AVFilter ff_vf_lut1d; -extern AVFilter ff_vf_lut2; -extern AVFilter ff_vf_lut3d; -extern AVFilter ff_vf_lutrgb; -extern AVFilter ff_vf_lutyuv; -extern AVFilter ff_vf_maskedclamp; -extern AVFilter ff_vf_maskedmax; -extern AVFilter ff_vf_maskedmerge; -extern AVFilter ff_vf_maskedmin; -extern AVFilter ff_vf_maskedthreshold; -extern AVFilter ff_vf_maskfun; -extern AVFilter ff_vf_mcdeint; -extern AVFilter ff_vf_median; -extern AVFilter ff_vf_mergeplanes; -extern AVFilter ff_vf_mestimate; -extern AVFilter ff_vf_metadata; -extern AVFilter ff_vf_midequalizer; -extern AVFilter ff_vf_minterpolate; -extern AVFilter ff_vf_mix; -extern AVFilter ff_vf_monochrome; -extern AVFilter ff_vf_mpdecimate; -extern AVFilter ff_vf_msad; -extern AVFilter ff_vf_negate; -extern AVFilter ff_vf_nlmeans; -extern AVFilter ff_vf_nlmeans_opencl; -extern AVFilter ff_vf_nnedi; -extern AVFilter ff_vf_noformat; -extern AVFilter ff_vf_noise; -extern AVFilter ff_vf_normalize; -extern AVFilter ff_vf_null; -extern AVFilter ff_vf_ocr; -extern AVFilter ff_vf_ocv; -extern AVFilter ff_vf_oscilloscope; -extern AVFilter ff_vf_overlay; -extern AVFilter ff_vf_overlay_opencl; -extern AVFilter ff_vf_overlay_qsv; -extern AVFilter ff_vf_overlay_vulkan; -extern AVFilter ff_vf_overlay_cuda; -extern AVFilter ff_vf_owdenoise; -extern AVFilter ff_vf_pad; -extern AVFilter ff_vf_pad_opencl; -extern AVFilter ff_vf_palettegen; -extern AVFilter ff_vf_paletteuse; -extern AVFilter ff_vf_perms; -extern AVFilter ff_vf_perspective; -extern AVFilter ff_vf_phase; -extern AVFilter ff_vf_photosensitivity; -extern AVFilter ff_vf_pixdesctest; -extern AVFilter ff_vf_pixscope; -extern AVFilter ff_vf_pp; -extern AVFilter ff_vf_pp7; -extern AVFilter ff_vf_premultiply; -extern AVFilter ff_vf_prewitt; -extern AVFilter ff_vf_prewitt_opencl; -extern AVFilter ff_vf_procamp_vaapi; -extern AVFilter ff_vf_program_opencl; -extern AVFilter ff_vf_pseudocolor; -extern AVFilter ff_vf_psnr; -extern AVFilter ff_vf_pullup; -extern AVFilter ff_vf_qp; -extern AVFilter ff_vf_random; -extern AVFilter ff_vf_readeia608; -extern AVFilter ff_vf_readvitc; -extern AVFilter ff_vf_realtime; -extern AVFilter ff_vf_remap; -extern AVFilter ff_vf_removegrain; -extern AVFilter ff_vf_removelogo; -extern AVFilter ff_vf_repeatfields; -extern AVFilter ff_vf_reverse; -extern AVFilter ff_vf_rgbashift; -extern AVFilter ff_vf_roberts; -extern AVFilter ff_vf_roberts_opencl; -extern AVFilter ff_vf_rotate; -extern AVFilter ff_vf_sab; -extern AVFilter ff_vf_scale; -extern AVFilter ff_vf_scale_cuda; -extern AVFilter ff_vf_scale_npp; -extern AVFilter ff_vf_scale_qsv; -extern AVFilter ff_vf_scale_vaapi; -extern AVFilter ff_vf_scale_vulkan; -extern AVFilter ff_vf_scale2ref; -extern AVFilter ff_vf_scdet; -extern AVFilter ff_vf_scroll; -extern AVFilter ff_vf_select; -extern AVFilter ff_vf_selectivecolor; -extern AVFilter ff_vf_sendcmd; -extern AVFilter ff_vf_separatefields; -extern AVFilter ff_vf_setdar; -extern AVFilter ff_vf_setfield; -extern AVFilter ff_vf_setparams; -extern AVFilter ff_vf_setpts; -extern AVFilter ff_vf_setrange; -extern AVFilter ff_vf_setsar; -extern AVFilter ff_vf_settb; -extern AVFilter ff_vf_sharpness_vaapi; -extern AVFilter ff_vf_shear; -extern AVFilter ff_vf_showinfo; -extern AVFilter ff_vf_showpalette; -extern AVFilter ff_vf_shuffleframes; -extern AVFilter ff_vf_shufflepixels; -extern AVFilter ff_vf_shuffleplanes; -extern AVFilter ff_vf_sidedata; -extern AVFilter ff_vf_signalstats; -extern AVFilter ff_vf_signature; -extern AVFilter ff_vf_smartblur; -extern AVFilter ff_vf_sobel; -extern AVFilter ff_vf_sobel_opencl; -extern AVFilter ff_vf_split; -extern AVFilter ff_vf_spp; -extern AVFilter ff_vf_sr; -extern AVFilter ff_vf_ssim; -extern AVFilter ff_vf_stereo3d; -extern AVFilter ff_vf_streamselect; -extern AVFilter ff_vf_subtitles; -extern AVFilter ff_vf_super2xsai; -extern AVFilter ff_vf_swaprect; -extern AVFilter ff_vf_swapuv; -extern AVFilter ff_vf_tblend; -extern AVFilter ff_vf_telecine; -extern AVFilter ff_vf_thistogram; -extern AVFilter ff_vf_threshold; -extern AVFilter ff_vf_thumbnail; -extern AVFilter ff_vf_thumbnail_cuda; -extern AVFilter ff_vf_tile; -extern AVFilter ff_vf_tinterlace; -extern AVFilter ff_vf_tlut2; -extern AVFilter ff_vf_tmedian; -extern AVFilter ff_vf_tmidequalizer; -extern AVFilter ff_vf_tmix; -extern AVFilter ff_vf_tonemap; -extern AVFilter ff_vf_tonemap_opencl; -extern AVFilter ff_vf_tonemap_vaapi; -extern AVFilter ff_vf_tpad; -extern AVFilter ff_vf_transpose; -extern AVFilter ff_vf_transpose_npp; -extern AVFilter ff_vf_transpose_opencl; -extern AVFilter ff_vf_transpose_vaapi; -extern AVFilter ff_vf_trim; -extern AVFilter ff_vf_unpremultiply; -extern AVFilter ff_vf_unsharp; -extern AVFilter ff_vf_unsharp_opencl; -extern AVFilter ff_vf_untile; -extern AVFilter ff_vf_uspp; -extern AVFilter ff_vf_v360; -extern AVFilter ff_vf_vaguedenoiser; -extern AVFilter ff_vf_vectorscope; -extern AVFilter ff_vf_vflip; -extern AVFilter ff_vf_vfrdet; -extern AVFilter ff_vf_vibrance; -extern AVFilter ff_vf_vidstabdetect; -extern AVFilter ff_vf_vidstabtransform; -extern AVFilter ff_vf_vif; -extern AVFilter ff_vf_vignette; -extern AVFilter ff_vf_vmafmotion; -extern AVFilter ff_vf_vpp_qsv; -extern AVFilter ff_vf_vstack; -extern AVFilter ff_vf_w3fdif; -extern AVFilter ff_vf_waveform; -extern AVFilter ff_vf_weave; -extern AVFilter ff_vf_xbr; -extern AVFilter ff_vf_xfade; -extern AVFilter ff_vf_xfade_opencl; -extern AVFilter ff_vf_xmedian; -extern AVFilter ff_vf_xstack; -extern AVFilter ff_vf_yadif; -extern AVFilter ff_vf_yadif_cuda; -extern AVFilter ff_vf_yaepblur; -extern AVFilter ff_vf_zmq; -extern AVFilter ff_vf_zoompan; -extern AVFilter ff_vf_zscale; +extern const AVFilter ff_vf_addroi; +extern const AVFilter ff_vf_alphaextract; +extern const AVFilter ff_vf_alphamerge; +extern const AVFilter ff_vf_amplify; +extern const AVFilter ff_vf_ass; +extern const AVFilter ff_vf_atadenoise; +extern const AVFilter ff_vf_avgblur; +extern const AVFilter ff_vf_avgblur_opencl; +extern const AVFilter ff_vf_avgblur_vulkan; +extern const AVFilter ff_vf_bbox; +extern const AVFilter ff_vf_bench; +extern const AVFilter ff_vf_bilateral; +extern const AVFilter ff_vf_bitplanenoise; +extern const AVFilter ff_vf_blackdetect; +extern const AVFilter ff_vf_blackframe; +extern const AVFilter ff_vf_blend; +extern const AVFilter ff_vf_bm3d; +extern const AVFilter ff_vf_boxblur; +extern const AVFilter ff_vf_boxblur_opencl; +extern const AVFilter ff_vf_bwdif; +extern const AVFilter ff_vf_cas; +extern const AVFilter ff_vf_chromahold; +extern const AVFilter ff_vf_chromakey; +extern const AVFilter ff_vf_chromanr; +extern const AVFilter ff_vf_chromashift; +extern const AVFilter ff_vf_ciescope; +extern const AVFilter ff_vf_codecview; +extern const AVFilter ff_vf_colorbalance; +extern const AVFilter ff_vf_colorchannelmixer; +extern const AVFilter ff_vf_colorcontrast; +extern const AVFilter ff_vf_colorcorrect; +extern const AVFilter ff_vf_colorize; +extern const AVFilter ff_vf_colorkey; +extern const AVFilter ff_vf_colorkey_opencl; +extern const AVFilter ff_vf_colorhold; +extern const AVFilter ff_vf_colorlevels; +extern const AVFilter ff_vf_colormatrix; +extern const AVFilter ff_vf_colorspace; +extern const AVFilter ff_vf_colortemperature; +extern const AVFilter ff_vf_convolution; +extern const AVFilter ff_vf_convolution_opencl; +extern const AVFilter ff_vf_convolve; +extern const AVFilter ff_vf_copy; +extern const AVFilter ff_vf_coreimage; +extern const AVFilter ff_vf_cover_rect; +extern const AVFilter ff_vf_crop; +extern const AVFilter ff_vf_cropdetect; +extern const AVFilter ff_vf_cue; +extern const AVFilter ff_vf_curves; +extern const AVFilter ff_vf_datascope; +extern const AVFilter ff_vf_dblur; +extern const AVFilter ff_vf_dctdnoiz; +extern const AVFilter ff_vf_deband; +extern const AVFilter ff_vf_deblock; +extern const AVFilter ff_vf_decimate; +extern const AVFilter ff_vf_deconvolve; +extern const AVFilter ff_vf_dedot; +extern const AVFilter ff_vf_deflate; +extern const AVFilter ff_vf_deflicker; +extern const AVFilter ff_vf_deinterlace_qsv; +extern const AVFilter ff_vf_deinterlace_vaapi; +extern const AVFilter ff_vf_dejudder; +extern const AVFilter ff_vf_delogo; +extern const AVFilter ff_vf_denoise_vaapi; +extern const AVFilter ff_vf_derain; +extern const AVFilter ff_vf_deshake; +extern const AVFilter ff_vf_deshake_opencl; +extern const AVFilter ff_vf_despill; +extern const AVFilter ff_vf_detelecine; +extern const AVFilter ff_vf_dilation; +extern const AVFilter ff_vf_dilation_opencl; +extern const AVFilter ff_vf_displace; +extern const AVFilter ff_vf_dnn_detect; +extern const AVFilter ff_vf_dnn_processing; +extern const AVFilter ff_vf_doubleweave; +extern const AVFilter ff_vf_drawbox; +extern const AVFilter ff_vf_drawgraph; +extern const AVFilter ff_vf_drawgrid; +extern const AVFilter ff_vf_drawtext; +extern const AVFilter ff_vf_edgedetect; +extern const AVFilter ff_vf_elbg; +extern const AVFilter ff_vf_entropy; +extern const AVFilter ff_vf_epx; +extern const AVFilter ff_vf_eq; +extern const AVFilter ff_vf_erosion; +extern const AVFilter ff_vf_erosion_opencl; +extern const AVFilter ff_vf_estdif; +extern const AVFilter ff_vf_exposure; +extern const AVFilter ff_vf_extractplanes; +extern const AVFilter ff_vf_fade; +extern const AVFilter ff_vf_fftdnoiz; +extern const AVFilter ff_vf_fftfilt; +extern const AVFilter ff_vf_field; +extern const AVFilter ff_vf_fieldhint; +extern const AVFilter ff_vf_fieldmatch; +extern const AVFilter ff_vf_fieldorder; +extern const AVFilter ff_vf_fillborders; +extern const AVFilter ff_vf_find_rect; +extern const AVFilter ff_vf_floodfill; +extern const AVFilter ff_vf_format; +extern const AVFilter ff_vf_fps; +extern const AVFilter ff_vf_framepack; +extern const AVFilter ff_vf_framerate; +extern const AVFilter ff_vf_framestep; +extern const AVFilter ff_vf_freezedetect; +extern const AVFilter ff_vf_freezeframes; +extern const AVFilter ff_vf_frei0r; +extern const AVFilter ff_vf_fspp; +extern const AVFilter ff_vf_gblur; +extern const AVFilter ff_vf_geq; +extern const AVFilter ff_vf_gradfun; +extern const AVFilter ff_vf_graphmonitor; +extern const AVFilter ff_vf_greyedge; +extern const AVFilter ff_vf_haldclut; +extern const AVFilter ff_vf_hflip; +extern const AVFilter ff_vf_histeq; +extern const AVFilter ff_vf_histogram; +extern const AVFilter ff_vf_hqdn3d; +extern const AVFilter ff_vf_hqx; +extern const AVFilter ff_vf_hstack; +extern const AVFilter ff_vf_hue; +extern const AVFilter ff_vf_hwdownload; +extern const AVFilter ff_vf_hwmap; +extern const AVFilter ff_vf_hwupload; +extern const AVFilter ff_vf_hwupload_cuda; +extern const AVFilter ff_vf_hysteresis; +extern const AVFilter ff_vf_identity; +extern const AVFilter ff_vf_idet; +extern const AVFilter ff_vf_il; +extern const AVFilter ff_vf_inflate; +extern const AVFilter ff_vf_interlace; +extern const AVFilter ff_vf_interleave; +extern const AVFilter ff_vf_kerndeint; +extern const AVFilter ff_vf_kirsch; +extern const AVFilter ff_vf_lagfun; +extern const AVFilter ff_vf_lenscorrection; +extern const AVFilter ff_vf_lensfun; +extern const AVFilter ff_vf_libvmaf; +extern const AVFilter ff_vf_limiter; +extern const AVFilter ff_vf_loop; +extern const AVFilter ff_vf_lumakey; +extern const AVFilter ff_vf_lut; +extern const AVFilter ff_vf_lut1d; +extern const AVFilter ff_vf_lut2; +extern const AVFilter ff_vf_lut3d; +extern const AVFilter ff_vf_lutrgb; +extern const AVFilter ff_vf_lutyuv; +extern const AVFilter ff_vf_maskedclamp; +extern const AVFilter ff_vf_maskedmax; +extern const AVFilter ff_vf_maskedmerge; +extern const AVFilter ff_vf_maskedmin; +extern const AVFilter ff_vf_maskedthreshold; +extern const AVFilter ff_vf_maskfun; +extern const AVFilter ff_vf_mcdeint; +extern const AVFilter ff_vf_median; +extern const AVFilter ff_vf_mergeplanes; +extern const AVFilter ff_vf_mestimate; +extern const AVFilter ff_vf_metadata; +extern const AVFilter ff_vf_midequalizer; +extern const AVFilter ff_vf_minterpolate; +extern const AVFilter ff_vf_mix; +extern const AVFilter ff_vf_monochrome; +extern const AVFilter ff_vf_mpdecimate; +extern const AVFilter ff_vf_msad; +extern const AVFilter ff_vf_negate; +extern const AVFilter ff_vf_nlmeans; +extern const AVFilter ff_vf_nlmeans_opencl; +extern const AVFilter ff_vf_nnedi; +extern const AVFilter ff_vf_noformat; +extern const AVFilter ff_vf_noise; +extern const AVFilter ff_vf_normalize; +extern const AVFilter ff_vf_null; +extern const AVFilter ff_vf_ocr; +extern const AVFilter ff_vf_ocv; +extern const AVFilter ff_vf_oscilloscope; +extern const AVFilter ff_vf_overlay; +extern const AVFilter ff_vf_overlay_opencl; +extern const AVFilter ff_vf_overlay_qsv; +extern const AVFilter ff_vf_overlay_vulkan; +extern const AVFilter ff_vf_overlay_cuda; +extern const AVFilter ff_vf_owdenoise; +extern const AVFilter ff_vf_pad; +extern const AVFilter ff_vf_pad_opencl; +extern const AVFilter ff_vf_palettegen; +extern const AVFilter ff_vf_paletteuse; +extern const AVFilter ff_vf_perms; +extern const AVFilter ff_vf_perspective; +extern const AVFilter ff_vf_phase; +extern const AVFilter ff_vf_photosensitivity; +extern const AVFilter ff_vf_pixdesctest; +extern const AVFilter ff_vf_pixscope; +extern const AVFilter ff_vf_pp; +extern const AVFilter ff_vf_pp7; +extern const AVFilter ff_vf_premultiply; +extern const AVFilter ff_vf_prewitt; +extern const AVFilter ff_vf_prewitt_opencl; +extern const AVFilter ff_vf_procamp_vaapi; +extern const AVFilter ff_vf_program_opencl; +extern const AVFilter ff_vf_pseudocolor; +extern const AVFilter ff_vf_psnr; +extern const AVFilter ff_vf_pullup; +extern const AVFilter ff_vf_qp; +extern const AVFilter ff_vf_random; +extern const AVFilter ff_vf_readeia608; +extern const AVFilter ff_vf_readvitc; +extern const AVFilter ff_vf_realtime; +extern const AVFilter ff_vf_remap; +extern const AVFilter ff_vf_removegrain; +extern const AVFilter ff_vf_removelogo; +extern const AVFilter ff_vf_repeatfields; +extern const AVFilter ff_vf_reverse; +extern const AVFilter ff_vf_rgbashift; +extern const AVFilter ff_vf_roberts; +extern const AVFilter ff_vf_roberts_opencl; +extern const AVFilter ff_vf_rotate; +extern const AVFilter ff_vf_sab; +extern const AVFilter ff_vf_scale; +extern const AVFilter ff_vf_scale_cuda; +extern const AVFilter ff_vf_scale_npp; +extern const AVFilter ff_vf_scale_qsv; +extern const AVFilter ff_vf_scale_vaapi; +extern const AVFilter ff_vf_scale_vulkan; +extern const AVFilter ff_vf_scale2ref; +extern const AVFilter ff_vf_scdet; +extern const AVFilter ff_vf_scroll; +extern const AVFilter ff_vf_select; +extern const AVFilter ff_vf_selectivecolor; +extern const AVFilter ff_vf_sendcmd; +extern const AVFilter ff_vf_separatefields; +extern const AVFilter ff_vf_setdar; +extern const AVFilter ff_vf_setfield; +extern const AVFilter ff_vf_setparams; +extern const AVFilter ff_vf_setpts; +extern const AVFilter ff_vf_setrange; +extern const AVFilter ff_vf_setsar; +extern const AVFilter ff_vf_settb; +extern const AVFilter ff_vf_sharpness_vaapi; +extern const AVFilter ff_vf_shear; +extern const AVFilter ff_vf_showinfo; +extern const AVFilter ff_vf_showpalette; +extern const AVFilter ff_vf_shuffleframes; +extern const AVFilter ff_vf_shufflepixels; +extern const AVFilter ff_vf_shuffleplanes; +extern const AVFilter ff_vf_sidedata; +extern const AVFilter ff_vf_signalstats; +extern const AVFilter ff_vf_signature; +extern const AVFilter ff_vf_smartblur; +extern const AVFilter ff_vf_sobel; +extern const AVFilter ff_vf_sobel_opencl; +extern const AVFilter ff_vf_split; +extern const AVFilter ff_vf_spp; +extern const AVFilter ff_vf_sr; +extern const AVFilter ff_vf_ssim; +extern const AVFilter ff_vf_stereo3d; +extern const AVFilter ff_vf_streamselect; +extern const AVFilter ff_vf_subtitles; +extern const AVFilter ff_vf_super2xsai; +extern const AVFilter ff_vf_swaprect; +extern const AVFilter ff_vf_swapuv; +extern const AVFilter ff_vf_tblend; +extern const AVFilter ff_vf_telecine; +extern const AVFilter ff_vf_thistogram; +extern const AVFilter ff_vf_threshold; +extern const AVFilter ff_vf_thumbnail; +extern const AVFilter ff_vf_thumbnail_cuda; +extern const AVFilter ff_vf_tile; +extern const AVFilter ff_vf_tinterlace; +extern const AVFilter ff_vf_tlut2; +extern const AVFilter ff_vf_tmedian; +extern const AVFilter ff_vf_tmidequalizer; +extern const AVFilter ff_vf_tmix; +extern const AVFilter ff_vf_tonemap; +extern const AVFilter ff_vf_tonemap_opencl; +extern const AVFilter ff_vf_tonemap_vaapi; +extern const AVFilter ff_vf_tpad; +extern const AVFilter ff_vf_transpose; +extern const AVFilter ff_vf_transpose_npp; +extern const AVFilter ff_vf_transpose_opencl; +extern const AVFilter ff_vf_transpose_vaapi; +extern const AVFilter ff_vf_trim; +extern const AVFilter ff_vf_unpremultiply; +extern const AVFilter ff_vf_unsharp; +extern const AVFilter ff_vf_unsharp_opencl; +extern const AVFilter ff_vf_untile; +extern const AVFilter ff_vf_uspp; +extern const AVFilter ff_vf_v360; +extern const AVFilter ff_vf_vaguedenoiser; +extern const AVFilter ff_vf_vectorscope; +extern const AVFilter ff_vf_vflip; +extern const AVFilter ff_vf_vfrdet; +extern const AVFilter ff_vf_vibrance; +extern const AVFilter ff_vf_vidstabdetect; +extern const AVFilter ff_vf_vidstabtransform; +extern const AVFilter ff_vf_vif; +extern const AVFilter ff_vf_vignette; +extern const AVFilter ff_vf_vmafmotion; +extern const AVFilter ff_vf_vpp_qsv; +extern const AVFilter ff_vf_vstack; +extern const AVFilter ff_vf_w3fdif; +extern const AVFilter ff_vf_waveform; +extern const AVFilter ff_vf_weave; +extern const AVFilter ff_vf_xbr; +extern const AVFilter ff_vf_xfade; +extern const AVFilter ff_vf_xfade_opencl; +extern const AVFilter ff_vf_xmedian; +extern const AVFilter ff_vf_xstack; +extern const AVFilter ff_vf_yadif; +extern const AVFilter ff_vf_yadif_cuda; +extern const AVFilter ff_vf_yaepblur; +extern const AVFilter ff_vf_zmq; +extern const AVFilter ff_vf_zoompan; +extern const AVFilter ff_vf_zscale; -extern AVFilter ff_vsrc_allrgb; -extern AVFilter ff_vsrc_allyuv; -extern AVFilter ff_vsrc_cellauto; -extern AVFilter ff_vsrc_color; -extern AVFilter ff_vsrc_coreimagesrc; -extern AVFilter ff_vsrc_frei0r_src; -extern AVFilter ff_vsrc_gradients; -extern AVFilter ff_vsrc_haldclutsrc; -extern AVFilter ff_vsrc_life; -extern AVFilter ff_vsrc_mandelbrot; -extern AVFilter ff_vsrc_mptestsrc; -extern AVFilter ff_vsrc_nullsrc; -extern AVFilter ff_vsrc_openclsrc; -extern AVFilter ff_vsrc_pal75bars; -extern AVFilter ff_vsrc_pal100bars; -extern AVFilter ff_vsrc_rgbtestsrc; -extern AVFilter ff_vsrc_sierpinski; -extern AVFilter ff_vsrc_smptebars; -extern AVFilter ff_vsrc_smptehdbars; -extern AVFilter ff_vsrc_testsrc; -extern AVFilter ff_vsrc_testsrc2; -extern AVFilter ff_vsrc_yuvtestsrc; +extern const AVFilter ff_vsrc_allrgb; +extern const AVFilter ff_vsrc_allyuv; +extern const AVFilter ff_vsrc_cellauto; +extern const AVFilter ff_vsrc_color; +extern const AVFilter ff_vsrc_coreimagesrc; +extern const AVFilter ff_vsrc_frei0r_src; +extern const AVFilter ff_vsrc_gradients; +extern const AVFilter ff_vsrc_haldclutsrc; +extern const AVFilter ff_vsrc_life; +extern const AVFilter ff_vsrc_mandelbrot; +extern const AVFilter ff_vsrc_mptestsrc; +extern const AVFilter ff_vsrc_nullsrc; +extern const AVFilter ff_vsrc_openclsrc; +extern const AVFilter ff_vsrc_pal75bars; +extern const AVFilter ff_vsrc_pal100bars; +extern const AVFilter ff_vsrc_rgbtestsrc; +extern const AVFilter ff_vsrc_sierpinski; +extern const AVFilter ff_vsrc_smptebars; +extern const AVFilter ff_vsrc_smptehdbars; +extern const AVFilter ff_vsrc_testsrc; +extern const AVFilter ff_vsrc_testsrc2; +extern const AVFilter ff_vsrc_yuvtestsrc; -extern AVFilter ff_vsink_nullsink; +extern const AVFilter ff_vsink_nullsink; /* multimedia filters */ -extern AVFilter ff_avf_abitscope; -extern AVFilter ff_avf_adrawgraph; -extern AVFilter ff_avf_agraphmonitor; -extern AVFilter ff_avf_ahistogram; -extern AVFilter ff_avf_aphasemeter; -extern AVFilter ff_avf_avectorscope; -extern AVFilter ff_avf_concat; -extern AVFilter ff_avf_showcqt; -extern AVFilter ff_avf_showfreqs; -extern AVFilter ff_avf_showspatial; -extern AVFilter ff_avf_showspectrum; -extern AVFilter ff_avf_showspectrumpic; -extern AVFilter ff_avf_showvolume; -extern AVFilter ff_avf_showwaves; -extern AVFilter ff_avf_showwavespic; -extern AVFilter ff_vaf_spectrumsynth; +extern const AVFilter ff_avf_abitscope; +extern const AVFilter ff_avf_adrawgraph; +extern const AVFilter ff_avf_agraphmonitor; +extern const AVFilter ff_avf_ahistogram; +extern const AVFilter ff_avf_aphasemeter; +extern const AVFilter ff_avf_avectorscope; +extern const AVFilter ff_avf_concat; +extern const AVFilter ff_avf_showcqt; +extern const AVFilter ff_avf_showfreqs; +extern const AVFilter ff_avf_showspatial; +extern const AVFilter ff_avf_showspectrum; +extern const AVFilter ff_avf_showspectrumpic; +extern const AVFilter ff_avf_showvolume; +extern const AVFilter ff_avf_showwaves; +extern const AVFilter ff_avf_showwavespic; +extern const AVFilter ff_vaf_spectrumsynth; /* multimedia sources */ -extern AVFilter ff_avsrc_amovie; -extern AVFilter ff_avsrc_movie; +extern const AVFilter ff_avsrc_amovie; +extern const AVFilter ff_avsrc_movie; /* those filters are part of public or internal API, * they are formatted to not be found by the grep * as they are manually added again (due to their 'names' * being the same while having different 'types'). */ -extern AVFilter ff_asrc_abuffer; -extern AVFilter ff_vsrc_buffer; -extern AVFilter ff_asink_abuffer; -extern AVFilter ff_vsink_buffer; -extern AVFilter ff_af_afifo; -extern AVFilter ff_vf_fifo; +extern const AVFilter ff_asrc_abuffer; +extern const AVFilter ff_vsrc_buffer; +extern const AVFilter ff_asink_abuffer; +extern const AVFilter ff_vsink_buffer; +extern const AVFilter ff_af_afifo; +extern const AVFilter ff_vf_fifo; #include "libavfilter/filter_list.c" diff --git a/libavfilter/asink_anullsink.c b/libavfilter/asink_anullsink.c index c10a348475..dce0204839 100644 --- a/libavfilter/asink_anullsink.c +++ b/libavfilter/asink_anullsink.c @@ -37,7 +37,7 @@ static const AVFilterPad avfilter_asink_anullsink_inputs[] = { { NULL }, }; -AVFilter ff_asink_anullsink = { +const AVFilter ff_asink_anullsink = { .name = "anullsink", .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."), .priv_size = 0, diff --git a/libavfilter/asrc_afirsrc.c b/libavfilter/asrc_afirsrc.c index d8ba8f6a54..4002118d6a 100644 --- a/libavfilter/asrc_afirsrc.c +++ b/libavfilter/asrc_afirsrc.c @@ -317,7 +317,7 @@ static const AVFilterPad afirsrc_outputs[] = { { NULL } }; -AVFilter ff_asrc_afirsrc = { +const AVFilter ff_asrc_afirsrc = { .name = "afirsrc", .description = NULL_IF_CONFIG_SMALL("Generate a FIR coefficients audio stream."), .query_formats = query_formats, diff --git a/libavfilter/asrc_anoisesrc.c b/libavfilter/asrc_anoisesrc.c index 40ee077001..286334acc8 100644 --- a/libavfilter/asrc_anoisesrc.c +++ b/libavfilter/asrc_anoisesrc.c @@ -246,7 +246,7 @@ static const AVFilterPad anoisesrc_outputs[] = { { NULL } }; -AVFilter ff_asrc_anoisesrc = { +const AVFilter ff_asrc_anoisesrc = { .name = "anoisesrc", .description = NULL_IF_CONFIG_SMALL("Generate a noise audio signal."), .query_formats = query_formats, diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c index f2c0799faa..45d830e3a2 100644 --- a/libavfilter/asrc_anullsrc.c +++ b/libavfilter/asrc_anullsrc.c @@ -137,7 +137,7 @@ static const AVFilterPad avfilter_asrc_anullsrc_outputs[] = { { NULL } }; -AVFilter ff_asrc_anullsrc = { +const AVFilter ff_asrc_anullsrc = { .name = "anullsrc", .description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."), .init = init, diff --git a/libavfilter/asrc_flite.c b/libavfilter/asrc_flite.c index 3e543a3ab6..e3065cff79 100644 --- a/libavfilter/asrc_flite.c +++ b/libavfilter/asrc_flite.c @@ -274,7 +274,7 @@ static const AVFilterPad flite_outputs[] = { { NULL } }; -AVFilter ff_asrc_flite = { +const AVFilter ff_asrc_flite = { .name = "flite", .description = NULL_IF_CONFIG_SMALL("Synthesize voice from text using libflite."), .query_formats = query_formats, diff --git a/libavfilter/asrc_hilbert.c b/libavfilter/asrc_hilbert.c index 640dfe46f9..64e566084c 100644 --- a/libavfilter/asrc_hilbert.c +++ b/libavfilter/asrc_hilbert.c @@ -187,7 +187,7 @@ static const AVFilterPad hilbert_outputs[] = { { NULL } }; -AVFilter ff_asrc_hilbert = { +const AVFilter ff_asrc_hilbert = { .name = "hilbert", .description = NULL_IF_CONFIG_SMALL("Generate a Hilbert transform FIR coefficients."), .query_formats = query_formats, diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c index c3ecb864d1..e4aa51c0d0 100644 --- a/libavfilter/asrc_sinc.c +++ b/libavfilter/asrc_sinc.c @@ -444,7 +444,7 @@ static const AVOption sinc_options[] = { AVFILTER_DEFINE_CLASS(sinc); -AVFilter ff_asrc_sinc = { +const AVFilter ff_asrc_sinc = { .name = "sinc", .description = NULL_IF_CONFIG_SMALL("Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients."), .priv_size = sizeof(SincContext), diff --git a/libavfilter/asrc_sine.c b/libavfilter/asrc_sine.c index 3b7d2e6d00..f75a5fc728 100644 --- a/libavfilter/asrc_sine.c +++ b/libavfilter/asrc_sine.c @@ -269,7 +269,7 @@ static const AVFilterPad sine_outputs[] = { { NULL } }; -AVFilter ff_asrc_sine = { +const AVFilter ff_asrc_sine = { .name = "sine", .description = NULL_IF_CONFIG_SMALL("Generate sine wave audio signal."), .query_formats = query_formats, diff --git a/libavfilter/avf_abitscope.c b/libavfilter/avf_abitscope.c index 5011943888..c38c73e0e5 100644 --- a/libavfilter/avf_abitscope.c +++ b/libavfilter/avf_abitscope.c @@ -261,7 +261,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_avf_abitscope = { +const AVFilter ff_avf_abitscope = { .name = "abitscope", .description = NULL_IF_CONFIG_SMALL("Convert input audio to audio bit scope video output."), .query_formats = query_formats, diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c index b37b4a66a2..864c061c2f 100644 --- a/libavfilter/avf_ahistogram.c +++ b/libavfilter/avf_ahistogram.c @@ -424,7 +424,7 @@ static const AVFilterPad ahistogram_outputs[] = { { NULL } }; -AVFilter ff_avf_ahistogram = { +const AVFilter ff_avf_ahistogram = { .name = "ahistogram", .description = NULL_IF_CONFIG_SMALL("Convert input audio to histogram video output."), .uninit = uninit, diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c index 61da9a90b6..ea529d3fee 100644 --- a/libavfilter/avf_aphasemeter.c +++ b/libavfilter/avf_aphasemeter.c @@ -385,7 +385,7 @@ static const AVFilterPad inputs[] = { { NULL } }; -AVFilter ff_avf_aphasemeter = { +const AVFilter ff_avf_aphasemeter = { .name = "aphasemeter", .description = NULL_IF_CONFIG_SMALL("Convert input audio to phase meter video output."), .init = init, diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index c44353c7fd..a0011fe33b 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -415,7 +415,7 @@ static const AVFilterPad audiovectorscope_outputs[] = { { NULL } }; -AVFilter ff_avf_avectorscope = { +const AVFilter ff_avf_avectorscope = { .name = "avectorscope", .description = NULL_IF_CONFIG_SMALL("Convert input audio to vectorscope video output."), .uninit = uninit, diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index df6414704d..f5cd8c11a7 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -447,7 +447,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar return ret; } -AVFilter ff_avf_concat = { +const AVFilter ff_avf_concat = { .name = "concat", .description = NULL_IF_CONFIG_SMALL("Concatenate audio and video streams."), .init = init, diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c index dba1f089ee..996a6f63c5 100644 --- a/libavfilter/avf_showcqt.c +++ b/libavfilter/avf_showcqt.c @@ -1589,7 +1589,7 @@ static const AVFilterPad showcqt_outputs[] = { { NULL } }; -AVFilter ff_avf_showcqt = { +const AVFilter ff_avf_showcqt = { .name = "showcqt", .description = NULL_IF_CONFIG_SMALL("Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output."), .init = init, diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c index 6f286c03ba..0b8067116c 100644 --- a/libavfilter/avf_showfreqs.c +++ b/libavfilter/avf_showfreqs.c @@ -556,7 +556,7 @@ static const AVFilterPad showfreqs_outputs[] = { { NULL } }; -AVFilter ff_avf_showfreqs = { +const AVFilter ff_avf_showfreqs = { .name = "showfreqs", .description = NULL_IF_CONFIG_SMALL("Convert input audio to a frequencies video output."), .init = init, diff --git a/libavfilter/avf_showspatial.c b/libavfilter/avf_showspatial.c index a2c8ac24ba..82d202a817 100644 --- a/libavfilter/avf_showspatial.c +++ b/libavfilter/avf_showspatial.c @@ -358,7 +358,7 @@ static const AVFilterPad showspatial_outputs[] = { { NULL } }; -AVFilter ff_avf_showspatial = { +const AVFilter ff_avf_showspatial = { .name = "showspatial", .description = NULL_IF_CONFIG_SMALL("Convert input audio to a spatial video output."), .uninit = uninit, diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index c690665bad..4544bef0bd 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1526,7 +1526,7 @@ static const AVFilterPad showspectrum_outputs[] = { { NULL } }; -AVFilter ff_avf_showspectrum = { +const AVFilter ff_avf_showspectrum = { .name = "showspectrum", .description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output."), .uninit = uninit, @@ -1709,7 +1709,7 @@ static const AVFilterPad showspectrumpic_outputs[] = { { NULL } }; -AVFilter ff_avf_showspectrumpic = { +const AVFilter ff_avf_showspectrumpic = { .name = "showspectrumpic", .description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output single picture."), .uninit = uninit, diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c index 466283a3eb..d4b8c48297 100644 --- a/libavfilter/avf_showvolume.c +++ b/libavfilter/avf_showvolume.c @@ -498,7 +498,7 @@ static const AVFilterPad showvolume_outputs[] = { { NULL } }; -AVFilter ff_avf_showvolume = { +const AVFilter ff_avf_showvolume = { .name = "showvolume", .description = NULL_IF_CONFIG_SMALL("Convert input audio volume to video output."), .init = init, diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index aabd79e23b..b3639f46a5 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -775,7 +775,7 @@ static const AVFilterPad showwaves_outputs[] = { { NULL } }; -AVFilter ff_avf_showwaves = { +const AVFilter ff_avf_showwaves = { .name = "showwaves", .description = NULL_IF_CONFIG_SMALL("Convert input audio to a video output."), .init = init, @@ -890,7 +890,7 @@ static const AVFilterPad showwavespic_outputs[] = { { NULL } }; -AVFilter ff_avf_showwavespic = { +const AVFilter ff_avf_showwavespic = { .name = "showwavespic", .description = NULL_IF_CONFIG_SMALL("Convert input audio to a video output single picture."), .init = init, diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 15d897cff6..c4147bf732 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -335,7 +335,7 @@ static const AVFilterPad avfilter_vsink_buffer_inputs[] = { { NULL } }; -AVFilter ff_vsink_buffer = { +const AVFilter ff_vsink_buffer = { .name = "buffersink", .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), .priv_size = sizeof(BufferSinkContext), @@ -355,7 +355,7 @@ static const AVFilterPad avfilter_asink_abuffer_inputs[] = { { NULL } }; -AVFilter ff_asink_abuffer = { +const AVFilter ff_asink_abuffer = { .name = "abuffersink", .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."), .priv_class = &abuffersink_class, diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index da1cf9941e..29c01285cd 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -438,7 +438,7 @@ static const AVFilterPad avfilter_vsrc_buffer_outputs[] = { { NULL } }; -AVFilter ff_vsrc_buffer = { +const AVFilter ff_vsrc_buffer = { .name = "buffer", .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), .priv_size = sizeof(BufferSourceContext), @@ -462,7 +462,7 @@ static const AVFilterPad avfilter_asrc_abuffer_outputs[] = { { NULL } }; -AVFilter ff_asrc_abuffer = { +const AVFilter ff_asrc_abuffer = { .name = "abuffer", .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), .priv_size = sizeof(BufferSourceContext), diff --git a/libavfilter/f_bench.c b/libavfilter/f_bench.c index f9e1006925..e7d7c5e299 100644 --- a/libavfilter/f_bench.c +++ b/libavfilter/f_bench.c @@ -107,7 +107,7 @@ static const AVFilterPad bench_outputs[] = { { NULL } }; -AVFilter ff_vf_bench = { +const AVFilter ff_vf_bench = { .name = "bench", .description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), .priv_size = sizeof(BenchContext), @@ -139,7 +139,7 @@ static const AVFilterPad abench_outputs[] = { { NULL } }; -AVFilter ff_af_abench = { +const AVFilter ff_af_abench = { .name = "abench", .description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), .priv_size = sizeof(BenchContext), diff --git a/libavfilter/f_cue.c b/libavfilter/f_cue.c index b48dfc9d49..03804f1667 100644 --- a/libavfilter/f_cue.c +++ b/libavfilter/f_cue.c @@ -114,7 +114,7 @@ static const AVFilterPad cue_outputs[] = { { NULL } }; -AVFilter ff_vf_cue = { +const AVFilter ff_vf_cue = { .name = "cue", .description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), .priv_size = sizeof(CueContext), @@ -145,7 +145,7 @@ static const AVFilterPad acue_outputs[] = { { NULL } }; -AVFilter ff_af_acue = { +const AVFilter ff_af_acue = { .name = "acue", .description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), .priv_size = sizeof(CueContext), diff --git a/libavfilter/f_drawgraph.c b/libavfilter/f_drawgraph.c index b9dd26d392..70701e330e 100644 --- a/libavfilter/f_drawgraph.c +++ b/libavfilter/f_drawgraph.c @@ -471,7 +471,7 @@ static const AVFilterPad drawgraph_outputs[] = { { NULL } }; -AVFilter ff_vf_drawgraph = { +const AVFilter ff_vf_drawgraph = { .name = "drawgraph", .description = NULL_IF_CONFIG_SMALL("Draw a graph using input video metadata."), .priv_size = sizeof(DrawGraphContext), @@ -509,7 +509,7 @@ static const AVFilterPad adrawgraph_outputs[] = { { NULL } }; -AVFilter ff_avf_adrawgraph = { +const AVFilter ff_avf_adrawgraph = { .name = "adrawgraph", .description = NULL_IF_CONFIG_SMALL("Draw a graph using input audio metadata."), .priv_size = sizeof(DrawGraphContext), diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index e81520838d..a9a7820db8 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -999,7 +999,7 @@ static const AVFilterPad ebur128_inputs[] = { { NULL } }; -AVFilter ff_af_ebur128 = { +const AVFilter ff_af_ebur128 = { .name = "ebur128", .description = NULL_IF_CONFIG_SMALL("EBU R128 scanner."), .priv_size = sizeof(EBUR128Context), diff --git a/libavfilter/f_graphmonitor.c b/libavfilter/f_graphmonitor.c index 74779965d9..ba17f1f638 100644 --- a/libavfilter/f_graphmonitor.c +++ b/libavfilter/f_graphmonitor.c @@ -393,7 +393,7 @@ static const AVFilterPad graphmonitor_outputs[] = { { NULL } }; -AVFilter ff_vf_graphmonitor = { +const AVFilter ff_vf_graphmonitor = { .name = "graphmonitor", .description = NULL_IF_CONFIG_SMALL("Show various filtergraph stats."), .priv_size = sizeof(GraphMonitorContext), @@ -428,7 +428,7 @@ static const AVFilterPad agraphmonitor_outputs[] = { { NULL } }; -AVFilter ff_avf_agraphmonitor = { +const AVFilter ff_avf_agraphmonitor = { .name = "agraphmonitor", .description = NULL_IF_CONFIG_SMALL("Show various filtergraph stats."), .priv_size = sizeof(GraphMonitorContext), diff --git a/libavfilter/f_interleave.c b/libavfilter/f_interleave.c index 024657c024..259952b591 100644 --- a/libavfilter/f_interleave.c +++ b/libavfilter/f_interleave.c @@ -238,7 +238,7 @@ static const AVFilterPad interleave_outputs[] = { { NULL } }; -AVFilter ff_vf_interleave = { +const AVFilter ff_vf_interleave = { .name = "interleave", .description = NULL_IF_CONFIG_SMALL("Temporally interleave video inputs."), .priv_size = sizeof(InterleaveContext), @@ -266,7 +266,7 @@ static const AVFilterPad ainterleave_outputs[] = { { NULL } }; -AVFilter ff_af_ainterleave = { +const AVFilter ff_af_ainterleave = { .name = "ainterleave", .description = NULL_IF_CONFIG_SMALL("Temporally interleave audio inputs."), .priv_size = sizeof(InterleaveContext), diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c index 0a029f0104..15f6076a67 100644 --- a/libavfilter/f_loop.c +++ b/libavfilter/f_loop.c @@ -281,7 +281,7 @@ static const AVFilterPad aoutputs[] = { { NULL } }; -AVFilter ff_af_aloop = { +const AVFilter ff_af_aloop = { .name = "aloop", .description = NULL_IF_CONFIG_SMALL("Loop audio samples."), .priv_size = sizeof(LoopContext), @@ -454,7 +454,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_loop = { +const AVFilter ff_vf_loop = { .name = "loop", .description = NULL_IF_CONFIG_SMALL("Loop video frames."), .priv_size = sizeof(LoopContext), diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 598257b15b..5fec7c3c56 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -383,7 +383,7 @@ static const AVFilterPad aoutputs[] = { { NULL } }; -AVFilter ff_af_ametadata = { +const AVFilter ff_af_ametadata = { .name = "ametadata", .description = NULL_IF_CONFIG_SMALL("Manipulate audio frame metadata."), .priv_size = sizeof(MetadataContext), @@ -418,7 +418,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_metadata = { +const AVFilter ff_vf_metadata = { .name = "metadata", .description = NULL_IF_CONFIG_SMALL("Manipulate video frame metadata."), .priv_size = sizeof(MetadataContext), diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c index d984e5b150..0302ed765b 100644 --- a/libavfilter/f_perms.c +++ b/libavfilter/f_perms.c @@ -133,7 +133,7 @@ static const AVFilterPad aperms_outputs[] = { { NULL } }; -AVFilter ff_af_aperms = { +const AVFilter ff_af_aperms = { .name = "aperms", .description = NULL_IF_CONFIG_SMALL("Set permissions for the output audio frame."), .init = init, @@ -167,7 +167,7 @@ static const AVFilterPad perms_outputs[] = { { NULL } }; -AVFilter ff_vf_perms = { +const AVFilter ff_vf_perms = { .name = "perms", .description = NULL_IF_CONFIG_SMALL("Set permissions for the output video frame."), .init = init, diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c index 6fd3559dac..332ef21ac5 100644 --- a/libavfilter/f_realtime.c +++ b/libavfilter/f_realtime.c @@ -92,7 +92,7 @@ static const AVFilterPad avfilter_vf_realtime_outputs[] = { { NULL } }; -AVFilter ff_vf_realtime = { +const AVFilter ff_vf_realtime = { .name = "realtime", .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), .priv_size = sizeof(RealtimeContext), @@ -124,7 +124,7 @@ static const AVFilterPad arealtime_outputs[] = { { NULL } }; -AVFilter ff_af_arealtime = { +const AVFilter ff_af_arealtime = { .name = "arealtime", .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), .priv_size = sizeof(RealtimeContext), diff --git a/libavfilter/f_reverse.c b/libavfilter/f_reverse.c index 1e27264dd6..2a85e6966e 100644 --- a/libavfilter/f_reverse.c +++ b/libavfilter/f_reverse.c @@ -133,7 +133,7 @@ static const AVFilterPad reverse_outputs[] = { { NULL } }; -AVFilter ff_vf_reverse = { +const AVFilter ff_vf_reverse = { .name = "reverse", .description = NULL_IF_CONFIG_SMALL("Reverse a clip."), .priv_size = sizeof(ReverseContext), @@ -294,7 +294,7 @@ static const AVFilterPad areverse_outputs[] = { { NULL } }; -AVFilter ff_af_areverse = { +const AVFilter ff_af_areverse = { .name = "areverse", .description = NULL_IF_CONFIG_SMALL("Reverse an audio clip."), .query_formats = query_formats, diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 92938c33aa..f0468078e8 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -476,7 +476,7 @@ static const AVFilterPad avfilter_af_aselect_inputs[] = { { NULL } }; -AVFilter ff_af_aselect = { +const AVFilter ff_af_aselect = { .name = "aselect", .description = NULL_IF_CONFIG_SMALL("Select audio frames to pass in output."), .init = aselect_init, @@ -540,7 +540,7 @@ static const AVFilterPad avfilter_vf_select_inputs[] = { { NULL } }; -AVFilter ff_vf_select = { +const AVFilter ff_vf_select = { .name = "select", .description = NULL_IF_CONFIG_SMALL("Select video frames to pass in output."), .init = select_init, diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index 6b02669afa..71b0a5c411 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -594,7 +594,7 @@ static const AVFilterPad sendcmd_outputs[] = { { NULL } }; -AVFilter ff_vf_sendcmd = { +const AVFilter ff_vf_sendcmd = { .name = "sendcmd", .description = NULL_IF_CONFIG_SMALL("Send commands to filters."), .init = init, @@ -629,7 +629,7 @@ static const AVFilterPad asendcmd_outputs[] = { { NULL } }; -AVFilter ff_af_asendcmd = { +const AVFilter ff_af_asendcmd = { .name = "asendcmd", .description = NULL_IF_CONFIG_SMALL("Send commands to filters."), .init = init, diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c index 0542373ed8..9133fcb1e3 100644 --- a/libavfilter/f_sidedata.c +++ b/libavfilter/f_sidedata.c @@ -141,7 +141,7 @@ static const AVFilterPad aoutputs[] = { { NULL } }; -AVFilter ff_af_asidedata = { +const AVFilter ff_af_asidedata = { .name = "asidedata", .description = NULL_IF_CONFIG_SMALL("Manipulate audio frame side data."), .priv_size = sizeof(SideDataContext), @@ -175,7 +175,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_sidedata = { +const AVFilter ff_vf_sidedata = { .name = "sidedata", .description = NULL_IF_CONFIG_SMALL("Manipulate video frame side data."), .priv_size = sizeof(SideDataContext), diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c index b3ae4bed62..22eb76d4d7 100644 --- a/libavfilter/f_streamselect.c +++ b/libavfilter/f_streamselect.c @@ -327,7 +327,7 @@ static int query_formats(AVFilterContext *ctx) return 0; } -AVFilter ff_vf_streamselect = { +const AVFilter ff_vf_streamselect = { .name = "streamselect", .description = NULL_IF_CONFIG_SMALL("Select video streams"), .init = init, @@ -343,7 +343,7 @@ AVFilter ff_vf_streamselect = { #define astreamselect_options streamselect_options AVFILTER_DEFINE_CLASS(astreamselect); -AVFilter ff_af_astreamselect = { +const AVFilter ff_af_astreamselect = { .name = "astreamselect", .description = NULL_IF_CONFIG_SMALL("Select audio streams"), .init = init, diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c index 744c721305..774a890871 100644 --- a/libavfilter/f_zmq.c +++ b/libavfilter/f_zmq.c @@ -225,7 +225,7 @@ static const AVFilterPad zmq_outputs[] = { { NULL } }; -AVFilter ff_vf_zmq = { +const AVFilter ff_vf_zmq = { .name = "zmq", .description = NULL_IF_CONFIG_SMALL("Receive commands through ZMQ and broker them to filters."), .init = init, @@ -260,7 +260,7 @@ static const AVFilterPad azmq_outputs[] = { { NULL } }; -AVFilter ff_af_azmq = { +const AVFilter ff_af_azmq = { .name = "azmq", .description = NULL_IF_CONFIG_SMALL("Receive commands through ZMQ and broker them to filters."), .init = init, diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index 5b39e1afe7..e0996ba501 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -128,7 +128,7 @@ static const AVFilterPad avfilter_vf_fifo_outputs[] = { { NULL } }; -AVFilter ff_vf_fifo = { +const AVFilter ff_vf_fifo = { .name = "fifo", .description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."), .init = init, @@ -156,7 +156,7 @@ static const AVFilterPad avfilter_af_afifo_outputs[] = { { NULL } }; -AVFilter ff_af_afifo = { +const AVFilter ff_af_afifo = { .name = "afifo", .description = NULL_IF_CONFIG_SMALL("Buffer input frames and send them when they are requested."), .init = init, diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index 440a218924..ac98974312 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -290,7 +290,7 @@ static const AVFilterPad avfilter_vf_setpts_outputs[] = { { NULL } }; -AVFilter ff_vf_setpts = { +const AVFilter ff_vf_setpts = { .name = "setpts", .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."), .init = init, @@ -330,7 +330,7 @@ static const AVFilterPad asetpts_outputs[] = { { NULL } }; -AVFilter ff_af_asetpts = { +const AVFilter ff_af_asetpts = { .name = "asetpts", .description = NULL_IF_CONFIG_SMALL("Set PTS for the output audio frame."), .init = init, diff --git a/libavfilter/settb.c b/libavfilter/settb.c index dba52cff31..2f68e44c5b 100644 --- a/libavfilter/settb.c +++ b/libavfilter/settb.c @@ -179,7 +179,7 @@ static const AVFilterPad avfilter_vf_settb_outputs[] = { { NULL } }; -AVFilter ff_vf_settb = { +const AVFilter ff_vf_settb = { .name = "settb", .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."), .priv_size = sizeof(SetTBContext), @@ -212,7 +212,7 @@ static const AVFilterPad avfilter_af_asettb_outputs[] = { { NULL } }; -AVFilter ff_af_asettb = { +const AVFilter ff_af_asettb = { .name = "asettb", .description = NULL_IF_CONFIG_SMALL("Set timebase for the audio output link."), .priv_size = sizeof(SetTBContext), diff --git a/libavfilter/split.c b/libavfilter/split.c index 622838d83d..da5f681af8 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -119,7 +119,7 @@ static const AVFilterPad avfilter_vf_split_inputs[] = { { NULL } }; -AVFilter ff_vf_split = { +const AVFilter ff_vf_split = { .name = "split", .description = NULL_IF_CONFIG_SMALL("Pass on the input to N video outputs."), .priv_size = sizeof(SplitContext), @@ -140,7 +140,7 @@ static const AVFilterPad avfilter_af_asplit_inputs[] = { { NULL } }; -AVFilter ff_af_asplit = { +const AVFilter ff_af_asplit = { .name = "asplit", .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."), .priv_size = sizeof(SplitContext), diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index e449e7e0c2..54f6738f9a 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -637,7 +637,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar AVFILTER_DEFINE_CLASS(movie); -AVFilter ff_avsrc_movie = { +const AVFilter ff_avsrc_movie = { .name = "movie", .description = NULL_IF_CONFIG_SMALL("Read from a movie source."), .priv_size = sizeof(MovieContext), @@ -659,7 +659,7 @@ AVFilter ff_avsrc_movie = { #define amovie_options movie_options AVFILTER_DEFINE_CLASS(amovie); -AVFilter ff_avsrc_amovie = { +const AVFilter ff_avsrc_amovie = { .name = "amovie", .description = NULL_IF_CONFIG_SMALL("Read audio from a movie source."), .priv_size = sizeof(MovieContext), diff --git a/libavfilter/trim.c b/libavfilter/trim.c index 889fe96b9b..4f842eb7ff 100644 --- a/libavfilter/trim.c +++ b/libavfilter/trim.c @@ -207,7 +207,7 @@ static const AVFilterPad trim_outputs[] = { { NULL } }; -AVFilter ff_vf_trim = { +const AVFilter ff_vf_trim = { .name = "trim", .description = NULL_IF_CONFIG_SMALL("Pick one continuous section from the input, drop the rest."), .init = init, @@ -362,7 +362,7 @@ static const AVFilterPad atrim_outputs[] = { { NULL } }; -AVFilter ff_af_atrim = { +const AVFilter ff_af_atrim = { .name = "atrim", .description = NULL_IF_CONFIG_SMALL("Pick one continuous section from the input, drop the rest."), .init = init, diff --git a/libavfilter/vaf_spectrumsynth.c b/libavfilter/vaf_spectrumsynth.c index 7347f84352..36fb48c630 100644 --- a/libavfilter/vaf_spectrumsynth.c +++ b/libavfilter/vaf_spectrumsynth.c @@ -529,7 +529,7 @@ static const AVFilterPad spectrumsynth_outputs[] = { { NULL } }; -AVFilter ff_vaf_spectrumsynth = { +const AVFilter ff_vaf_spectrumsynth = { .name = "spectrumsynth", .description = NULL_IF_CONFIG_SMALL("Convert input spectrum videos to audio output."), .uninit = uninit, diff --git a/libavfilter/vf_addroi.c b/libavfilter/vf_addroi.c index d6b83ee854..1d09f31879 100644 --- a/libavfilter/vf_addroi.c +++ b/libavfilter/vf_addroi.c @@ -255,7 +255,7 @@ static const AVFilterPad addroi_outputs[] = { { NULL } }; -AVFilter ff_vf_addroi = { +const AVFilter ff_vf_addroi = { .name = "addroi", .description = NULL_IF_CONFIG_SMALL("Add region of interest to frame."), .init = addroi_init, diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index 69532d61c3..9b01db6605 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -188,7 +188,7 @@ static const AVOption alphamerge_options[] = { FRAMESYNC_DEFINE_CLASS(alphamerge, AlphaMergeContext, fs); -AVFilter ff_vf_alphamerge = { +const AVFilter ff_vf_alphamerge = { .name = "alphamerge", .description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second " "input into the alpha channel of the first input."), diff --git a/libavfilter/vf_amplify.c b/libavfilter/vf_amplify.c index 84d9765a4c..e9e0a90b41 100644 --- a/libavfilter/vf_amplify.c +++ b/libavfilter/vf_amplify.c @@ -313,7 +313,7 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(amplify); -AVFilter ff_vf_amplify = { +const AVFilter ff_vf_amplify = { .name = "amplify", .description = NULL_IF_CONFIG_SMALL("Amplify changes between successive video frames."), .priv_size = sizeof(AmplifyContext), diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index 70e7fedc97..f0467b5247 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -185,7 +185,7 @@ static const AVFilterPad avfilter_vf_setdar_outputs[] = { { NULL } }; -AVFilter ff_vf_setdar = { +const AVFilter ff_vf_setdar = { .name = "setdar", .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), .priv_size = sizeof(AspectContext), @@ -249,7 +249,7 @@ static const AVFilterPad avfilter_vf_setsar_outputs[] = { { NULL } }; -AVFilter ff_vf_setsar = { +const AVFilter ff_vf_setsar = { .name = "setsar", .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), .priv_size = sizeof(AspectContext), diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c index ccbda723f0..6b2f4a4e50 100644 --- a/libavfilter/vf_atadenoise.c +++ b/libavfilter/vf_atadenoise.c @@ -572,7 +572,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_atadenoise = { +const AVFilter ff_vf_atadenoise = { .name = "atadenoise", .description = NULL_IF_CONFIG_SMALL("Apply an Adaptive Temporal Averaging Denoiser."), .priv_size = sizeof(ATADenoiseContext), diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c index 7fd65eabfc..361801e8fd 100644 --- a/libavfilter/vf_avgblur.c +++ b/libavfilter/vf_avgblur.c @@ -313,7 +313,7 @@ static const AVFilterPad avgblur_outputs[] = { { NULL } }; -AVFilter ff_vf_avgblur = { +const AVFilter ff_vf_avgblur = { .name = "avgblur", .description = NULL_IF_CONFIG_SMALL("Apply Average Blur filter."), .priv_size = sizeof(AverageBlurContext), diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c index f0e5f01e04..3b9e56b879 100644 --- a/libavfilter/vf_avgblur_opencl.c +++ b/libavfilter/vf_avgblur_opencl.c @@ -340,7 +340,7 @@ static const AVOption avgblur_opencl_options[] = { AVFILTER_DEFINE_CLASS(avgblur_opencl); -AVFilter ff_vf_avgblur_opencl = { +const AVFilter ff_vf_avgblur_opencl = { .name = "avgblur_opencl", .description = NULL_IF_CONFIG_SMALL("Apply average blur filter"), .priv_size = sizeof(AverageBlurOpenCLContext), @@ -379,7 +379,7 @@ static const AVOption boxblur_opencl_options[] = { AVFILTER_DEFINE_CLASS(boxblur_opencl); -AVFilter ff_vf_boxblur_opencl = { +const AVFilter ff_vf_boxblur_opencl = { .name = "boxblur_opencl", .description = NULL_IF_CONFIG_SMALL("Apply boxblur filter to input video"), .priv_size = sizeof(AverageBlurOpenCLContext), diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c index 89763345d9..1e485061cd 100644 --- a/libavfilter/vf_avgblur_vulkan.c +++ b/libavfilter/vf_avgblur_vulkan.c @@ -398,7 +398,7 @@ static const AVFilterPad avgblur_vulkan_outputs[] = { { NULL } }; -AVFilter ff_vf_avgblur_vulkan = { +const AVFilter ff_vf_avgblur_vulkan = { .name = "avgblur_vulkan", .description = NULL_IF_CONFIG_SMALL("Apply avgblur mask to input video"), .priv_size = sizeof(AvgBlurVulkanContext), diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c index acbb4ea16d..849e75646b 100644 --- a/libavfilter/vf_bbox.c +++ b/libavfilter/vf_bbox.c @@ -153,7 +153,7 @@ static const AVFilterPad bbox_outputs[] = { { NULL } }; -AVFilter ff_vf_bbox = { +const AVFilter ff_vf_bbox = { .name = "bbox", .description = NULL_IF_CONFIG_SMALL("Compute bounding box for each frame."), .priv_size = sizeof(BBoxContext), diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c index 3eaf8dd009..7b9bd9737a 100644 --- a/libavfilter/vf_bilateral.c +++ b/libavfilter/vf_bilateral.c @@ -379,7 +379,7 @@ static const AVFilterPad bilateral_outputs[] = { { NULL } }; -AVFilter ff_vf_bilateral = { +const AVFilter ff_vf_bilateral = { .name = "bilateral", .description = NULL_IF_CONFIG_SMALL("Apply Bilateral filter."), .priv_size = sizeof(BilateralContext), diff --git a/libavfilter/vf_bitplanenoise.c b/libavfilter/vf_bitplanenoise.c index 94aa24abec..284c2966cf 100644 --- a/libavfilter/vf_bitplanenoise.c +++ b/libavfilter/vf_bitplanenoise.c @@ -214,7 +214,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_bitplanenoise = { +const AVFilter ff_vf_bitplanenoise = { .name = "bitplanenoise", .description = NULL_IF_CONFIG_SMALL("Measure bit plane noise."), .priv_size = sizeof(BPNContext), diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c index 565a7545e0..9f6b293b54 100644 --- a/libavfilter/vf_blackdetect.c +++ b/libavfilter/vf_blackdetect.c @@ -258,7 +258,7 @@ static const AVFilterPad blackdetect_outputs[] = { { NULL } }; -AVFilter ff_vf_blackdetect = { +const AVFilter ff_vf_blackdetect = { .name = "blackdetect", .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."), .priv_size = sizeof(BlackDetectContext), diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 804965c42c..b82c044f3e 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -132,7 +132,7 @@ static const AVFilterPad avfilter_vf_blackframe_outputs[] = { { NULL } }; -AVFilter ff_vf_blackframe = { +const AVFilter ff_vf_blackframe = { .name = "blackframe", .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."), .priv_size = sizeof(BlackFrameContext), diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index d12bfffbed..0b33107b79 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -906,7 +906,7 @@ static const AVFilterPad blend_outputs[] = { { NULL } }; -AVFilter ff_vf_blend = { +const AVFilter ff_vf_blend = { .name = "blend", .description = NULL_IF_CONFIG_SMALL("Blend two video frames into each other."), .preinit = blend_framesync_preinit, @@ -968,7 +968,7 @@ static const AVFilterPad tblend_outputs[] = { { NULL } }; -AVFilter ff_vf_tblend = { +const AVFilter ff_vf_tblend = { .name = "tblend", .description = NULL_IF_CONFIG_SMALL("Blend successive frames."), .priv_size = sizeof(BlendContext), diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c index 18d13b25ff..326b258616 100644 --- a/libavfilter/vf_bm3d.c +++ b/libavfilter/vf_bm3d.c @@ -1055,7 +1055,7 @@ static const AVFilterPad bm3d_outputs[] = { { NULL } }; -AVFilter ff_vf_bm3d = { +const AVFilter ff_vf_bm3d = { .name = "bm3d", .description = NULL_IF_CONFIG_SMALL("Block-Matching 3D denoiser."), .priv_size = sizeof(BM3DContext), diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c index bde74084f0..bebbd4ef08 100644 --- a/libavfilter/vf_boxblur.c +++ b/libavfilter/vf_boxblur.c @@ -304,7 +304,7 @@ static const AVFilterPad avfilter_vf_boxblur_outputs[] = { { NULL } }; -AVFilter ff_vf_boxblur = { +const AVFilter ff_vf_boxblur = { .name = "boxblur", .description = NULL_IF_CONFIG_SMALL("Blur the input."), .priv_size = sizeof(BoxBlurContext), diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c index b6aed7a450..faba945c7f 100644 --- a/libavfilter/vf_bwdif.c +++ b/libavfilter/vf_bwdif.c @@ -410,7 +410,7 @@ static const AVFilterPad avfilter_vf_bwdif_outputs[] = { { NULL } }; -AVFilter ff_vf_bwdif = { +const AVFilter ff_vf_bwdif = { .name = "bwdif", .description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), .priv_size = sizeof(BWDIFContext), diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c index 7c32ed5f9b..c5a53adfe9 100644 --- a/libavfilter/vf_cas.c +++ b/libavfilter/vf_cas.c @@ -286,7 +286,7 @@ static const AVOption cas_options[] = { AVFILTER_DEFINE_CLASS(cas); -AVFilter ff_vf_cas = { +const AVFilter ff_vf_cas = { .name = "cas", .description = NULL_IF_CONFIG_SMALL("Contrast Adaptive Sharpen."), .priv_size = sizeof(CASContext), diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c index 12dfebb1fe..2f5bf7bbb9 100644 --- a/libavfilter/vf_chromaber_vulkan.c +++ b/libavfilter/vf_chromaber_vulkan.c @@ -333,7 +333,7 @@ static const AVFilterPad chromaber_vulkan_outputs[] = { { NULL } }; -AVFilter ff_vf_chromaber_vulkan = { +const AVFilter ff_vf_chromaber_vulkan = { .name = "chromaber_vulkan", .description = NULL_IF_CONFIG_SMALL("Offset chroma of input video (chromatic aberration)"), .priv_size = sizeof(ChromaticAberrationVulkanContext), diff --git a/libavfilter/vf_chromakey.c b/libavfilter/vf_chromakey.c index 4b1669d084..45d8e43c2c 100644 --- a/libavfilter/vf_chromakey.c +++ b/libavfilter/vf_chromakey.c @@ -398,7 +398,7 @@ static const AVOption chromakey_options[] = { AVFILTER_DEFINE_CLASS(chromakey); -AVFilter ff_vf_chromakey = { +const AVFilter ff_vf_chromakey = { .name = "chromakey", .description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on YUV colors."), .priv_size = sizeof(ChromakeyContext), @@ -440,7 +440,7 @@ static const AVFilterPad chromahold_outputs[] = { AVFILTER_DEFINE_CLASS(chromahold); -AVFilter ff_vf_chromahold = { +const AVFilter ff_vf_chromahold = { .name = "chromahold", .description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray."), .priv_size = sizeof(ChromakeyContext), diff --git a/libavfilter/vf_chromanr.c b/libavfilter/vf_chromanr.c index 06325309e3..66ef1587b6 100644 --- a/libavfilter/vf_chromanr.c +++ b/libavfilter/vf_chromanr.c @@ -262,7 +262,7 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(chromanr); -AVFilter ff_vf_chromanr = { +const AVFilter ff_vf_chromanr = { .name = "chromanr", .description = NULL_IF_CONFIG_SMALL("Reduce chrominance noise."), .priv_size = sizeof(ChromaNRContext), diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c index 94de7a049e..3f172a8e2b 100644 --- a/libavfilter/vf_chromashift.c +++ b/libavfilter/vf_chromashift.c @@ -446,7 +446,7 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(chromashift); -AVFilter ff_vf_chromashift = { +const AVFilter ff_vf_chromashift = { .name = "chromashift", .description = NULL_IF_CONFIG_SMALL("Shift chroma."), .priv_size = sizeof(ChromaShiftContext), @@ -475,7 +475,7 @@ static const AVOption rgbashift_options[] = { AVFILTER_DEFINE_CLASS(rgbashift); -AVFilter ff_vf_rgbashift = { +const AVFilter ff_vf_rgbashift = { .name = "rgbashift", .description = NULL_IF_CONFIG_SMALL("Shift RGBA."), .priv_size = sizeof(ChromaShiftContext), diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c index 719e66ad0f..b3b906f517 100644 --- a/libavfilter/vf_ciescope.c +++ b/libavfilter/vf_ciescope.c @@ -1503,7 +1503,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_ciescope = { +const AVFilter ff_vf_ciescope = { .name = "ciescope", .description = NULL_IF_CONFIG_SMALL("Video CIE scope."), .priv_size = sizeof(CiescopeContext), diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c index 28ac2df72f..e3c613f10c 100644 --- a/libavfilter/vf_codecview.c +++ b/libavfilter/vf_codecview.c @@ -318,7 +318,7 @@ static const AVFilterPad codecview_outputs[] = { { NULL } }; -AVFilter ff_vf_codecview = { +const AVFilter ff_vf_codecview = { .name = "codecview", .description = NULL_IF_CONFIG_SMALL("Visualize information about some codecs."), .priv_size = sizeof(CodecViewContext), diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c index 6dc1b28483..4e13ce97b9 100644 --- a/libavfilter/vf_colorbalance.c +++ b/libavfilter/vf_colorbalance.c @@ -439,7 +439,7 @@ static const AVFilterPad colorbalance_outputs[] = { { NULL } }; -AVFilter ff_vf_colorbalance = { +const AVFilter ff_vf_colorbalance = { .name = "colorbalance", .description = NULL_IF_CONFIG_SMALL("Adjust the color balance."), .priv_size = sizeof(ColorBalanceContext), diff --git a/libavfilter/vf_colorchannelmixer.c b/libavfilter/vf_colorchannelmixer.c index 9857a666ff..9a538ddf5f 100644 --- a/libavfilter/vf_colorchannelmixer.c +++ b/libavfilter/vf_colorchannelmixer.c @@ -799,7 +799,7 @@ static const AVFilterPad colorchannelmixer_outputs[] = { { NULL } }; -AVFilter ff_vf_colorchannelmixer = { +const AVFilter ff_vf_colorchannelmixer = { .name = "colorchannelmixer", .description = NULL_IF_CONFIG_SMALL("Adjust colors by mixing color channels."), .priv_size = sizeof(ColorChannelMixerContext), diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c index eae62204b5..e44d9afa01 100644 --- a/libavfilter/vf_colorconstancy.c +++ b/libavfilter/vf_colorconstancy.c @@ -747,7 +747,7 @@ static const AVOption greyedge_options[] = { AVFILTER_DEFINE_CLASS(greyedge); -AVFilter ff_vf_greyedge = { +const AVFilter ff_vf_greyedge = { .name = GREY_EDGE, .description = NULL_IF_CONFIG_SMALL("Estimates scene illumination by grey edge assumption."), .priv_size = sizeof(ColorConstancyContext), diff --git a/libavfilter/vf_colorcontrast.c b/libavfilter/vf_colorcontrast.c index 7206c954bf..b5b547b46f 100644 --- a/libavfilter/vf_colorcontrast.c +++ b/libavfilter/vf_colorcontrast.c @@ -395,7 +395,7 @@ static const AVOption colorcontrast_options[] = { AVFILTER_DEFINE_CLASS(colorcontrast); -AVFilter ff_vf_colorcontrast = { +const AVFilter ff_vf_colorcontrast = { .name = "colorcontrast", .description = NULL_IF_CONFIG_SMALL("Adjust color contrast between RGB components."), .priv_size = sizeof(ColorContrastContext), diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c index f998f02e30..13ef50ad1d 100644 --- a/libavfilter/vf_colorcorrect.c +++ b/libavfilter/vf_colorcorrect.c @@ -204,7 +204,7 @@ static const AVOption colorcorrect_options[] = { AVFILTER_DEFINE_CLASS(colorcorrect); -AVFilter ff_vf_colorcorrect = { +const AVFilter ff_vf_colorcorrect = { .name = "colorcorrect", .description = NULL_IF_CONFIG_SMALL("Adjust color white balance selectively for blacks and whites."), .priv_size = sizeof(ColorCorrectContext), diff --git a/libavfilter/vf_colorize.c b/libavfilter/vf_colorize.c index e9d348201d..653832ab92 100644 --- a/libavfilter/vf_colorize.c +++ b/libavfilter/vf_colorize.c @@ -293,7 +293,7 @@ static const AVOption colorize_options[] = { AVFILTER_DEFINE_CLASS(colorize); -AVFilter ff_vf_colorize = { +const AVFilter ff_vf_colorize = { .name = "colorize", .description = NULL_IF_CONFIG_SMALL("Overlay a solid color on the video stream."), .priv_size = sizeof(ColorizeContext), diff --git a/libavfilter/vf_colorkey.c b/libavfilter/vf_colorkey.c index 0ac847c633..e0b4372842 100644 --- a/libavfilter/vf_colorkey.c +++ b/libavfilter/vf_colorkey.c @@ -212,7 +212,7 @@ static const AVOption colorkey_options[] = { AVFILTER_DEFINE_CLASS(colorkey); -AVFilter ff_vf_colorkey = { +const AVFilter ff_vf_colorkey = { .name = "colorkey", .description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on RGB colors."), .priv_size = sizeof(ColorkeyContext), @@ -237,7 +237,7 @@ static const AVOption colorhold_options[] = { AVFILTER_DEFINE_CLASS(colorhold); -AVFilter ff_vf_colorhold = { +const AVFilter ff_vf_colorhold = { .name = "colorhold", .description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray. Operates on RGB colors."), .priv_size = sizeof(ColorkeyContext), diff --git a/libavfilter/vf_colorkey_opencl.c b/libavfilter/vf_colorkey_opencl.c index a76a1dcb7c..cd312ea53e 100644 --- a/libavfilter/vf_colorkey_opencl.c +++ b/libavfilter/vf_colorkey_opencl.c @@ -230,7 +230,7 @@ static const AVOption colorkey_opencl_options[] = { AVFILTER_DEFINE_CLASS(colorkey_opencl); -AVFilter ff_vf_colorkey_opencl = { +const AVFilter ff_vf_colorkey_opencl = { .name = "colorkey_opencl", .description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on RGB colors."), .priv_size = sizeof(ColorkeyOpenCLContext), diff --git a/libavfilter/vf_colorlevels.c b/libavfilter/vf_colorlevels.c index 9085e40974..8bc0d96df0 100644 --- a/libavfilter/vf_colorlevels.c +++ b/libavfilter/vf_colorlevels.c @@ -315,7 +315,7 @@ static const AVFilterPad colorlevels_outputs[] = { { NULL } }; -AVFilter ff_vf_colorlevels = { +const AVFilter ff_vf_colorlevels = { .name = "colorlevels", .description = NULL_IF_CONFIG_SMALL("Adjust the color levels."), .priv_size = sizeof(ColorLevelsContext), diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index 3a02e2b86e..c304f2dba8 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -507,7 +507,7 @@ static const AVFilterPad colormatrix_outputs[] = { { NULL } }; -AVFilter ff_vf_colormatrix = { +const AVFilter ff_vf_colormatrix = { .name = "colormatrix", .description = NULL_IF_CONFIG_SMALL("Convert color matrix."), .priv_size = sizeof(ColorMatrixContext), diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 471669500b..65e072d137 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -1069,7 +1069,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_colorspace = { +const AVFilter ff_vf_colorspace = { .name = "colorspace", .description = NULL_IF_CONFIG_SMALL("Convert between colorspaces."), .init = init, diff --git a/libavfilter/vf_colortemperature.c b/libavfilter/vf_colortemperature.c index 7be5e796e6..1a4c9261f6 100644 --- a/libavfilter/vf_colortemperature.c +++ b/libavfilter/vf_colortemperature.c @@ -357,7 +357,7 @@ static const AVOption colortemperature_options[] = { AVFILTER_DEFINE_CLASS(colortemperature); -AVFilter ff_vf_colortemperature = { +const AVFilter ff_vf_colortemperature = { .name = "colortemperature", .description = NULL_IF_CONFIG_SMALL("Adjust color temperature of video."), .priv_size = sizeof(ColorTemperatureContext), diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index 0b7356b320..c0fc7356bd 100644 --- a/libavfilter/vf_convolution.c +++ b/libavfilter/vf_convolution.c @@ -902,7 +902,7 @@ static const AVFilterPad convolution_outputs[] = { #if CONFIG_CONVOLUTION_FILTER -AVFilter ff_vf_convolution = { +const AVFilter ff_vf_convolution = { .name = "convolution", .description = NULL_IF_CONFIG_SMALL("Apply convolution filter."), .priv_size = sizeof(ConvolutionContext), @@ -931,7 +931,7 @@ static const AVOption prewitt_roberts_sobel_options[] = { #define prewitt_options prewitt_roberts_sobel_options AVFILTER_DEFINE_CLASS(prewitt); -AVFilter ff_vf_prewitt = { +const AVFilter ff_vf_prewitt = { .name = "prewitt", .description = NULL_IF_CONFIG_SMALL("Apply prewitt operator."), .priv_size = sizeof(ConvolutionContext), @@ -951,7 +951,7 @@ AVFilter ff_vf_prewitt = { #define sobel_options prewitt_roberts_sobel_options AVFILTER_DEFINE_CLASS(sobel); -AVFilter ff_vf_sobel = { +const AVFilter ff_vf_sobel = { .name = "sobel", .description = NULL_IF_CONFIG_SMALL("Apply sobel operator."), .priv_size = sizeof(ConvolutionContext), @@ -971,7 +971,7 @@ AVFilter ff_vf_sobel = { #define roberts_options prewitt_roberts_sobel_options AVFILTER_DEFINE_CLASS(roberts); -AVFilter ff_vf_roberts = { +const AVFilter ff_vf_roberts = { .name = "roberts", .description = NULL_IF_CONFIG_SMALL("Apply roberts cross operator."), .priv_size = sizeof(ConvolutionContext), @@ -991,7 +991,7 @@ AVFilter ff_vf_roberts = { #define kirsch_options prewitt_roberts_sobel_options AVFILTER_DEFINE_CLASS(kirsch); -AVFilter ff_vf_kirsch = { +const AVFilter ff_vf_kirsch = { .name = "kirsch", .description = NULL_IF_CONFIG_SMALL("Apply kirsch operator."), .priv_size = sizeof(ConvolutionContext), diff --git a/libavfilter/vf_convolution_opencl.c b/libavfilter/vf_convolution_opencl.c index 00246b2e43..c6218d3cd6 100644 --- a/libavfilter/vf_convolution_opencl.c +++ b/libavfilter/vf_convolution_opencl.c @@ -362,7 +362,7 @@ static const AVOption convolution_opencl_options[] = { AVFILTER_DEFINE_CLASS(convolution_opencl); -AVFilter ff_vf_convolution_opencl = { +const AVFilter ff_vf_convolution_opencl = { .name = "convolution_opencl", .description = NULL_IF_CONFIG_SMALL("Apply convolution mask to input video"), .priv_size = sizeof(ConvolutionOpenCLContext), @@ -388,7 +388,7 @@ static const AVOption sobel_opencl_options[] = { AVFILTER_DEFINE_CLASS(sobel_opencl); -AVFilter ff_vf_sobel_opencl = { +const AVFilter ff_vf_sobel_opencl = { .name = "sobel_opencl", .description = NULL_IF_CONFIG_SMALL("Apply sobel operator"), .priv_size = sizeof(ConvolutionOpenCLContext), @@ -414,7 +414,7 @@ static const AVOption prewitt_opencl_options[] = { AVFILTER_DEFINE_CLASS(prewitt_opencl); -AVFilter ff_vf_prewitt_opencl = { +const AVFilter ff_vf_prewitt_opencl = { .name = "prewitt_opencl", .description = NULL_IF_CONFIG_SMALL("Apply prewitt operator"), .priv_size = sizeof(ConvolutionOpenCLContext), @@ -440,7 +440,7 @@ static const AVOption roberts_opencl_options[] = { AVFILTER_DEFINE_CLASS(roberts_opencl); -AVFilter ff_vf_roberts_opencl = { +const AVFilter ff_vf_roberts_opencl = { .name = "roberts_opencl", .description = NULL_IF_CONFIG_SMALL("Apply roberts operator"), .priv_size = sizeof(ConvolutionOpenCLContext), diff --git a/libavfilter/vf_convolve.c b/libavfilter/vf_convolve.c index 90ec98715b..a0066bbd39 100644 --- a/libavfilter/vf_convolve.c +++ b/libavfilter/vf_convolve.c @@ -625,7 +625,7 @@ static const AVFilterPad convolve_outputs[] = { FRAMESYNC_DEFINE_CLASS(convolve, ConvolveContext, fs); -AVFilter ff_vf_convolve = { +const AVFilter ff_vf_convolve = { .name = "convolve", .description = NULL_IF_CONFIG_SMALL("Convolve first video stream with second video stream."), .preinit = convolve_framesync_preinit, @@ -655,7 +655,7 @@ static const AVOption deconvolve_options[] = { FRAMESYNC_DEFINE_CLASS(deconvolve, ConvolveContext, fs); -AVFilter ff_vf_deconvolve = { +const AVFilter ff_vf_deconvolve = { .name = "deconvolve", .description = NULL_IF_CONFIG_SMALL("Deconvolve first video stream with second video stream."), .preinit = deconvolve_framesync_preinit, diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c index 78bb5109e5..f50ac70c92 100644 --- a/libavfilter/vf_copy.c +++ b/libavfilter/vf_copy.c @@ -81,7 +81,7 @@ static const AVFilterPad avfilter_vf_copy_outputs[] = { { NULL } }; -AVFilter ff_vf_copy = { +const AVFilter ff_vf_copy = { .name = "copy", .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), .inputs = avfilter_vf_copy_inputs, diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index cbd67791bc..98f6386124 100644 --- a/libavfilter/vf_coreimage.m +++ b/libavfilter/vf_coreimage.m @@ -656,7 +656,7 @@ static const AVOption coreimage_options[] = { AVFILTER_DEFINE_CLASS(coreimage); -AVFilter ff_vf_coreimage = { +const AVFilter ff_vf_coreimage = { .name = "coreimage", .description = NULL_IF_CONFIG_SMALL("Video filtering using CoreImage API."), .init = init, @@ -677,7 +677,7 @@ static const AVOption coreimagesrc_options[] = { AVFILTER_DEFINE_CLASS(coreimagesrc); -AVFilter ff_vsrc_coreimagesrc = { +const AVFilter ff_vsrc_coreimagesrc = { .name = "coreimagesrc", .description = NULL_IF_CONFIG_SMALL("Video source using image generators of CoreImage API."), .init = init_src, diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c index 898debf09d..26a0fb3a4d 100644 --- a/libavfilter/vf_cover_rect.c +++ b/libavfilter/vf_cover_rect.c @@ -248,7 +248,7 @@ static const AVFilterPad cover_rect_outputs[] = { { NULL } }; -AVFilter ff_vf_cover_rect = { +const AVFilter ff_vf_cover_rect = { .name = "cover_rect", .description = NULL_IF_CONFIG_SMALL("Find and cover a user specified object."), .priv_size = sizeof(CoverContext), diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index dffb6dab5e..9cc9ec2844 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -392,7 +392,7 @@ static const AVFilterPad avfilter_vf_crop_outputs[] = { { NULL } }; -AVFilter ff_vf_crop = { +const AVFilter ff_vf_crop = { .name = "crop", .description = NULL_IF_CONFIG_SMALL("Crop the input video."), .priv_size = sizeof(CropContext), diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index 5ae87cad2d..deeb9e480a 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -274,7 +274,7 @@ static const AVFilterPad avfilter_vf_cropdetect_outputs[] = { { NULL } }; -AVFilter ff_vf_cropdetect = { +const AVFilter ff_vf_cropdetect = { .name = "cropdetect", .description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."), .priv_size = sizeof(CropDetectContext), diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c index 3524fef1ad..64cfea1527 100644 --- a/libavfilter/vf_curves.c +++ b/libavfilter/vf_curves.c @@ -813,7 +813,7 @@ static const AVFilterPad curves_outputs[] = { { NULL } }; -AVFilter ff_vf_curves = { +const AVFilter ff_vf_curves = { .name = "curves", .description = NULL_IF_CONFIG_SMALL("Adjust components curves."), .priv_size = sizeof(CurvesContext), diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c index 88007c9265..3af22771b2 100644 --- a/libavfilter/vf_datascope.c +++ b/libavfilter/vf_datascope.c @@ -450,7 +450,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_datascope = { +const AVFilter ff_vf_datascope = { .name = "datascope", .description = NULL_IF_CONFIG_SMALL("Video data analysis."), .priv_size = sizeof(DatascopeContext), @@ -739,7 +739,7 @@ static const AVFilterPad pixscope_outputs[] = { { NULL } }; -AVFilter ff_vf_pixscope = { +const AVFilter ff_vf_pixscope = { .name = "pixscope", .description = NULL_IF_CONFIG_SMALL("Pixel data analysis."), .priv_size = sizeof(PixscopeContext), @@ -1145,7 +1145,7 @@ static const AVFilterPad oscilloscope_outputs[] = { { NULL } }; -AVFilter ff_vf_oscilloscope = { +const AVFilter ff_vf_oscilloscope = { .name = "oscilloscope", .description = NULL_IF_CONFIG_SMALL("2D Video Oscilloscope."), .priv_size = sizeof(OscilloscopeContext), diff --git a/libavfilter/vf_dblur.c b/libavfilter/vf_dblur.c index c4c37dec52..dcb6635c95 100644 --- a/libavfilter/vf_dblur.c +++ b/libavfilter/vf_dblur.c @@ -292,7 +292,7 @@ static const AVFilterPad dblur_outputs[] = { { NULL } }; -AVFilter ff_vf_dblur = { +const AVFilter ff_vf_dblur = { .name = "dblur", .description = NULL_IF_CONFIG_SMALL("Apply Directional Blur filter."), .priv_size = sizeof(DBlurContext), diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c index a89f2631c8..63b1b29ea2 100644 --- a/libavfilter/vf_dctdnoiz.c +++ b/libavfilter/vf_dctdnoiz.c @@ -822,7 +822,7 @@ static const AVFilterPad dctdnoiz_outputs[] = { { NULL } }; -AVFilter ff_vf_dctdnoiz = { +const AVFilter ff_vf_dctdnoiz = { .name = "dctdnoiz", .description = NULL_IF_CONFIG_SMALL("Denoise frames using 2D DCT."), .priv_size = sizeof(DCTdnoizContext), diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c index c05225d2b8..aa560bd9fb 100644 --- a/libavfilter/vf_deband.c +++ b/libavfilter/vf_deband.c @@ -471,7 +471,7 @@ static const AVFilterPad avfilter_vf_deband_outputs[] = { { NULL } }; -AVFilter ff_vf_deband = { +const AVFilter ff_vf_deband = { .name = "deband", .description = NULL_IF_CONFIG_SMALL("Debands video."), .priv_size = sizeof(DebandContext), diff --git a/libavfilter/vf_deblock.c b/libavfilter/vf_deblock.c index 0671a64548..2d91fe358b 100644 --- a/libavfilter/vf_deblock.c +++ b/libavfilter/vf_deblock.c @@ -415,7 +415,7 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(deblock); -AVFilter ff_vf_deblock = { +const AVFilter ff_vf_deblock = { .name = "deblock", .description = NULL_IF_CONFIG_SMALL("Deblock video."), .priv_size = sizeof(DeblockContext), diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index a76711f265..72ed349427 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -434,7 +434,7 @@ static const AVFilterPad decimate_outputs[] = { { NULL } }; -AVFilter ff_vf_decimate = { +const AVFilter ff_vf_decimate = { .name = "decimate", .description = NULL_IF_CONFIG_SMALL("Decimate frames (post field matching filter)."), .init = decimate_init, diff --git a/libavfilter/vf_dedot.c b/libavfilter/vf_dedot.c index 993ac8f74f..b79d4a51c4 100644 --- a/libavfilter/vf_dedot.c +++ b/libavfilter/vf_dedot.c @@ -401,7 +401,7 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(dedot); -AVFilter ff_vf_dedot = { +const AVFilter ff_vf_dedot = { .name = "dedot", .description = NULL_IF_CONFIG_SMALL("Reduce cross-luminance and cross-color."), .priv_size = sizeof(DedotContext), diff --git a/libavfilter/vf_deflicker.c b/libavfilter/vf_deflicker.c index 544672dd70..1ce8a482e8 100644 --- a/libavfilter/vf_deflicker.c +++ b/libavfilter/vf_deflicker.c @@ -466,7 +466,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_deflicker = { +const AVFilter ff_vf_deflicker = { .name = "deflicker", .description = NULL_IF_CONFIG_SMALL("Remove temporal frame luminance variations."), .priv_size = sizeof(DeflickerContext), diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c index 34feb616ab..3c2d87c7c8 100644 --- a/libavfilter/vf_deinterlace_qsv.c +++ b/libavfilter/vf_deinterlace_qsv.c @@ -594,7 +594,7 @@ static const AVFilterPad qsvdeint_outputs[] = { { NULL } }; -AVFilter ff_vf_deinterlace_qsv = { +const AVFilter ff_vf_deinterlace_qsv = { .name = "deinterlace_qsv", .description = NULL_IF_CONFIG_SMALL("QuickSync video deinterlacing"), diff --git a/libavfilter/vf_deinterlace_vaapi.c b/libavfilter/vf_deinterlace_vaapi.c index 71809eb01a..0e645f50f2 100644 --- a/libavfilter/vf_deinterlace_vaapi.c +++ b/libavfilter/vf_deinterlace_vaapi.c @@ -383,7 +383,7 @@ static const AVFilterPad deint_vaapi_outputs[] = { { NULL } }; -AVFilter ff_vf_deinterlace_vaapi = { +const AVFilter ff_vf_deinterlace_vaapi = { .name = "deinterlace_vaapi", .description = NULL_IF_CONFIG_SMALL("Deinterlacing of VAAPI surfaces"), .priv_size = sizeof(DeintVAAPIContext), diff --git a/libavfilter/vf_dejudder.c b/libavfilter/vf_dejudder.c index 4705cb6121..5816f82322 100644 --- a/libavfilter/vf_dejudder.c +++ b/libavfilter/vf_dejudder.c @@ -175,7 +175,7 @@ static const AVFilterPad dejudder_outputs[] = { { NULL } }; -AVFilter ff_vf_dejudder = { +const AVFilter ff_vf_dejudder = { .name = "dejudder", .description = NULL_IF_CONFIG_SMALL("Remove judder produced by pullup."), .priv_size = sizeof(DejudderContext), diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 6069c30163..9838301702 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -398,7 +398,7 @@ static const AVFilterPad avfilter_vf_delogo_outputs[] = { { NULL } }; -AVFilter ff_vf_delogo = { +const AVFilter ff_vf_delogo = { .name = "delogo", .description = NULL_IF_CONFIG_SMALL("Remove logo from input video."), .priv_size = sizeof(DelogoContext), diff --git a/libavfilter/vf_derain.c b/libavfilter/vf_derain.c index 7814fc1e03..76c4ef414f 100644 --- a/libavfilter/vf_derain.c +++ b/libavfilter/vf_derain.c @@ -126,7 +126,7 @@ static const AVFilterPad derain_outputs[] = { { NULL } }; -AVFilter ff_vf_derain = { +const AVFilter ff_vf_derain = { .name = "derain", .description = NULL_IF_CONFIG_SMALL("Apply derain filter to the input."), .priv_size = sizeof(DRContext), diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index 8771399351..4ff6a94702 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -551,7 +551,7 @@ static const AVFilterPad deshake_outputs[] = { { NULL } }; -AVFilter ff_vf_deshake = { +const AVFilter ff_vf_deshake = { .name = "deshake", .description = NULL_IF_CONFIG_SMALL("Stabilize shaky video."), .priv_size = sizeof(DeshakeContext), diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c index 4f1bb09362..2fd682003f 100644 --- a/libavfilter/vf_deshake_opencl.c +++ b/libavfilter/vf_deshake_opencl.c @@ -2187,7 +2187,7 @@ static const AVOption deshake_opencl_options[] = { AVFILTER_DEFINE_CLASS(deshake_opencl); -AVFilter ff_vf_deshake_opencl = { +const AVFilter ff_vf_deshake_opencl = { .name = "deshake_opencl", .description = NULL_IF_CONFIG_SMALL("Feature-point based video stabilization filter"), .priv_size = sizeof(DeshakeOpenCLContext), diff --git a/libavfilter/vf_despill.c b/libavfilter/vf_despill.c index bf6c7ca2cb..e0990d7443 100644 --- a/libavfilter/vf_despill.c +++ b/libavfilter/vf_despill.c @@ -171,7 +171,7 @@ static const AVOption despill_options[] = { AVFILTER_DEFINE_CLASS(despill); -AVFilter ff_vf_despill = { +const AVFilter ff_vf_despill = { .name = "despill", .description = NULL_IF_CONFIG_SMALL("Despill video."), .priv_size = sizeof(DespillContext), diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c index f02f85d602..e345e3062a 100644 --- a/libavfilter/vf_detelecine.c +++ b/libavfilter/vf_detelecine.c @@ -372,7 +372,7 @@ static const AVFilterPad detelecine_outputs[] = { { NULL } }; -AVFilter ff_vf_detelecine = { +const AVFilter ff_vf_detelecine = { .name = "detelecine", .description = NULL_IF_CONFIG_SMALL("Apply an inverse telecine pattern."), .priv_size = sizeof(DetelecineContext), diff --git a/libavfilter/vf_displace.c b/libavfilter/vf_displace.c index e4c0330613..9c310e1740 100644 --- a/libavfilter/vf_displace.c +++ b/libavfilter/vf_displace.c @@ -400,7 +400,7 @@ static const AVFilterPad displace_outputs[] = { { NULL } }; -AVFilter ff_vf_displace = { +const AVFilter ff_vf_displace = { .name = "displace", .description = NULL_IF_CONFIG_SMALL("Displace pixels."), .priv_size = sizeof(DisplaceContext), diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c index 2ae692d62a..1dbe4f29a4 100644 --- a/libavfilter/vf_dnn_detect.c +++ b/libavfilter/vf_dnn_detect.c @@ -407,7 +407,7 @@ static const AVFilterPad dnn_detect_outputs[] = { { NULL } }; -AVFilter ff_vf_dnn_detect = { +const AVFilter ff_vf_dnn_detect = { .name = "dnn_detect", .description = NULL_IF_CONFIG_SMALL("Apply DNN detect filter to the input."), .priv_size = sizeof(DnnDetectContext), diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c index 88e95e8ae3..e05d59a649 100644 --- a/libavfilter/vf_dnn_processing.c +++ b/libavfilter/vf_dnn_processing.c @@ -444,7 +444,7 @@ static const AVFilterPad dnn_processing_outputs[] = { { NULL } }; -AVFilter ff_vf_dnn_processing = { +const AVFilter ff_vf_dnn_processing = { .name = "dnn_processing", .description = NULL_IF_CONFIG_SMALL("Apply DNN processing filter to the input."), .priv_size = sizeof(DnnProcessingContext), diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index 6151db4d22..2794fc2520 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -347,7 +347,7 @@ static const AVFilterPad drawbox_outputs[] = { { NULL } }; -AVFilter ff_vf_drawbox = { +const AVFilter ff_vf_drawbox = { .name = "drawbox", .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), .priv_size = sizeof(DrawBoxContext), @@ -481,7 +481,7 @@ static const AVFilterPad drawgrid_outputs[] = { { NULL } }; -AVFilter ff_vf_drawgrid = { +const AVFilter ff_vf_drawgrid = { .name = "drawgrid", .description = NULL_IF_CONFIG_SMALL("Draw a colored grid on the input video."), .priv_size = sizeof(DrawBoxContext), diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 7b1000e5bd..7ea057b812 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1565,7 +1565,7 @@ static const AVFilterPad avfilter_vf_drawtext_outputs[] = { { NULL } }; -AVFilter ff_vf_drawtext = { +const AVFilter ff_vf_drawtext = { .name = "drawtext", .description = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."), .priv_size = sizeof(DrawTextContext), diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index df8afbd532..e21d341fd2 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -431,7 +431,7 @@ static const AVFilterPad edgedetect_outputs[] = { { NULL } }; -AVFilter ff_vf_edgedetect = { +const AVFilter ff_vf_edgedetect = { .name = "edgedetect", .description = NULL_IF_CONFIG_SMALL("Detect and draw edge."), .priv_size = sizeof(EdgeDetectContext), diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c index 835b1dfe33..008f470068 100644 --- a/libavfilter/vf_elbg.c +++ b/libavfilter/vf_elbg.c @@ -253,7 +253,7 @@ static const AVFilterPad elbg_outputs[] = { { NULL } }; -AVFilter ff_vf_elbg = { +const AVFilter ff_vf_elbg = { .name = "elbg", .description = NULL_IF_CONFIG_SMALL("Apply posterize effect, using the ELBG algorithm."), .priv_size = sizeof(ELBGContext), diff --git a/libavfilter/vf_entropy.c b/libavfilter/vf_entropy.c index c7361c84a1..32f4bac95d 100644 --- a/libavfilter/vf_entropy.c +++ b/libavfilter/vf_entropy.c @@ -193,7 +193,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_entropy = { +const AVFilter ff_vf_entropy = { .name = "entropy", .description = NULL_IF_CONFIG_SMALL("Measure video frames entropy."), .priv_size = sizeof(EntropyContext), diff --git a/libavfilter/vf_epx.c b/libavfilter/vf_epx.c index 65b8975c23..731ba821a8 100644 --- a/libavfilter/vf_epx.c +++ b/libavfilter/vf_epx.c @@ -275,7 +275,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_epx = { +const AVFilter ff_vf_epx = { .name = "epx", .description = NULL_IF_CONFIG_SMALL("Scale the input using EPX algorithm."), .inputs = inputs, diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index 114781fcaf..7d740d501a 100644 --- a/libavfilter/vf_eq.c +++ b/libavfilter/vf_eq.c @@ -377,7 +377,7 @@ static const AVOption eq_options[] = { AVFILTER_DEFINE_CLASS(eq); -AVFilter ff_vf_eq = { +const AVFilter ff_vf_eq = { .name = "eq", .description = NULL_IF_CONFIG_SMALL("Adjust brightness, contrast, gamma, and saturation."), .priv_size = sizeof(EQContext), diff --git a/libavfilter/vf_estdif.c b/libavfilter/vf_estdif.c index abe90a1256..9dda604d3c 100644 --- a/libavfilter/vf_estdif.c +++ b/libavfilter/vf_estdif.c @@ -577,7 +577,7 @@ static const AVFilterPad estdif_outputs[] = { { NULL } }; -AVFilter ff_vf_estdif = { +const AVFilter ff_vf_estdif = { .name = "estdif", .description = NULL_IF_CONFIG_SMALL("Apply Edge Slope Tracing deinterlace."), .priv_size = sizeof(ESTDIFContext), diff --git a/libavfilter/vf_exposure.c b/libavfilter/vf_exposure.c index b7ad075630..5374a8396e 100644 --- a/libavfilter/vf_exposure.c +++ b/libavfilter/vf_exposure.c @@ -131,7 +131,7 @@ static const AVOption exposure_options[] = { AVFILTER_DEFINE_CLASS(exposure); -AVFilter ff_vf_exposure = { +const AVFilter ff_vf_exposure = { .name = "exposure", .description = NULL_IF_CONFIG_SMALL("Adjust exposure of the video stream."), .priv_size = sizeof(ExposureContext), diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c index 01ce4d1a3d..cede3d669e 100644 --- a/libavfilter/vf_extractplanes.c +++ b/libavfilter/vf_extractplanes.c @@ -379,7 +379,7 @@ static const AVFilterPad extractplanes_inputs[] = { { NULL } }; -AVFilter ff_vf_extractplanes = { +const AVFilter ff_vf_extractplanes = { .name = "extractplanes", .description = NULL_IF_CONFIG_SMALL("Extract planes as grayscale frames."), .priv_size = sizeof(ExtractPlanesContext), @@ -403,7 +403,7 @@ static av_cold int init_alphaextract(AVFilterContext *ctx) return init(ctx); } -AVFilter ff_vf_alphaextract = { +const AVFilter ff_vf_alphaextract = { .name = "alphaextract", .description = NULL_IF_CONFIG_SMALL("Extract an alpha channel as a " "grayscale image component."), diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index 10523fd18e..3c65b0f2ac 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -568,7 +568,7 @@ static const AVFilterPad avfilter_vf_fade_outputs[] = { { NULL } }; -AVFilter ff_vf_fade = { +const AVFilter ff_vf_fade = { .name = "fade", .description = NULL_IF_CONFIG_SMALL("Fade in/out input video."), .init = init, diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c index 856d716be5..7f4a6d88cf 100644 --- a/libavfilter/vf_fftdnoiz.c +++ b/libavfilter/vf_fftdnoiz.c @@ -685,7 +685,7 @@ static const AVFilterPad fftdnoiz_outputs[] = { { NULL } }; -AVFilter ff_vf_fftdnoiz = { +const AVFilter ff_vf_fftdnoiz = { .name = "fftdnoiz", .description = NULL_IF_CONFIG_SMALL("Denoise frames using 3D FFT."), .priv_size = sizeof(FFTdnoizContext), diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c index d091cd830d..bcef9ff7d2 100644 --- a/libavfilter/vf_fftfilt.c +++ b/libavfilter/vf_fftfilt.c @@ -428,7 +428,7 @@ static const AVFilterPad fftfilt_outputs[] = { { NULL } }; -AVFilter ff_vf_fftfilt = { +const AVFilter ff_vf_fftfilt = { .name = "fftfilt", .description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to pixels in frequency domain."), .priv_size = sizeof(FFTFILTContext), diff --git a/libavfilter/vf_field.c b/libavfilter/vf_field.c index 2f4eb679ea..555e615d2e 100644 --- a/libavfilter/vf_field.c +++ b/libavfilter/vf_field.c @@ -101,7 +101,7 @@ static const AVFilterPad field_outputs[] = { { NULL } }; -AVFilter ff_vf_field = { +const AVFilter ff_vf_field = { .name = "field", .description = NULL_IF_CONFIG_SMALL("Extract a field from the input video."), .priv_size = sizeof(FieldContext), diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c index dcd08dabc3..a6c0237f02 100644 --- a/libavfilter/vf_fieldhint.c +++ b/libavfilter/vf_fieldhint.c @@ -296,7 +296,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_fieldhint = { +const AVFilter ff_vf_fieldhint = { .name = "fieldhint", .description = NULL_IF_CONFIG_SMALL("Field matching using hints."), .priv_size = sizeof(FieldHintContext), diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index 528f943172..9626737b40 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -1040,7 +1040,7 @@ static const AVFilterPad fieldmatch_outputs[] = { { NULL } }; -AVFilter ff_vf_fieldmatch = { +const AVFilter ff_vf_fieldmatch = { .name = "fieldmatch", .description = NULL_IF_CONFIG_SMALL("Field matching for inverse telecine."), .query_formats = query_formats, diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index 5d97dc58df..eefa417fb3 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -184,7 +184,7 @@ static const AVFilterPad avfilter_vf_fieldorder_outputs[] = { { NULL } }; -AVFilter ff_vf_fieldorder = { +const AVFilter ff_vf_fieldorder = { .name = "fieldorder", .description = NULL_IF_CONFIG_SMALL("Set the field order."), .priv_size = sizeof(FieldOrderContext), diff --git a/libavfilter/vf_fillborders.c b/libavfilter/vf_fillborders.c index d703cbe4b6..36b96f9e51 100644 --- a/libavfilter/vf_fillborders.c +++ b/libavfilter/vf_fillborders.c @@ -628,7 +628,7 @@ static const AVFilterPad fillborders_outputs[] = { { NULL } }; -AVFilter ff_vf_fillborders = { +const AVFilter ff_vf_fillborders = { .name = "fillborders", .description = NULL_IF_CONFIG_SMALL("Fill borders of the input video."), .priv_size = sizeof(FillBordersContext), diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c index 5f3abf66c6..1a94655b6b 100644 --- a/libavfilter/vf_find_rect.c +++ b/libavfilter/vf_find_rect.c @@ -303,7 +303,7 @@ static const AVFilterPad foc_outputs[] = { { NULL } }; -AVFilter ff_vf_find_rect = { +const AVFilter ff_vf_find_rect = { .name = "find_rect", .description = NULL_IF_CONFIG_SMALL("Find a user specified object."), .priv_size = sizeof(FOCContext), diff --git a/libavfilter/vf_floodfill.c b/libavfilter/vf_floodfill.c index 11c614a089..3b17b04c61 100644 --- a/libavfilter/vf_floodfill.c +++ b/libavfilter/vf_floodfill.c @@ -420,7 +420,7 @@ static const AVOption floodfill_options[] = { AVFILTER_DEFINE_CLASS(floodfill); -AVFilter ff_vf_floodfill = { +const AVFilter ff_vf_floodfill = { .name = "floodfill", .description = NULL_IF_CONFIG_SMALL("Fill area with same color with another color."), .priv_size = sizeof(FloodfillContext), diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index a57c99d797..960d4b0acf 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -166,7 +166,7 @@ static const AVFilterPad avfilter_vf_format_outputs[] = { { NULL } }; -AVFilter ff_vf_format = { +const AVFilter ff_vf_format = { .name = "format", .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."), @@ -205,7 +205,7 @@ static const AVFilterPad avfilter_vf_noformat_outputs[] = { { NULL } }; -AVFilter ff_vf_noformat = { +const AVFilter ff_vf_noformat = { .name = "noformat", .description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."), diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index cf1e36726a..b7b2d6f2db 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -343,7 +343,7 @@ static const AVFilterPad avfilter_vf_fps_outputs[] = { { NULL } }; -AVFilter ff_vf_fps = { +const AVFilter ff_vf_fps = { .name = "fps", .description = NULL_IF_CONFIG_SMALL("Force constant framerate."), .init = init, diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index 3da80cfeef..4fa9b4d144 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -469,7 +469,7 @@ static const AVFilterPad framepack_outputs[] = { { NULL } }; -AVFilter ff_vf_framepack = { +const AVFilter ff_vf_framepack = { .name = "framepack", .description = NULL_IF_CONFIG_SMALL("Generate a frame packed stereoscopic video."), .priv_size = sizeof(FramepackContext), diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c index f5085705a4..6b509443a6 100644 --- a/libavfilter/vf_framerate.c +++ b/libavfilter/vf_framerate.c @@ -441,7 +441,7 @@ static const AVFilterPad framerate_outputs[] = { { NULL } }; -AVFilter ff_vf_framerate = { +const AVFilter ff_vf_framerate = { .name = "framerate", .description = NULL_IF_CONFIG_SMALL("Upsamples or downsamples progressive source between specified frame rates."), .priv_size = sizeof(FrameRateContext), diff --git a/libavfilter/vf_framestep.c b/libavfilter/vf_framestep.c index 8102e7c719..d61ce0dc56 100644 --- a/libavfilter/vf_framestep.c +++ b/libavfilter/vf_framestep.c @@ -89,7 +89,7 @@ static const AVFilterPad framestep_outputs[] = { { NULL } }; -AVFilter ff_vf_framestep = { +const AVFilter ff_vf_framestep = { .name = "framestep", .description = NULL_IF_CONFIG_SMALL("Select one frame every N frames."), .priv_size = sizeof(FrameStepContext), diff --git a/libavfilter/vf_freezedetect.c b/libavfilter/vf_freezedetect.c index cc086afee6..d5978ae3aa 100644 --- a/libavfilter/vf_freezedetect.c +++ b/libavfilter/vf_freezedetect.c @@ -222,7 +222,7 @@ static const AVFilterPad freezedetect_outputs[] = { { NULL } }; -AVFilter ff_vf_freezedetect = { +const AVFilter ff_vf_freezedetect = { .name = "freezedetect", .description = NULL_IF_CONFIG_SMALL("Detects frozen video input."), .priv_size = sizeof(FreezeDetectContext), diff --git a/libavfilter/vf_freezeframes.c b/libavfilter/vf_freezeframes.c index b6cd5dba68..58ffd9dd33 100644 --- a/libavfilter/vf_freezeframes.c +++ b/libavfilter/vf_freezeframes.c @@ -155,7 +155,7 @@ static const AVFilterPad freezeframes_outputs[] = { { NULL }, }; -AVFilter ff_vf_freezeframes = { +const AVFilter ff_vf_freezeframes = { .name = "freezeframes", .description = NULL_IF_CONFIG_SMALL("Freeze video frames."), .priv_size = sizeof(FreezeFramesContext), diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 2ec4707d97..00e5ff2444 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -413,7 +413,7 @@ static const AVFilterPad avfilter_vf_frei0r_outputs[] = { { NULL } }; -AVFilter ff_vf_frei0r = { +const AVFilter ff_vf_frei0r = { .name = "frei0r", .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."), .query_formats = query_formats, @@ -501,7 +501,7 @@ static const AVFilterPad avfilter_vsrc_frei0r_src_outputs[] = { { NULL } }; -AVFilter ff_vsrc_frei0r_src = { +const AVFilter ff_vsrc_frei0r_src = { .name = "frei0r_src", .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."), .priv_size = sizeof(Frei0rContext), diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c index d70952a142..d14c05cb5e 100644 --- a/libavfilter/vf_fspp.c +++ b/libavfilter/vf_fspp.c @@ -668,7 +668,7 @@ static const AVFilterPad fspp_outputs[] = { { NULL } }; -AVFilter ff_vf_fspp = { +const AVFilter ff_vf_fspp = { .name = "fspp", .description = NULL_IF_CONFIG_SMALL("Apply Fast Simple Post-processing filter."), .priv_size = sizeof(FSPPContext), diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c index 86c765b591..3f61275658 100644 --- a/libavfilter/vf_gblur.c +++ b/libavfilter/vf_gblur.c @@ -393,7 +393,7 @@ static const AVFilterPad gblur_outputs[] = { { NULL } }; -AVFilter ff_vf_gblur = { +const AVFilter ff_vf_gblur = { .name = "gblur", .description = NULL_IF_CONFIG_SMALL("Apply Gaussian Blur filter."), .priv_size = sizeof(GBlurContext), diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index 072cef3ca3..d9bb6ac256 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -492,7 +492,7 @@ static const AVFilterPad geq_outputs[] = { { NULL } }; -AVFilter ff_vf_geq = { +const AVFilter ff_vf_geq = { .name = "geq", .description = NULL_IF_CONFIG_SMALL("Apply generic equation to each pixel."), .priv_size = sizeof(GEQContext), diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index 28da37ff93..5284b1d745 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -252,7 +252,7 @@ static const AVFilterPad avfilter_vf_gradfun_outputs[] = { { NULL } }; -AVFilter ff_vf_gradfun = { +const AVFilter ff_vf_gradfun = { .name = "gradfun", .description = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."), .priv_size = sizeof(GradFunContext), diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index 8d7bd9b4db..2a0defda6c 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -245,7 +245,7 @@ static const AVFilterPad avfilter_vf_hflip_outputs[] = { { NULL } }; -AVFilter ff_vf_hflip = { +const AVFilter ff_vf_hflip = { .name = "hflip", .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."), .priv_size = sizeof(FlipContext), diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c index 2449e10dea..dea819e672 100644 --- a/libavfilter/vf_histeq.c +++ b/libavfilter/vf_histeq.c @@ -270,7 +270,7 @@ static const AVFilterPad histeq_outputs[] = { { NULL } }; -AVFilter ff_vf_histeq = { +const AVFilter ff_vf_histeq = { .name = "histeq", .description = NULL_IF_CONFIG_SMALL("Apply global color histogram equalization."), .priv_size = sizeof(HisteqContext), diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c index ed6892bc8b..0862b2ae2a 100644 --- a/libavfilter/vf_histogram.c +++ b/libavfilter/vf_histogram.c @@ -503,7 +503,7 @@ static const AVFilterPad outputs[] = { #if CONFIG_HISTOGRAM_FILTER -AVFilter ff_vf_histogram = { +const AVFilter ff_vf_histogram = { .name = "histogram", .description = NULL_IF_CONFIG_SMALL("Compute and draw a histogram."), .priv_size = sizeof(HistogramContext), @@ -545,7 +545,7 @@ static const AVOption thistogram_options[] = { AVFILTER_DEFINE_CLASS(thistogram); -AVFilter ff_vf_thistogram = { +const AVFilter ff_vf_thistogram = { .name = "thistogram", .description = NULL_IF_CONFIG_SMALL("Compute and draw a temporal histogram."), .priv_size = sizeof(HistogramContext), diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 803f90c28c..8d71ae316d 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -398,7 +398,7 @@ static const AVFilterPad avfilter_vf_hqdn3d_outputs[] = { { NULL } }; -AVFilter ff_vf_hqdn3d = { +const AVFilter ff_vf_hqdn3d = { .name = "hqdn3d", .description = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."), .priv_size = sizeof(HQDN3DContext), diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c index 4f768c7a13..8b0d794b6e 100644 --- a/libavfilter/vf_hqx.c +++ b/libavfilter/vf_hqx.c @@ -553,7 +553,7 @@ static const AVFilterPad hqx_outputs[] = { { NULL } }; -AVFilter ff_vf_hqx = { +const AVFilter ff_vf_hqx = { .name = "hqx", .description = NULL_IF_CONFIG_SMALL("Scale the input by 2, 3 or 4 using the hq*x magnification algorithm."), .priv_size = sizeof(HQXContext), diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index 1499c05cbd..3d250dbe25 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -516,7 +516,7 @@ static const AVFilterPad hue_outputs[] = { { NULL } }; -AVFilter ff_vf_hue = { +const AVFilter ff_vf_hue = { .name = "hue", .description = NULL_IF_CONFIG_SMALL("Adjust the hue and saturation of the input video."), .priv_size = sizeof(HueContext), diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c index c5c760afda..4a8fed0688 100644 --- a/libavfilter/vf_hwdownload.c +++ b/libavfilter/vf_hwdownload.c @@ -192,7 +192,7 @@ static const AVFilterPad hwdownload_outputs[] = { { NULL } }; -AVFilter ff_vf_hwdownload = { +const AVFilter ff_vf_hwdownload = { .name = "hwdownload", .description = NULL_IF_CONFIG_SMALL("Download a hardware frame to a normal frame"), .uninit = hwdownload_uninit, diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index a89f69cbec..d829b47b44 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -419,7 +419,7 @@ static const AVFilterPad hwmap_outputs[] = { { NULL } }; -AVFilter ff_vf_hwmap = { +const AVFilter ff_vf_hwmap = { .name = "hwmap", .description = NULL_IF_CONFIG_SMALL("Map hardware frames"), .uninit = hwmap_uninit, diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c index 7f2aa90af3..8263829a39 100644 --- a/libavfilter/vf_hwupload.c +++ b/libavfilter/vf_hwupload.c @@ -250,7 +250,7 @@ static const AVFilterPad hwupload_outputs[] = { { NULL } }; -AVFilter ff_vf_hwupload = { +const AVFilter ff_vf_hwupload = { .name = "hwupload", .description = NULL_IF_CONFIG_SMALL("Upload a normal frame to a hardware frame"), .uninit = hwupload_uninit, diff --git a/libavfilter/vf_hwupload_cuda.c b/libavfilter/vf_hwupload_cuda.c index afc1b265ed..138949a5ed 100644 --- a/libavfilter/vf_hwupload_cuda.c +++ b/libavfilter/vf_hwupload_cuda.c @@ -183,7 +183,7 @@ static const AVFilterPad cudaupload_outputs[] = { { NULL } }; -AVFilter ff_vf_hwupload_cuda = { +const AVFilter ff_vf_hwupload_cuda = { .name = "hwupload_cuda", .description = NULL_IF_CONFIG_SMALL("Upload a system memory frame to a CUDA device."), diff --git a/libavfilter/vf_hysteresis.c b/libavfilter/vf_hysteresis.c index 48e9179f42..3732ed5c22 100644 --- a/libavfilter/vf_hysteresis.c +++ b/libavfilter/vf_hysteresis.c @@ -374,7 +374,7 @@ static const AVFilterPad hysteresis_outputs[] = { { NULL } }; -AVFilter ff_vf_hysteresis = { +const AVFilter ff_vf_hysteresis = { .name = "hysteresis", .description = NULL_IF_CONFIG_SMALL("Grow first stream into second stream by connecting components."), .preinit = hysteresis_framesync_preinit, diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c index 60d02e328b..4e0a44d518 100644 --- a/libavfilter/vf_identity.c +++ b/libavfilter/vf_identity.c @@ -413,7 +413,7 @@ static const AVOption options[] = { #define identity_options options FRAMESYNC_DEFINE_CLASS(identity, IdentityContext, fs); -AVFilter ff_vf_identity = { +const AVFilter ff_vf_identity = { .name = "identity", .description = NULL_IF_CONFIG_SMALL("Calculate the Identity between two video streams."), .preinit = identity_framesync_preinit, @@ -435,7 +435,7 @@ AVFilter ff_vf_identity = { #define msad_options options FRAMESYNC_DEFINE_CLASS(msad, IdentityContext, fs); -AVFilter ff_vf_msad = { +const AVFilter ff_vf_msad = { .name = "msad", .description = NULL_IF_CONFIG_SMALL("Calculate the MSAD between two video streams."), .preinit = msad_framesync_preinit, diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 02ae2edcb9..eadc24a275 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -441,7 +441,7 @@ static const AVFilterPad idet_outputs[] = { { NULL } }; -AVFilter ff_vf_idet = { +const AVFilter ff_vf_idet = { .name = "idet", .description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."), .priv_size = sizeof(IDETContext), diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c index 46af57f96e..9b21f2e7a7 100644 --- a/libavfilter/vf_il.c +++ b/libavfilter/vf_il.c @@ -198,7 +198,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_il = { +const AVFilter ff_vf_il = { .name = "il", .description = NULL_IF_CONFIG_SMALL("Deinterleave or interleave fields."), .priv_size = sizeof(IlContext), diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c index 057d15f9cb..a86407beb0 100644 --- a/libavfilter/vf_kerndeint.c +++ b/libavfilter/vf_kerndeint.c @@ -307,7 +307,7 @@ static const AVFilterPad kerndeint_outputs[] = { }; -AVFilter ff_vf_kerndeint = { +const AVFilter ff_vf_kerndeint = { .name = "kerndeint", .description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."), .priv_size = sizeof(KerndeintContext), diff --git a/libavfilter/vf_lagfun.c b/libavfilter/vf_lagfun.c index 36b19b3f83..e147479671 100644 --- a/libavfilter/vf_lagfun.c +++ b/libavfilter/vf_lagfun.c @@ -219,7 +219,7 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(lagfun); -AVFilter ff_vf_lagfun = { +const AVFilter ff_vf_lagfun = { .name = "lagfun", .description = NULL_IF_CONFIG_SMALL("Slowly update darker pixels."), .priv_size = sizeof(LagfunContext), diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c index 9386f795da..7bd008d3d8 100644 --- a/libavfilter/vf_lenscorrection.c +++ b/libavfilter/vf_lenscorrection.c @@ -357,7 +357,7 @@ static const AVFilterPad lenscorrection_outputs[] = { { NULL } }; -AVFilter ff_vf_lenscorrection = { +const AVFilter ff_vf_lenscorrection = { .name = "lenscorrection", .description = NULL_IF_CONFIG_SMALL("Rectify the image by correcting for lens distortion."), .priv_size = sizeof(LenscorrectionCtx), diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c index 430daa941b..e9bb69187e 100644 --- a/libavfilter/vf_lensfun.c +++ b/libavfilter/vf_lensfun.c @@ -536,7 +536,7 @@ static const AVFilterPad lensfun_outputs[] = { { NULL } }; -AVFilter ff_vf_lensfun = { +const AVFilter ff_vf_lensfun = { .name = "lensfun", .description = NULL_IF_CONFIG_SMALL("Apply correction to an image based on info derived from the lensfun database."), .priv_size = sizeof(LensfunContext), diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index 8128030b8c..221a8ac4c2 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -427,7 +427,7 @@ static const AVFilterPad avfilter_vf_ocv_outputs[] = { { NULL } }; -AVFilter ff_vf_ocv = { +const AVFilter ff_vf_ocv = { .name = "ocv", .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."), .priv_size = sizeof(OCVContext), diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c index 4d49127efc..d2621c7a9f 100644 --- a/libavfilter/vf_libvmaf.c +++ b/libavfilter/vf_libvmaf.c @@ -365,7 +365,7 @@ static const AVFilterPad libvmaf_outputs[] = { { NULL } }; -AVFilter ff_vf_libvmaf = { +const AVFilter ff_vf_libvmaf = { .name = "libvmaf", .description = NULL_IF_CONFIG_SMALL("Calculate the VMAF between two video streams."), .preinit = libvmaf_framesync_preinit, diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c index 1779c63944..04bfbb63d1 100644 --- a/libavfilter/vf_limiter.c +++ b/libavfilter/vf_limiter.c @@ -260,7 +260,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_limiter = { +const AVFilter ff_vf_limiter = { .name = "limiter", .description = NULL_IF_CONFIG_SMALL("Limit pixels components to the specified range."), .priv_size = sizeof(LimiterContext), diff --git a/libavfilter/vf_lumakey.c b/libavfilter/vf_lumakey.c index c182e9045b..3f98d5077d 100644 --- a/libavfilter/vf_lumakey.c +++ b/libavfilter/vf_lumakey.c @@ -205,7 +205,7 @@ static const AVOption lumakey_options[] = { AVFILTER_DEFINE_CLASS(lumakey); -AVFilter ff_vf_lumakey = { +const AVFilter ff_vf_lumakey = { .name = "lumakey", .description = NULL_IF_CONFIG_SMALL("Turns a certain luma into transparency."), .priv_size = sizeof(LumakeyContext), diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index 1a94e1cf71..47c2416da7 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -593,7 +593,7 @@ static const AVFilterPad outputs[] = { }; #define DEFINE_LUT_FILTER(name_, description_) \ - AVFilter ff_vf_##name_ = { \ + const AVFilter ff_vf_##name_ = { \ .name = #name_, \ .description = NULL_IF_CONFIG_SMALL(description_), \ .priv_size = sizeof(LutContext), \ diff --git a/libavfilter/vf_lut2.c b/libavfilter/vf_lut2.c index 8de8e11fc0..658a0bfa56 100644 --- a/libavfilter/vf_lut2.c +++ b/libavfilter/vf_lut2.c @@ -560,7 +560,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar FRAMESYNC_DEFINE_CLASS(lut2, LUT2Context, fs); -AVFilter ff_vf_lut2 = { +const AVFilter ff_vf_lut2 = { .name = "lut2", .description = NULL_IF_CONFIG_SMALL("Compute and apply a lookup table from two video inputs."), .preinit = lut2_framesync_preinit, @@ -652,7 +652,7 @@ static const AVFilterPad tlut2_outputs[] = { { NULL } }; -AVFilter ff_vf_tlut2 = { +const AVFilter ff_vf_tlut2 = { .name = "tlut2", .description = NULL_IF_CONFIG_SMALL("Compute and apply a lookup table from two successive frames."), .priv_size = sizeof(LUT2Context), diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c index 8b1aeb75e7..c86585cf09 100644 --- a/libavfilter/vf_lut3d.c +++ b/libavfilter/vf_lut3d.c @@ -1353,7 +1353,7 @@ static const AVFilterPad lut3d_outputs[] = { { NULL } }; -AVFilter ff_vf_lut3d = { +const AVFilter ff_vf_lut3d = { .name = "lut3d", .description = NULL_IF_CONFIG_SMALL("Adjust colors using a 3D LUT."), .priv_size = sizeof(LUT3DContext), @@ -1620,7 +1620,7 @@ static const AVFilterPad haldclut_outputs[] = { { NULL } }; -AVFilter ff_vf_haldclut = { +const AVFilter ff_vf_haldclut = { .name = "haldclut", .description = NULL_IF_CONFIG_SMALL("Adjust colors using a Hald CLUT."), .priv_size = sizeof(LUT3DContext), @@ -2285,7 +2285,7 @@ static const AVFilterPad lut1d_outputs[] = { { NULL } }; -AVFilter ff_vf_lut1d = { +const AVFilter ff_vf_lut1d = { .name = "lut1d", .description = NULL_IF_CONFIG_SMALL("Adjust colors using a 1D LUT."), .priv_size = sizeof(LUT1DContext), diff --git a/libavfilter/vf_maskedclamp.c b/libavfilter/vf_maskedclamp.c index af2793b55d..050e3ae6e4 100644 --- a/libavfilter/vf_maskedclamp.c +++ b/libavfilter/vf_maskedclamp.c @@ -316,7 +316,7 @@ static const AVFilterPad maskedclamp_outputs[] = { { NULL } }; -AVFilter ff_vf_maskedclamp = { +const AVFilter ff_vf_maskedclamp = { .name = "maskedclamp", .description = NULL_IF_CONFIG_SMALL("Clamp first stream with second stream and third stream."), .priv_size = sizeof(MaskedClampContext), diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c index 2f83fb5dc1..28ac0dd52d 100644 --- a/libavfilter/vf_maskedmerge.c +++ b/libavfilter/vf_maskedmerge.c @@ -317,7 +317,7 @@ static const AVFilterPad maskedmerge_outputs[] = { { NULL } }; -AVFilter ff_vf_maskedmerge = { +const AVFilter ff_vf_maskedmerge = { .name = "maskedmerge", .description = NULL_IF_CONFIG_SMALL("Merge first stream with second stream using third stream as mask."), .priv_size = sizeof(MaskedMergeContext), diff --git a/libavfilter/vf_maskedminmax.c b/libavfilter/vf_maskedminmax.c index 90140827a3..0d79fc177f 100644 --- a/libavfilter/vf_maskedminmax.c +++ b/libavfilter/vf_maskedminmax.c @@ -328,7 +328,7 @@ static const AVFilterPad maskedminmax_outputs[] = { #define maskedmin_options maskedminmax_options AVFILTER_DEFINE_CLASS(maskedmin); -AVFilter ff_vf_maskedmin = { +const AVFilter ff_vf_maskedmin = { .name = "maskedmin", .description = NULL_IF_CONFIG_SMALL("Apply filtering with minimum difference of two streams."), .priv_class = &maskedmin_class, @@ -346,7 +346,7 @@ AVFilter ff_vf_maskedmin = { #define maskedmax_options maskedminmax_options AVFILTER_DEFINE_CLASS(maskedmax); -AVFilter ff_vf_maskedmax = { +const AVFilter ff_vf_maskedmax = { .name = "maskedmax", .description = NULL_IF_CONFIG_SMALL("Apply filtering with maximum difference of two streams."), .priv_class = &maskedmax_class, diff --git a/libavfilter/vf_maskedthreshold.c b/libavfilter/vf_maskedthreshold.c index 5a6ebb1a07..518ab54546 100644 --- a/libavfilter/vf_maskedthreshold.c +++ b/libavfilter/vf_maskedthreshold.c @@ -284,7 +284,7 @@ static const AVFilterPad maskedthreshold_outputs[] = { AVFILTER_DEFINE_CLASS(maskedthreshold); -AVFilter ff_vf_maskedthreshold = { +const AVFilter ff_vf_maskedthreshold = { .name = "maskedthreshold", .description = NULL_IF_CONFIG_SMALL("Pick pixels comparing absolute difference of two streams with threshold."), .priv_class = &maskedthreshold_class, diff --git a/libavfilter/vf_maskfun.c b/libavfilter/vf_maskfun.c index 55a4c57c9d..0f3e3545b3 100644 --- a/libavfilter/vf_maskfun.c +++ b/libavfilter/vf_maskfun.c @@ -309,7 +309,7 @@ static const AVFilterPad maskfun_outputs[] = { { NULL } }; -AVFilter ff_vf_maskfun = { +const AVFilter ff_vf_maskfun = { .name = "maskfun", .description = NULL_IF_CONFIG_SMALL("Create Mask."), .priv_size = sizeof(MaskFunContext), diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c index 1cad45cd4e..1a49829d5b 100644 --- a/libavfilter/vf_mcdeint.c +++ b/libavfilter/vf_mcdeint.c @@ -304,7 +304,7 @@ static const AVFilterPad mcdeint_outputs[] = { { NULL } }; -AVFilter ff_vf_mcdeint = { +const AVFilter ff_vf_mcdeint = { .name = "mcdeint", .description = NULL_IF_CONFIG_SMALL("Apply motion compensating deinterlacing."), .priv_size = sizeof(MCDeintContext), diff --git a/libavfilter/vf_median.c b/libavfilter/vf_median.c index 0189fabd07..4d8037df25 100644 --- a/libavfilter/vf_median.c +++ b/libavfilter/vf_median.c @@ -285,7 +285,7 @@ static const AVFilterPad median_outputs[] = { { NULL } }; -AVFilter ff_vf_median = { +const AVFilter ff_vf_median = { .name = "median", .description = NULL_IF_CONFIG_SMALL("Apply Median filter."), .priv_size = sizeof(MedianContext), diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c index 22eb36a2e1..30888f62af 100644 --- a/libavfilter/vf_mergeplanes.c +++ b/libavfilter/vf_mergeplanes.c @@ -296,7 +296,7 @@ static const AVFilterPad mergeplanes_outputs[] = { { NULL } }; -AVFilter ff_vf_mergeplanes = { +const AVFilter ff_vf_mergeplanes = { .name = "mergeplanes", .description = NULL_IF_CONFIG_SMALL("Merge planes."), .priv_size = sizeof(MergePlanesContext), diff --git a/libavfilter/vf_mestimate.c b/libavfilter/vf_mestimate.c index 7ecfe7da60..daf7fde95f 100644 --- a/libavfilter/vf_mestimate.c +++ b/libavfilter/vf_mestimate.c @@ -365,7 +365,7 @@ static const AVFilterPad mestimate_outputs[] = { { NULL } }; -AVFilter ff_vf_mestimate = { +const AVFilter ff_vf_mestimate = { .name = "mestimate", .description = NULL_IF_CONFIG_SMALL("Generate motion vectors."), .priv_size = sizeof(MEContext), diff --git a/libavfilter/vf_midequalizer.c b/libavfilter/vf_midequalizer.c index 44c0bd751a..ba50fa0a82 100644 --- a/libavfilter/vf_midequalizer.c +++ b/libavfilter/vf_midequalizer.c @@ -375,7 +375,7 @@ static const AVFilterPad midequalizer_outputs[] = { { NULL } }; -AVFilter ff_vf_midequalizer = { +const AVFilter ff_vf_midequalizer = { .name = "midequalizer", .description = NULL_IF_CONFIG_SMALL("Apply Midway Equalization."), .priv_size = sizeof(MidEqualizerContext), diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index 969463f021..77462dbd5d 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -1258,7 +1258,7 @@ static const AVFilterPad minterpolate_outputs[] = { { NULL } }; -AVFilter ff_vf_minterpolate = { +const AVFilter ff_vf_minterpolate = { .name = "minterpolate", .description = NULL_IF_CONFIG_SMALL("Frame rate conversion using Motion Interpolation."), .priv_size = sizeof(MIContext), diff --git a/libavfilter/vf_misc_vaapi.c b/libavfilter/vf_misc_vaapi.c index 5814ff8c2e..08a0917258 100644 --- a/libavfilter/vf_misc_vaapi.c +++ b/libavfilter/vf_misc_vaapi.c @@ -236,7 +236,7 @@ static const AVFilterPad misc_vaapi_outputs[] = { { NULL } }; -AVFilter ff_vf_denoise_vaapi = { +const AVFilter ff_vf_denoise_vaapi = { .name = "denoise_vaapi", .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for de-noise"), .priv_size = sizeof(DenoiseVAAPIContext), @@ -249,7 +249,7 @@ AVFilter ff_vf_denoise_vaapi = { .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; -AVFilter ff_vf_sharpness_vaapi = { +const AVFilter ff_vf_sharpness_vaapi = { .name = "sharpness_vaapi", .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for sharpness"), .priv_size = sizeof(SharpnessVAAPIContext), diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c index ee4d95791a..0ca60d5522 100644 --- a/libavfilter/vf_mix.c +++ b/libavfilter/vf_mix.c @@ -358,7 +358,7 @@ static const AVFilterPad outputs[] = { #if CONFIG_MIX_FILTER AVFILTER_DEFINE_CLASS(mix); -AVFilter ff_vf_mix = { +const AVFilter ff_vf_mix = { .name = "mix", .description = NULL_IF_CONFIG_SMALL("Mix video inputs."), .priv_size = sizeof(MixContext), @@ -435,7 +435,7 @@ static const AVFilterPad inputs[] = { AVFILTER_DEFINE_CLASS(tmix); -AVFilter ff_vf_tmix = { +const AVFilter ff_vf_tmix = { .name = "tmix", .description = NULL_IF_CONFIG_SMALL("Mix successive video frames."), .priv_size = sizeof(MixContext), diff --git a/libavfilter/vf_monochrome.c b/libavfilter/vf_monochrome.c index 8faa068dbe..29e70f8c25 100644 --- a/libavfilter/vf_monochrome.c +++ b/libavfilter/vf_monochrome.c @@ -301,7 +301,7 @@ static const AVOption monochrome_options[] = { AVFILTER_DEFINE_CLASS(monochrome); -AVFilter ff_vf_monochrome = { +const AVFilter ff_vf_monochrome = { .name = "monochrome", .description = NULL_IF_CONFIG_SMALL("Convert video to gray using custom color filter."), .priv_size = sizeof(MonochromeContext), diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c index c9a9cb3a8e..53f5a56ef4 100644 --- a/libavfilter/vf_mpdecimate.c +++ b/libavfilter/vf_mpdecimate.c @@ -242,7 +242,7 @@ static const AVFilterPad mpdecimate_outputs[] = { { NULL } }; -AVFilter ff_vf_mpdecimate = { +const AVFilter ff_vf_mpdecimate = { .name = "mpdecimate", .description = NULL_IF_CONFIG_SMALL("Remove near-duplicate frames."), .init = init, diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c index 9cd9001320..a2e9a51165 100644 --- a/libavfilter/vf_neighbor.c +++ b/libavfilter/vf_neighbor.c @@ -358,7 +358,7 @@ static const AVFilterPad neighbor_outputs[] = { #define DEFINE_NEIGHBOR_FILTER(name_, description_) \ AVFILTER_DEFINE_CLASS(name_); \ \ -AVFilter ff_vf_##name_ = { \ +const AVFilter ff_vf_##name_ = { \ .name = #name_, \ .description = NULL_IF_CONFIG_SMALL(description_), \ .priv_size = sizeof(NContext), \ diff --git a/libavfilter/vf_neighbor_opencl.c b/libavfilter/vf_neighbor_opencl.c index fb40132d95..a41fd384a1 100644 --- a/libavfilter/vf_neighbor_opencl.c +++ b/libavfilter/vf_neighbor_opencl.c @@ -274,7 +274,7 @@ static const AVOption erosion_opencl_options[] = { AVFILTER_DEFINE_CLASS(erosion_opencl); -AVFilter ff_vf_erosion_opencl = { +const AVFilter ff_vf_erosion_opencl = { .name = "erosion_opencl", .description = NULL_IF_CONFIG_SMALL("Apply erosion effect"), .priv_size = sizeof(NeighborOpenCLContext), @@ -302,7 +302,7 @@ static const AVOption dilation_opencl_options[] = { AVFILTER_DEFINE_CLASS(dilation_opencl); -AVFilter ff_vf_dilation_opencl = { +const AVFilter ff_vf_dilation_opencl = { .name = "dilation_opencl", .description = NULL_IF_CONFIG_SMALL("Apply dilation effect"), .priv_size = sizeof(NeighborOpenCLContext), diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c index 06233b0dd4..7451bec4ae 100644 --- a/libavfilter/vf_nlmeans.c +++ b/libavfilter/vf_nlmeans.c @@ -577,7 +577,7 @@ static const AVFilterPad nlmeans_outputs[] = { { NULL } }; -AVFilter ff_vf_nlmeans = { +const AVFilter ff_vf_nlmeans = { .name = "nlmeans", .description = NULL_IF_CONFIG_SMALL("Non-local means denoiser."), .priv_size = sizeof(NLMeansContext), diff --git a/libavfilter/vf_nlmeans_opencl.c b/libavfilter/vf_nlmeans_opencl.c index e57b5e0873..0f16b2fe49 100644 --- a/libavfilter/vf_nlmeans_opencl.c +++ b/libavfilter/vf_nlmeans_opencl.c @@ -429,7 +429,7 @@ static const AVFilterPad nlmeans_opencl_outputs[] = { { NULL } }; -AVFilter ff_vf_nlmeans_opencl = { +const AVFilter ff_vf_nlmeans_opencl = { .name = "nlmeans_opencl", .description = NULL_IF_CONFIG_SMALL("Non-local means denoiser through OpenCL"), .priv_size = sizeof(NLMeansOpenCLContext), diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c index b273c13944..6096e88812 100644 --- a/libavfilter/vf_nnedi.c +++ b/libavfilter/vf_nnedi.c @@ -1158,7 +1158,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_nnedi = { +const AVFilter ff_vf_nnedi = { .name = "nnedi", .description = NULL_IF_CONFIG_SMALL("Apply neural network edge directed interpolation intra-only deinterlacer."), .priv_size = sizeof(NNEDIContext), diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c index abdf04708b..73e88063e9 100644 --- a/libavfilter/vf_noise.c +++ b/libavfilter/vf_noise.c @@ -337,7 +337,7 @@ static const AVFilterPad noise_outputs[] = { { NULL } }; -AVFilter ff_vf_noise = { +const AVFilter ff_vf_noise = { .name = "noise", .description = NULL_IF_CONFIG_SMALL("Add noise."), .priv_size = sizeof(NoiseContext), diff --git a/libavfilter/vf_normalize.c b/libavfilter/vf_normalize.c index 9675c8ac2c..3a2127ade3 100644 --- a/libavfilter/vf_normalize.c +++ b/libavfilter/vf_normalize.c @@ -530,7 +530,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_normalize = { +const AVFilter ff_vf_normalize = { .name = "normalize", .description = NULL_IF_CONFIG_SMALL("Normalize RGB video."), .priv_size = sizeof(NormalizeContext), diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c index 2355615229..1f0e85e900 100644 --- a/libavfilter/vf_null.c +++ b/libavfilter/vf_null.c @@ -42,7 +42,7 @@ static const AVFilterPad avfilter_vf_null_outputs[] = { { NULL } }; -AVFilter ff_vf_null = { +const AVFilter ff_vf_null = { .name = "null", .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), .inputs = avfilter_vf_null_inputs, diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c index c7ccb4a84f..6de474025a 100644 --- a/libavfilter/vf_ocr.c +++ b/libavfilter/vf_ocr.c @@ -146,7 +146,7 @@ static const AVFilterPad ocr_outputs[] = { { NULL } }; -AVFilter ff_vf_ocr = { +const AVFilter ff_vf_ocr = { .name = "ocr", .description = NULL_IF_CONFIG_SMALL("Optical Character Recognition."), .priv_size = sizeof(OCRContext), diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index bda5970b82..9155de3736 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -1106,7 +1106,7 @@ static const AVFilterPad avfilter_vf_overlay_outputs[] = { { NULL } }; -AVFilter ff_vf_overlay = { +const AVFilter ff_vf_overlay = { .name = "overlay", .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."), .preinit = overlay_framesync_preinit, diff --git a/libavfilter/vf_overlay_cuda.c b/libavfilter/vf_overlay_cuda.c index 34241c8e1b..b91ac9a713 100644 --- a/libavfilter/vf_overlay_cuda.c +++ b/libavfilter/vf_overlay_cuda.c @@ -435,7 +435,7 @@ static const AVFilterPad overlay_cuda_outputs[] = { { NULL } }; -AVFilter ff_vf_overlay_cuda = { +const AVFilter ff_vf_overlay_cuda = { .name = "overlay_cuda", .description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another using CUDA"), .priv_size = sizeof(OverlayCUDAContext), diff --git a/libavfilter/vf_overlay_opencl.c b/libavfilter/vf_overlay_opencl.c index e9c853203b..8547bae278 100644 --- a/libavfilter/vf_overlay_opencl.c +++ b/libavfilter/vf_overlay_opencl.c @@ -313,7 +313,7 @@ static const AVFilterPad overlay_opencl_outputs[] = { { NULL } }; -AVFilter ff_vf_overlay_opencl = { +const AVFilter ff_vf_overlay_opencl = { .name = "overlay_opencl", .description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"), .priv_size = sizeof(OverlayOpenCLContext), diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c index dd6c30f2a2..7a4afd77d4 100644 --- a/libavfilter/vf_overlay_qsv.c +++ b/libavfilter/vf_overlay_qsv.c @@ -416,7 +416,7 @@ static const AVFilterPad overlay_qsv_outputs[] = { { NULL } }; -AVFilter ff_vf_overlay_qsv = { +const AVFilter ff_vf_overlay_qsv = { .name = "overlay_qsv", .description = NULL_IF_CONFIG_SMALL("Quick Sync Video overlay."), .priv_size = sizeof(QSVOverlayContext), diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c index 60ca85fd08..8dd3bd2092 100644 --- a/libavfilter/vf_overlay_vulkan.c +++ b/libavfilter/vf_overlay_vulkan.c @@ -475,7 +475,7 @@ static const AVFilterPad overlay_vulkan_outputs[] = { { NULL } }; -AVFilter ff_vf_overlay_vulkan = { +const AVFilter ff_vf_overlay_vulkan = { .name = "overlay_vulkan", .description = NULL_IF_CONFIG_SMALL("Overlay a source on top of another"), .priv_size = sizeof(OverlayVulkanContext), diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c index 7dfe10f2f1..f16a06e3b8 100644 --- a/libavfilter/vf_owdenoise.c +++ b/libavfilter/vf_owdenoise.c @@ -365,7 +365,7 @@ static const AVFilterPad owdenoise_outputs[] = { { NULL } }; -AVFilter ff_vf_owdenoise = { +const AVFilter ff_vf_owdenoise = { .name = "owdenoise", .description = NULL_IF_CONFIG_SMALL("Denoise using wavelets."), .priv_size = sizeof(OWDenoiseContext), diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index 131f24807f..871f2930af 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -453,7 +453,7 @@ static const AVFilterPad avfilter_vf_pad_outputs[] = { { NULL } }; -AVFilter ff_vf_pad = { +const AVFilter ff_vf_pad = { .name = "pad", .description = NULL_IF_CONFIG_SMALL("Pad the input video."), .priv_size = sizeof(PadContext), diff --git a/libavfilter/vf_pad_opencl.c b/libavfilter/vf_pad_opencl.c index 1129c40c60..8155a96e03 100644 --- a/libavfilter/vf_pad_opencl.c +++ b/libavfilter/vf_pad_opencl.c @@ -383,7 +383,7 @@ static const AVOption pad_opencl_options[] = { AVFILTER_DEFINE_CLASS(pad_opencl); -AVFilter ff_vf_pad_opencl = { +const AVFilter ff_vf_pad_opencl = { .name = "pad_opencl", .description = NULL_IF_CONFIG_SMALL("Pad the input video."), .priv_size = sizeof(PadOpenCLContext), diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index c49a6f1168..ef8bc181c5 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -570,7 +570,7 @@ static const AVFilterPad palettegen_outputs[] = { { NULL } }; -AVFilter ff_vf_palettegen = { +const AVFilter ff_vf_palettegen = { .name = "palettegen", .description = NULL_IF_CONFIG_SMALL("Find the optimal palette for a given stream."), .priv_size = sizeof(PaletteGenContext), diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index f4c7d60435..f07ef5d760 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -1134,7 +1134,7 @@ static const AVFilterPad paletteuse_outputs[] = { { NULL } }; -AVFilter ff_vf_paletteuse = { +const AVFilter ff_vf_paletteuse = { .name = "paletteuse", .description = NULL_IF_CONFIG_SMALL("Use a palette to downsample an input video stream."), .priv_size = sizeof(PaletteUseContext), diff --git a/libavfilter/vf_perspective.c b/libavfilter/vf_perspective.c index 92495097cc..a3fa080f21 100644 --- a/libavfilter/vf_perspective.c +++ b/libavfilter/vf_perspective.c @@ -511,7 +511,7 @@ static const AVFilterPad perspective_outputs[] = { { NULL } }; -AVFilter ff_vf_perspective = { +const AVFilter ff_vf_perspective = { .name = "perspective", .description = NULL_IF_CONFIG_SMALL("Correct the perspective of video."), .priv_size = sizeof(PerspectiveContext), diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c index d4f580a609..556620d36c 100644 --- a/libavfilter/vf_phase.c +++ b/libavfilter/vf_phase.c @@ -235,7 +235,7 @@ static const AVFilterPad phase_outputs[] = { { NULL } }; -AVFilter ff_vf_phase = { +const AVFilter ff_vf_phase = { .name = "phase", .description = NULL_IF_CONFIG_SMALL("Phase shift fields."), .priv_size = sizeof(PhaseContext), diff --git a/libavfilter/vf_photosensitivity.c b/libavfilter/vf_photosensitivity.c index e05c187eeb..dd3d957bfa 100644 --- a/libavfilter/vf_photosensitivity.c +++ b/libavfilter/vf_photosensitivity.c @@ -329,7 +329,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_photosensitivity = { +const AVFilter ff_vf_photosensitivity = { .name = "photosensitivity", .description = NULL_IF_CONFIG_SMALL("Filter out photosensitive epilepsy seizure-inducing flashes."), .priv_size = sizeof(PhotosensitivityContext), diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c index 066b8a0290..b56839d994 100644 --- a/libavfilter/vf_pixdesctest.c +++ b/libavfilter/vf_pixdesctest.c @@ -124,7 +124,7 @@ static const AVFilterPad avfilter_vf_pixdesctest_outputs[] = { { NULL } }; -AVFilter ff_vf_pixdesctest = { +const AVFilter ff_vf_pixdesctest = { .name = "pixdesctest", .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."), .priv_size = sizeof(PixdescTestContext), diff --git a/libavfilter/vf_pp.c b/libavfilter/vf_pp.c index 19a0f9fc6e..5cd89932f8 100644 --- a/libavfilter/vf_pp.c +++ b/libavfilter/vf_pp.c @@ -191,7 +191,7 @@ static const AVFilterPad pp_outputs[] = { { NULL } }; -AVFilter ff_vf_pp = { +const AVFilter ff_vf_pp = { .name = "pp", .description = NULL_IF_CONFIG_SMALL("Filter video using libpostproc."), .priv_size = sizeof(PPFilterContext), diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c index ade7feb0b2..c53a8716cb 100644 --- a/libavfilter/vf_pp7.c +++ b/libavfilter/vf_pp7.c @@ -402,7 +402,7 @@ static const AVFilterPad pp7_outputs[] = { { NULL } }; -AVFilter ff_vf_pp7 = { +const AVFilter ff_vf_pp7 = { .name = "pp7", .description = NULL_IF_CONFIG_SMALL("Apply Postprocessing 7 filter."), .priv_size = sizeof(PP7Context), diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index e051cadac0..b5d0ca6d67 100644 --- a/libavfilter/vf_premultiply.c +++ b/libavfilter/vf_premultiply.c @@ -824,7 +824,7 @@ static const AVFilterPad premultiply_outputs[] = { #if CONFIG_PREMULTIPLY_FILTER -AVFilter ff_vf_premultiply = { +const AVFilter ff_vf_premultiply = { .name = "premultiply", .description = NULL_IF_CONFIG_SMALL("PreMultiply first stream with first plane of second stream."), .priv_size = sizeof(PreMultiplyContext), @@ -847,7 +847,7 @@ AVFilter ff_vf_premultiply = { #define unpremultiply_options options AVFILTER_DEFINE_CLASS(unpremultiply); -AVFilter ff_vf_unpremultiply = { +const AVFilter ff_vf_unpremultiply = { .name = "unpremultiply", .description = NULL_IF_CONFIG_SMALL("UnPreMultiply first stream with first plane of second stream."), .priv_size = sizeof(PreMultiplyContext), diff --git a/libavfilter/vf_procamp_vaapi.c b/libavfilter/vf_procamp_vaapi.c index 7342048583..9d0c813e6d 100644 --- a/libavfilter/vf_procamp_vaapi.c +++ b/libavfilter/vf_procamp_vaapi.c @@ -233,7 +233,7 @@ static const AVFilterPad procamp_vaapi_outputs[] = { { NULL } }; -AVFilter ff_vf_procamp_vaapi = { +const AVFilter ff_vf_procamp_vaapi = { .name = "procamp_vaapi", .description = NULL_IF_CONFIG_SMALL("ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast"), .priv_size = sizeof(ProcampVAAPIContext), diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c index ec25e931f5..4b38baeb3c 100644 --- a/libavfilter/vf_program_opencl.c +++ b/libavfilter/vf_program_opencl.c @@ -362,7 +362,7 @@ static const AVFilterPad program_opencl_outputs[] = { { NULL } }; -AVFilter ff_vf_program_opencl = { +const AVFilter ff_vf_program_opencl = { .name = "program_opencl", .description = NULL_IF_CONFIG_SMALL("Filter video using an OpenCL program"), .priv_size = sizeof(ProgramOpenCLContext), @@ -415,7 +415,7 @@ static const AVFilterPad openclsrc_outputs[] = { { NULL } }; -AVFilter ff_vsrc_openclsrc = { +const AVFilter ff_vsrc_openclsrc = { .name = "openclsrc", .description = NULL_IF_CONFIG_SMALL("Generate video using an OpenCL program"), .priv_size = sizeof(ProgramOpenCLContext), diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c index 6f67c02eb7..a6ea43e883 100644 --- a/libavfilter/vf_pseudocolor.c +++ b/libavfilter/vf_pseudocolor.c @@ -888,7 +888,7 @@ static av_cold void uninit(AVFilterContext *ctx) AVFILTER_DEFINE_CLASS(pseudocolor); -AVFilter ff_vf_pseudocolor = { +const AVFilter ff_vf_pseudocolor = { .name = "pseudocolor", .description = NULL_IF_CONFIG_SMALL("Make pseudocolored video frames."), .priv_size = sizeof(PseudoColorContext), diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index 0d0c0f35aa..7117e26dce 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -467,7 +467,7 @@ static const AVFilterPad psnr_outputs[] = { { NULL } }; -AVFilter ff_vf_psnr = { +const AVFilter ff_vf_psnr = { .name = "psnr", .description = NULL_IF_CONFIG_SMALL("Calculate the PSNR between two video streams."), .preinit = psnr_framesync_preinit, diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index fa76caad03..00d3a8dc51 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -764,7 +764,7 @@ static const AVFilterPad pullup_outputs[] = { { NULL } }; -AVFilter ff_vf_pullup = { +const AVFilter ff_vf_pullup = { .name = "pullup", .description = NULL_IF_CONFIG_SMALL("Pullup from field sequence to frames."), .priv_size = sizeof(PullupContext), diff --git a/libavfilter/vf_qp.c b/libavfilter/vf_qp.c index e2d60fdbb5..c932d45a76 100644 --- a/libavfilter/vf_qp.c +++ b/libavfilter/vf_qp.c @@ -193,7 +193,7 @@ static const AVFilterPad qp_outputs[] = { { NULL } }; -AVFilter ff_vf_qp = { +const AVFilter ff_vf_qp = { .name = "qp", .description = NULL_IF_CONFIG_SMALL("Change video quantization parameters."), .priv_size = sizeof(QPContext), diff --git a/libavfilter/vf_random.c b/libavfilter/vf_random.c index e73a224cd8..5e4c30a3b5 100644 --- a/libavfilter/vf_random.c +++ b/libavfilter/vf_random.c @@ -139,7 +139,7 @@ static const AVFilterPad random_outputs[] = { { NULL } }; -AVFilter ff_vf_random = { +const AVFilter ff_vf_random = { .name = "random", .description = NULL_IF_CONFIG_SMALL("Return random frames."), .priv_size = sizeof(RandomContext), diff --git a/libavfilter/vf_readeia608.c b/libavfilter/vf_readeia608.c index d4c3ca6e58..9558e938ab 100644 --- a/libavfilter/vf_readeia608.c +++ b/libavfilter/vf_readeia608.c @@ -556,7 +556,7 @@ static const AVFilterPad readeia608_outputs[] = { { NULL } }; -AVFilter ff_vf_readeia608 = { +const AVFilter ff_vf_readeia608 = { .name = "readeia608", .description = NULL_IF_CONFIG_SMALL("Read EIA-608 Closed Caption codes from input video and write them to frame metadata."), .priv_size = sizeof(ReadEIA608Context), diff --git a/libavfilter/vf_readvitc.c b/libavfilter/vf_readvitc.c index 7ef8cdae58..25cfa5f32d 100644 --- a/libavfilter/vf_readvitc.c +++ b/libavfilter/vf_readvitc.c @@ -246,7 +246,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_readvitc = { +const AVFilter ff_vf_readvitc = { .name = "readvitc", .description = NULL_IF_CONFIG_SMALL("Read vertical interval timecode and write it to frame metadata."), .priv_size = sizeof(ReadVitcContext), diff --git a/libavfilter/vf_remap.c b/libavfilter/vf_remap.c index 1896a268c9..5ab6199d71 100644 --- a/libavfilter/vf_remap.c +++ b/libavfilter/vf_remap.c @@ -398,7 +398,7 @@ static const AVFilterPad remap_outputs[] = { { NULL } }; -AVFilter ff_vf_remap = { +const AVFilter ff_vf_remap = { .name = "remap", .description = NULL_IF_CONFIG_SMALL("Remap pixels."), .priv_size = sizeof(RemapContext), diff --git a/libavfilter/vf_removegrain.c b/libavfilter/vf_removegrain.c index bc45076baa..75b3ec35bb 100644 --- a/libavfilter/vf_removegrain.c +++ b/libavfilter/vf_removegrain.c @@ -648,7 +648,7 @@ static const AVFilterPad removegrain_outputs[] = { { NULL } }; -AVFilter ff_vf_removegrain = { +const AVFilter ff_vf_removegrain = { .name = "removegrain", .description = NULL_IF_CONFIG_SMALL("Remove grain."), .priv_size = sizeof(RemoveGrainContext), diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c index 4026bdd09a..4bb81a8a5b 100644 --- a/libavfilter/vf_removelogo.c +++ b/libavfilter/vf_removelogo.c @@ -573,7 +573,7 @@ static const AVFilterPad removelogo_outputs[] = { { NULL } }; -AVFilter ff_vf_removelogo = { +const AVFilter ff_vf_removelogo = { .name = "removelogo", .description = NULL_IF_CONFIG_SMALL("Remove a TV logo based on a mask image."), .priv_size = sizeof(RemovelogoContext), diff --git a/libavfilter/vf_repeatfields.c b/libavfilter/vf_repeatfields.c index 3ac432b5bc..1e2abd3a82 100644 --- a/libavfilter/vf_repeatfields.c +++ b/libavfilter/vf_repeatfields.c @@ -181,7 +181,7 @@ static const AVFilterPad repeatfields_outputs[] = { { NULL } }; -AVFilter ff_vf_repeatfields = { +const AVFilter ff_vf_repeatfields = { .name = "repeatfields", .description = NULL_IF_CONFIG_SMALL("Hard repeat fields based on MPEG repeat field flag."), .priv_size = sizeof(RepeatFieldsContext), diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c index 65c6cc411a..f16207cbff 100644 --- a/libavfilter/vf_rotate.c +++ b/libavfilter/vf_rotate.c @@ -600,7 +600,7 @@ static const AVFilterPad rotate_outputs[] = { { NULL } }; -AVFilter ff_vf_rotate = { +const AVFilter ff_vf_rotate = { .name = "rotate", .description = NULL_IF_CONFIG_SMALL("Rotate the input image."), .priv_size = sizeof(RotContext), diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c index 6f63654161..12fbe40655 100644 --- a/libavfilter/vf_sab.c +++ b/libavfilter/vf_sab.c @@ -323,7 +323,7 @@ static const AVFilterPad sab_outputs[] = { { NULL } }; -AVFilter ff_vf_sab = { +const AVFilter ff_vf_sab = { .name = "sab", .description = NULL_IF_CONFIG_SMALL("Apply shape adaptive blur."), .priv_size = sizeof(SabContext), diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 7f68a51913..d95a8ad48a 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -155,7 +155,7 @@ typedef struct ScaleContext { } ScaleContext; -AVFilter ff_vf_scale2ref; +const AVFilter ff_vf_scale2ref; static int config_props(AVFilterLink *outlink); @@ -964,7 +964,7 @@ static const AVFilterPad avfilter_vf_scale_outputs[] = { { NULL } }; -AVFilter ff_vf_scale = { +const AVFilter ff_vf_scale = { .name = "scale", .description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format."), .init_dict = init_dict, @@ -1016,7 +1016,7 @@ static const AVFilterPad avfilter_vf_scale2ref_outputs[] = { { NULL } }; -AVFilter ff_vf_scale2ref = { +const AVFilter ff_vf_scale2ref = { .name = "scale2ref", .description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format to the given reference."), .init_dict = init_dict, diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index 99fef6b22b..d97c7df273 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -664,7 +664,7 @@ static const AVFilterPad cudascale_outputs[] = { { NULL } }; -AVFilter ff_vf_scale_cuda = { +const AVFilter ff_vf_scale_cuda = { .name = "scale_cuda", .description = NULL_IF_CONFIG_SMALL("GPU accelerated video resizer"), diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 502ecfda94..8d2ad3aab7 100644 --- a/libavfilter/vf_scale_npp.c +++ b/libavfilter/vf_scale_npp.c @@ -591,7 +591,7 @@ static const AVFilterPad nppscale_outputs[] = { { NULL } }; -AVFilter ff_vf_scale_npp = { +const AVFilter ff_vf_scale_npp = { .name = "scale_npp", .description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video " "scaling and format conversion"), diff --git a/libavfilter/vf_scale_qsv.c b/libavfilter/vf_scale_qsv.c index 2ac2373955..189223a58a 100644 --- a/libavfilter/vf_scale_qsv.c +++ b/libavfilter/vf_scale_qsv.c @@ -667,7 +667,7 @@ static const AVFilterPad qsvscale_outputs[] = { { NULL } }; -AVFilter ff_vf_scale_qsv = { +const AVFilter ff_vf_scale_qsv = { .name = "scale_qsv", .description = NULL_IF_CONFIG_SMALL("QuickSync video scaling and format conversion"), diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index b9a5eeff65..0f0c5440e9 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -283,7 +283,7 @@ static const AVFilterPad scale_vaapi_outputs[] = { { NULL } }; -AVFilter ff_vf_scale_vaapi = { +const AVFilter ff_vf_scale_vaapi = { .name = "scale_vaapi", .description = NULL_IF_CONFIG_SMALL("Scale to/from VAAPI surfaces."), .priv_size = sizeof(ScaleVAAPIContext), diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c index 35ea2e1e5d..95503480ef 100644 --- a/libavfilter/vf_scale_vulkan.c +++ b/libavfilter/vf_scale_vulkan.c @@ -524,7 +524,7 @@ static const AVFilterPad scale_vulkan_outputs[] = { { NULL } }; -AVFilter ff_vf_scale_vulkan = { +const AVFilter ff_vf_scale_vulkan = { .name = "scale_vulkan", .description = NULL_IF_CONFIG_SMALL("Scale Vulkan frames"), .priv_size = sizeof(ScaleVulkanContext), diff --git a/libavfilter/vf_scdet.c b/libavfilter/vf_scdet.c index b91d91f1e1..3f7b7c5f25 100644 --- a/libavfilter/vf_scdet.c +++ b/libavfilter/vf_scdet.c @@ -211,7 +211,7 @@ static const AVFilterPad scdet_outputs[] = { { NULL } }; -AVFilter ff_vf_scdet = { +const AVFilter ff_vf_scdet = { .name = "scdet", .description = NULL_IF_CONFIG_SMALL("Detect video scene change"), .priv_size = sizeof(SCDetContext), diff --git a/libavfilter/vf_scroll.c b/libavfilter/vf_scroll.c index bb5907b1c0..4b7b45f52a 100644 --- a/libavfilter/vf_scroll.c +++ b/libavfilter/vf_scroll.c @@ -211,7 +211,7 @@ static const AVFilterPad scroll_outputs[] = { { NULL } }; -AVFilter ff_vf_scroll = { +const AVFilter ff_vf_scroll = { .name = "scroll", .description = NULL_IF_CONFIG_SMALL("Scroll input video."), .priv_size = sizeof(ScrollContext), diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c index 9bd79a3e60..4733cc48f2 100644 --- a/libavfilter/vf_selectivecolor.c +++ b/libavfilter/vf_selectivecolor.c @@ -470,7 +470,7 @@ static const AVFilterPad selectivecolor_outputs[] = { { NULL } }; -AVFilter ff_vf_selectivecolor = { +const AVFilter ff_vf_selectivecolor = { .name = "selectivecolor", .description = NULL_IF_CONFIG_SMALL("Apply CMYK adjustments to specific color ranges."), .priv_size = sizeof(SelectiveColorContext), diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c index 74ebd35bd1..c2c7352ad1 100644 --- a/libavfilter/vf_separatefields.c +++ b/libavfilter/vf_separatefields.c @@ -173,7 +173,7 @@ static const AVFilterPad separatefields_outputs[] = { { NULL } }; -AVFilter ff_vf_separatefields = { +const AVFilter ff_vf_separatefields = { .name = "separatefields", .description = NULL_IF_CONFIG_SMALL("Split input video frames into fields."), .priv_size = sizeof(SeparateFieldsContext), diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c index 689097fac0..0cb3af33ed 100644 --- a/libavfilter/vf_setparams.c +++ b/libavfilter/vf_setparams.c @@ -162,7 +162,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_setparams = { +const AVFilter ff_vf_setparams = { .name = "setparams", .description = NULL_IF_CONFIG_SMALL("Force field, or color property for the output video frame."), .priv_size = sizeof(SetParamsContext), @@ -200,7 +200,7 @@ static av_cold int init_setrange(AVFilterContext *ctx) return 0; } -AVFilter ff_vf_setrange = { +const AVFilter ff_vf_setrange = { .name = "setrange", .description = NULL_IF_CONFIG_SMALL("Force color range for the output video frame."), .priv_size = sizeof(SetParamsContext), @@ -234,7 +234,7 @@ static av_cold int init_setfield(AVFilterContext *ctx) return 0; } -AVFilter ff_vf_setfield = { +const AVFilter ff_vf_setfield = { .name = "setfield", .description = NULL_IF_CONFIG_SMALL("Force field for the output video frame."), .priv_size = sizeof(SetParamsContext), diff --git a/libavfilter/vf_shear.c b/libavfilter/vf_shear.c index de298af94b..6b9db161d9 100644 --- a/libavfilter/vf_shear.c +++ b/libavfilter/vf_shear.c @@ -316,7 +316,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_shear = { +const AVFilter ff_vf_shear = { .name = "shear", .description = NULL_IF_CONFIG_SMALL("Shear transform the input image."), .priv_size = sizeof(ShearContext), diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 2529cb2851..5e1c4dc2e3 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -602,7 +602,7 @@ static const AVFilterPad avfilter_vf_showinfo_outputs[] = { { NULL } }; -AVFilter ff_vf_showinfo = { +const AVFilter ff_vf_showinfo = { .name = "showinfo", .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), .inputs = avfilter_vf_showinfo_inputs, diff --git a/libavfilter/vf_showpalette.c b/libavfilter/vf_showpalette.c index c0327acf5c..588fd2faab 100644 --- a/libavfilter/vf_showpalette.c +++ b/libavfilter/vf_showpalette.c @@ -113,7 +113,7 @@ static const AVFilterPad showpalette_outputs[] = { { NULL } }; -AVFilter ff_vf_showpalette = { +const AVFilter ff_vf_showpalette = { .name = "showpalette", .description = NULL_IF_CONFIG_SMALL("Display frame palette."), .priv_size = sizeof(ShowPaletteContext), diff --git a/libavfilter/vf_shuffleframes.c b/libavfilter/vf_shuffleframes.c index 1f780c7d49..6424e4ee2c 100644 --- a/libavfilter/vf_shuffleframes.c +++ b/libavfilter/vf_shuffleframes.c @@ -156,7 +156,7 @@ static const AVFilterPad shuffleframes_outputs[] = { { NULL }, }; -AVFilter ff_vf_shuffleframes = { +const AVFilter ff_vf_shuffleframes = { .name = "shuffleframes", .description = NULL_IF_CONFIG_SMALL("Shuffle video frames."), .priv_size = sizeof(ShuffleFramesContext), diff --git a/libavfilter/vf_shufflepixels.c b/libavfilter/vf_shufflepixels.c index 463bb66bc8..b404eefe66 100644 --- a/libavfilter/vf_shufflepixels.c +++ b/libavfilter/vf_shufflepixels.c @@ -443,7 +443,7 @@ static const AVFilterPad shufflepixels_outputs[] = { { NULL }, }; -AVFilter ff_vf_shufflepixels = { +const AVFilter ff_vf_shufflepixels = { .name = "shufflepixels", .description = NULL_IF_CONFIG_SMALL("Shuffle video pixels."), .priv_size = sizeof(ShufflePixelsContext), diff --git a/libavfilter/vf_shuffleplanes.c b/libavfilter/vf_shuffleplanes.c index c5a376d50b..d1e1d11074 100644 --- a/libavfilter/vf_shuffleplanes.c +++ b/libavfilter/vf_shuffleplanes.c @@ -162,7 +162,7 @@ static const AVFilterPad shuffleplanes_outputs[] = { { NULL }, }; -AVFilter ff_vf_shuffleplanes = { +const AVFilter ff_vf_shuffleplanes = { .name = "shuffleplanes", .description = NULL_IF_CONFIG_SMALL("Shuffle video planes."), .priv_size = sizeof(ShufflePlanesContext), diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index 1331327bb3..6f0ff53029 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -1012,7 +1012,7 @@ static const AVFilterPad signalstats_outputs[] = { { NULL } }; -AVFilter ff_vf_signalstats = { +const AVFilter ff_vf_signalstats = { .name = "signalstats", .description = "Generate statistics from video analysis.", .init = init, diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c index bf5973b867..a345ad6ebd 100644 --- a/libavfilter/vf_signature.c +++ b/libavfilter/vf_signature.c @@ -758,7 +758,7 @@ static const AVFilterPad signature_outputs[] = { { NULL } }; -AVFilter ff_vf_signature = { +const AVFilter ff_vf_signature = { .name = "signature", .description = NULL_IF_CONFIG_SMALL("Calculate the MPEG-7 video signature"), .priv_size = sizeof(SignatureContext), diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c index 1955ac43d8..36ed72a12c 100644 --- a/libavfilter/vf_smartblur.c +++ b/libavfilter/vf_smartblur.c @@ -291,7 +291,7 @@ static const AVFilterPad smartblur_outputs[] = { { NULL } }; -AVFilter ff_vf_smartblur = { +const AVFilter ff_vf_smartblur = { .name = "smartblur", .description = NULL_IF_CONFIG_SMALL("Blur the input video without impacting the outlines."), .priv_size = sizeof(SmartblurContext), diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index c548d86d72..d93c4a5606 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -510,7 +510,7 @@ static const AVFilterPad spp_outputs[] = { { NULL } }; -AVFilter ff_vf_spp = { +const AVFilter ff_vf_spp = { .name = "spp", .description = NULL_IF_CONFIG_SMALL("Apply a simple post processing filter."), .priv_size = sizeof(SPPContext), diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 45f941acdb..4360439ca6 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -193,7 +193,7 @@ static const AVFilterPad sr_outputs[] = { { NULL } }; -AVFilter ff_vf_sr = { +const AVFilter ff_vf_sr = { .name = "sr", .description = NULL_IF_CONFIG_SMALL("Apply DNN-based image super resolution to the input."), .priv_size = sizeof(SRContext), diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index ebb314c69f..e004b36e76 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -593,7 +593,7 @@ static const AVFilterPad ssim_outputs[] = { { NULL } }; -AVFilter ff_vf_ssim = { +const AVFilter ff_vf_ssim = { .name = "ssim", .description = NULL_IF_CONFIG_SMALL("Calculate the SSIM between two video streams."), .preinit = ssim_framesync_preinit, diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c index 3d2b19a318..3368e25c9c 100644 --- a/libavfilter/vf_stack.c +++ b/libavfilter/vf_stack.c @@ -409,7 +409,7 @@ static const AVFilterPad outputs[] = { #define hstack_options stack_options AVFILTER_DEFINE_CLASS(hstack); -AVFilter ff_vf_hstack = { +const AVFilter ff_vf_hstack = { .name = "hstack", .description = NULL_IF_CONFIG_SMALL("Stack video inputs horizontally."), .priv_size = sizeof(StackContext), @@ -429,7 +429,7 @@ AVFilter ff_vf_hstack = { #define vstack_options stack_options AVFILTER_DEFINE_CLASS(vstack); -AVFilter ff_vf_vstack = { +const AVFilter ff_vf_vstack = { .name = "vstack", .description = NULL_IF_CONFIG_SMALL("Stack video inputs vertically."), .priv_size = sizeof(StackContext), @@ -456,7 +456,7 @@ static const AVOption xstack_options[] = { AVFILTER_DEFINE_CLASS(xstack); -AVFilter ff_vf_xstack = { +const AVFilter ff_vf_xstack = { .name = "xstack", .description = NULL_IF_CONFIG_SMALL("Stack video inputs into custom layout."), .priv_size = sizeof(StackContext), diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c index ff17b07c3d..ec7d410f76 100644 --- a/libavfilter/vf_stereo3d.c +++ b/libavfilter/vf_stereo3d.c @@ -1112,7 +1112,7 @@ static const AVFilterPad stereo3d_outputs[] = { { NULL } }; -AVFilter ff_vf_stereo3d = { +const AVFilter ff_vf_stereo3d = { .name = "stereo3d", .description = NULL_IF_CONFIG_SMALL("Convert video stereoscopic 3D view."), .priv_size = sizeof(Stereo3DContext), diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index de74afa2b7..493eb5f424 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -246,7 +246,7 @@ static av_cold int init_ass(AVFilterContext *ctx) return 0; } -AVFilter ff_vf_ass = { +const AVFilter ff_vf_ass = { .name = "ass", .description = NULL_IF_CONFIG_SMALL("Render ASS subtitles onto input video using the libass library."), .priv_size = sizeof(AssContext), @@ -480,7 +480,7 @@ end: return ret; } -AVFilter ff_vf_subtitles = { +const AVFilter ff_vf_subtitles = { .name = "subtitles", .description = NULL_IF_CONFIG_SMALL("Render text subtitles onto input video using the libass library."), .priv_size = sizeof(AssContext), diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c index d6c5f44c17..00e88eafe3 100644 --- a/libavfilter/vf_super2xsai.c +++ b/libavfilter/vf_super2xsai.c @@ -359,7 +359,7 @@ static const AVFilterPad super2xsai_outputs[] = { { NULL } }; -AVFilter ff_vf_super2xsai = { +const AVFilter ff_vf_super2xsai = { .name = "super2xsai", .description = NULL_IF_CONFIG_SMALL("Scale the input by 2x using the Super2xSaI pixel art algorithm."), .priv_size = sizeof(Super2xSaIContext), diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c index 66bed161f4..3b96790798 100644 --- a/libavfilter/vf_swaprect.c +++ b/libavfilter/vf_swaprect.c @@ -243,7 +243,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_swaprect = { +const AVFilter ff_vf_swaprect = { .name = "swaprect", .description = NULL_IF_CONFIG_SMALL("Swap 2 rectangular objects in video."), .priv_size = sizeof(SwapRectContext), diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c index 720e699c4a..34868eb0c9 100644 --- a/libavfilter/vf_swapuv.c +++ b/libavfilter/vf_swapuv.c @@ -111,7 +111,7 @@ static const AVFilterPad swapuv_outputs[] = { { NULL } }; -AVFilter ff_vf_swapuv = { +const AVFilter ff_vf_swapuv = { .name = "swapuv", .description = NULL_IF_CONFIG_SMALL("Swap U and V components."), .query_formats = query_formats, diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index 6563b49725..52a3f2f353 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -287,7 +287,7 @@ static const AVFilterPad telecine_outputs[] = { { NULL } }; -AVFilter ff_vf_telecine = { +const AVFilter ff_vf_telecine = { .name = "telecine", .description = NULL_IF_CONFIG_SMALL("Apply a telecine pattern."), .priv_size = sizeof(TelecineContext), diff --git a/libavfilter/vf_threshold.c b/libavfilter/vf_threshold.c index 11623d394e..decfbf8564 100644 --- a/libavfilter/vf_threshold.c +++ b/libavfilter/vf_threshold.c @@ -354,7 +354,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_threshold = { +const AVFilter ff_vf_threshold = { .name = "threshold", .description = NULL_IF_CONFIG_SMALL("Threshold first video stream using other video streams."), .priv_size = sizeof(ThresholdContext), diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c index e49b70c3b3..825e536e67 100644 --- a/libavfilter/vf_thumbnail.c +++ b/libavfilter/vf_thumbnail.c @@ -287,7 +287,7 @@ static const AVFilterPad thumbnail_outputs[] = { { NULL } }; -AVFilter ff_vf_thumbnail = { +const AVFilter ff_vf_thumbnail = { .name = "thumbnail", .description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), .priv_size = sizeof(ThumbContext), diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c index 0c06815643..aab3ea8cc7 100644 --- a/libavfilter/vf_thumbnail_cuda.c +++ b/libavfilter/vf_thumbnail_cuda.c @@ -440,7 +440,7 @@ static const AVFilterPad thumbnail_cuda_outputs[] = { { NULL } }; -AVFilter ff_vf_thumbnail_cuda = { +const AVFilter ff_vf_thumbnail_cuda = { .name = "thumbnail_cuda", .description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), .priv_size = sizeof(ThumbnailCudaContext), diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index 7e421a9721..11392169e4 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -285,7 +285,7 @@ static const AVFilterPad tile_outputs[] = { { NULL } }; -AVFilter ff_vf_tile = { +const AVFilter ff_vf_tile = { .name = "tile", .description = NULL_IF_CONFIG_SMALL("Tile several successive frames together."), .init = init, diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c index 542b66898e..40d8879871 100644 --- a/libavfilter/vf_tinterlace.c +++ b/libavfilter/vf_tinterlace.c @@ -555,7 +555,7 @@ static const AVFilterPad tinterlace_outputs[] = { { NULL } }; -AVFilter ff_vf_tinterlace = { +const AVFilter ff_vf_tinterlace = { .name = "tinterlace", .description = NULL_IF_CONFIG_SMALL("Perform temporal field interlacing."), .priv_size = sizeof(TInterlaceContext), @@ -567,7 +567,7 @@ AVFilter ff_vf_tinterlace = { }; -AVFilter ff_vf_interlace = { +const AVFilter ff_vf_interlace = { .name = "interlace", .description = NULL_IF_CONFIG_SMALL("Convert progressive video into interlaced."), .priv_size = sizeof(TInterlaceContext), diff --git a/libavfilter/vf_tmidequalizer.c b/libavfilter/vf_tmidequalizer.c index 6e3f3ccce1..24e1d557e2 100644 --- a/libavfilter/vf_tmidequalizer.c +++ b/libavfilter/vf_tmidequalizer.c @@ -427,7 +427,7 @@ static const AVFilterPad tmidequalizer_outputs[] = { { NULL } }; -AVFilter ff_vf_tmidequalizer = { +const AVFilter ff_vf_tmidequalizer = { .name = "tmidequalizer", .description = NULL_IF_CONFIG_SMALL("Apply Temporal Midway Equalization."), .priv_size = sizeof(TMidEqualizerContext), diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c index d1728c8513..4d04118eac 100644 --- a/libavfilter/vf_tonemap.c +++ b/libavfilter/vf_tonemap.c @@ -334,7 +334,7 @@ static const AVFilterPad tonemap_outputs[] = { { NULL } }; -AVFilter ff_vf_tonemap = { +const AVFilter ff_vf_tonemap = { .name = "tonemap", .description = NULL_IF_CONFIG_SMALL("Conversion to/from different dynamic ranges."), .init = init, diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index 2681ebd1b5..e85b3bb3ba 100644 --- a/libavfilter/vf_tonemap_opencl.c +++ b/libavfilter/vf_tonemap_opencl.c @@ -540,7 +540,7 @@ static const AVFilterPad tonemap_opencl_outputs[] = { { NULL } }; -AVFilter ff_vf_tonemap_opencl = { +const AVFilter ff_vf_tonemap_opencl = { .name = "tonemap_opencl", .description = NULL_IF_CONFIG_SMALL("Perform HDR to SDR conversion with tonemapping."), .priv_size = sizeof(TonemapOpenCLContext), diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c index 2f41b90424..179f7d77b9 100644 --- a/libavfilter/vf_tonemap_vaapi.c +++ b/libavfilter/vf_tonemap_vaapi.c @@ -405,7 +405,7 @@ static const AVFilterPad tonemap_vaapi_outputs[] = { { NULL } }; -AVFilter ff_vf_tonemap_vaapi = { +const AVFilter ff_vf_tonemap_vaapi = { .name = "tonemap_vaapi", .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for tone-mapping"), .priv_size = sizeof(HDRVAAPIContext), diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c index 0cd65d3e7b..2d89537abd 100644 --- a/libavfilter/vf_tpad.c +++ b/libavfilter/vf_tpad.c @@ -205,7 +205,7 @@ static const AVFilterPad tpad_outputs[] = { { NULL } }; -AVFilter ff_vf_tpad = { +const AVFilter ff_vf_tpad = { .name = "tpad", .description = NULL_IF_CONFIG_SMALL("Temporarily pad video frames."), .priv_size = sizeof(TPadContext), diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index cb49c4a301..6affbed0a6 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -397,7 +397,7 @@ static const AVFilterPad avfilter_vf_transpose_outputs[] = { { NULL } }; -AVFilter ff_vf_transpose = { +const AVFilter ff_vf_transpose = { .name = "transpose", .description = NULL_IF_CONFIG_SMALL("Transpose input video."), .priv_size = sizeof(TransContext), diff --git a/libavfilter/vf_transpose_npp.c b/libavfilter/vf_transpose_npp.c index 3ea031667c..2a68a832ff 100644 --- a/libavfilter/vf_transpose_npp.c +++ b/libavfilter/vf_transpose_npp.c @@ -473,7 +473,7 @@ static const AVFilterPad npptranspose_outputs[] = { { NULL } }; -AVFilter ff_vf_transpose_npp = { +const AVFilter ff_vf_transpose_npp = { .name = "transpose_npp", .description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video transpose"), .init = npptranspose_init, diff --git a/libavfilter/vf_transpose_opencl.c b/libavfilter/vf_transpose_opencl.c index dd678e91cd..f325d6633b 100644 --- a/libavfilter/vf_transpose_opencl.c +++ b/libavfilter/vf_transpose_opencl.c @@ -274,7 +274,7 @@ static const AVFilterPad transpose_opencl_outputs[] = { { NULL } }; -AVFilter ff_vf_transpose_opencl = { +const AVFilter ff_vf_transpose_opencl = { .name = "transpose_opencl", .description = NULL_IF_CONFIG_SMALL("Transpose input video"), .priv_size = sizeof(TransposeOpenCLContext), diff --git a/libavfilter/vf_transpose_vaapi.c b/libavfilter/vf_transpose_vaapi.c index a4c654266d..3b29767c8d 100644 --- a/libavfilter/vf_transpose_vaapi.c +++ b/libavfilter/vf_transpose_vaapi.c @@ -274,7 +274,7 @@ static const AVFilterPad transpose_vaapi_outputs[] = { { NULL } }; -AVFilter ff_vf_transpose_vaapi = { +const AVFilter ff_vf_transpose_vaapi = { .name = "transpose_vaapi", .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for transpose"), .priv_size = sizeof(TransposeVAAPIContext), diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index 198dbbaa51..0bf72169a9 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -356,7 +356,7 @@ static const AVFilterPad avfilter_vf_unsharp_outputs[] = { { NULL } }; -AVFilter ff_vf_unsharp = { +const AVFilter ff_vf_unsharp = { .name = "unsharp", .description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."), .priv_size = sizeof(UnsharpContext), diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c index d76d1b1733..200350de9f 100644 --- a/libavfilter/vf_unsharp_opencl.c +++ b/libavfilter/vf_unsharp_opencl.c @@ -398,7 +398,7 @@ static const AVFilterPad unsharp_opencl_outputs[] = { { NULL } }; -AVFilter ff_vf_unsharp_opencl = { +const AVFilter ff_vf_unsharp_opencl = { .name = "unsharp_opencl", .description = NULL_IF_CONFIG_SMALL("Apply unsharp mask to input video"), .priv_size = sizeof(UnsharpOpenCLContext), diff --git a/libavfilter/vf_untile.c b/libavfilter/vf_untile.c index 154b92d08c..9035e819d4 100644 --- a/libavfilter/vf_untile.c +++ b/libavfilter/vf_untile.c @@ -184,7 +184,7 @@ static const AVFilterPad untile_outputs[] = { { NULL } }; -AVFilter ff_vf_untile = { +const AVFilter ff_vf_untile = { .name = "untile", .description = NULL_IF_CONFIG_SMALL("Untile a frame into a sequence of frames."), .init = init, diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c index ba07181e74..b70d48e515 100644 --- a/libavfilter/vf_uspp.c +++ b/libavfilter/vf_uspp.c @@ -493,7 +493,7 @@ static const AVFilterPad uspp_outputs[] = { { NULL } }; -AVFilter ff_vf_uspp = { +const AVFilter ff_vf_uspp = { .name = "uspp", .description = NULL_IF_CONFIG_SMALL("Apply Ultra Simple / Slow Post-processing filter."), .priv_size = sizeof(USPPContext), diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 053ea8868e..c47a4015e8 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -4857,7 +4857,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_v360 = { +const AVFilter ff_vf_v360 = { .name = "v360", .description = NULL_IF_CONFIG_SMALL("Convert 360 projection of video."), .priv_size = sizeof(V360Context), diff --git a/libavfilter/vf_vaguedenoiser.c b/libavfilter/vf_vaguedenoiser.c index b510cdd628..481fc774e5 100644 --- a/libavfilter/vf_vaguedenoiser.c +++ b/libavfilter/vf_vaguedenoiser.c @@ -610,7 +610,7 @@ static const AVFilterPad vaguedenoiser_outputs[] = { { NULL } }; -AVFilter ff_vf_vaguedenoiser = { +const AVFilter ff_vf_vaguedenoiser = { .name = "vaguedenoiser", .description = NULL_IF_CONFIG_SMALL("Apply a Wavelet based Denoiser."), .priv_size = sizeof(VagueDenoiserContext), diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c index e51f8191fd..0669230890 100644 --- a/libavfilter/vf_vectorscope.c +++ b/libavfilter/vf_vectorscope.c @@ -1587,7 +1587,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_vectorscope = { +const AVFilter ff_vf_vectorscope = { .name = "vectorscope", .description = NULL_IF_CONFIG_SMALL("Video vectorscope."), .priv_size = sizeof(VectorscopeContext), diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c index 1de3dc5dac..95a693a7e1 100644 --- a/libavfilter/vf_vflip.c +++ b/libavfilter/vf_vflip.c @@ -144,7 +144,7 @@ static const AVFilterPad avfilter_vf_vflip_outputs[] = { { NULL } }; -AVFilter ff_vf_vflip = { +const AVFilter ff_vf_vflip = { .name = "vflip", .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."), .priv_size = sizeof(FlipContext), diff --git a/libavfilter/vf_vfrdet.c b/libavfilter/vf_vfrdet.c index abfa19cdcd..7e37036aef 100644 --- a/libavfilter/vf_vfrdet.c +++ b/libavfilter/vf_vfrdet.c @@ -104,7 +104,7 @@ static const AVFilterPad vfrdet_outputs[] = { { NULL } }; -AVFilter ff_vf_vfrdet = { +const AVFilter ff_vf_vfrdet = { .name = "vfrdet", .description = NULL_IF_CONFIG_SMALL("Variable frame rate detect filter."), .priv_size = sizeof(VFRDETContext), diff --git a/libavfilter/vf_vibrance.c b/libavfilter/vf_vibrance.c index edea521b16..cca677ee78 100644 --- a/libavfilter/vf_vibrance.c +++ b/libavfilter/vf_vibrance.c @@ -378,7 +378,7 @@ static const AVOption vibrance_options[] = { AVFILTER_DEFINE_CLASS(vibrance); -AVFilter ff_vf_vibrance = { +const AVFilter ff_vf_vibrance = { .name = "vibrance", .description = NULL_IF_CONFIG_SMALL("Boost or alter saturation."), .priv_size = sizeof(VibranceContext), diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c index fd7ff3be24..475d0381bc 100644 --- a/libavfilter/vf_vidstabdetect.c +++ b/libavfilter/vf_vidstabdetect.c @@ -207,7 +207,7 @@ static const AVFilterPad avfilter_vf_vidstabdetect_outputs[] = { { NULL } }; -AVFilter ff_vf_vidstabdetect = { +const AVFilter ff_vf_vidstabdetect = { .name = "vidstabdetect", .description = NULL_IF_CONFIG_SMALL("Extract relative transformations, " "pass 1 of 2 for stabilization " diff --git a/libavfilter/vf_vidstabtransform.c b/libavfilter/vf_vidstabtransform.c index d1ec1391cb..79e62c1f58 100644 --- a/libavfilter/vf_vidstabtransform.c +++ b/libavfilter/vf_vidstabtransform.c @@ -308,7 +308,7 @@ static const AVFilterPad avfilter_vf_vidstabtransform_outputs[] = { { NULL } }; -AVFilter ff_vf_vidstabtransform = { +const AVFilter ff_vf_vidstabtransform = { .name = "vidstabtransform", .description = NULL_IF_CONFIG_SMALL("Transform the frames, " "pass 2 of 2 for stabilization " diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index 0248210643..a136d038fb 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -643,7 +643,7 @@ static const AVFilterPad vif_outputs[] = { { NULL } }; -AVFilter ff_vf_vif = { +const AVFilter ff_vf_vif = { .name = "vif", .description = NULL_IF_CONFIG_SMALL("Calculate the VIF between two video streams."), .uninit = uninit, diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c index ecb04a9643..e5842b19da 100644 --- a/libavfilter/vf_vignette.c +++ b/libavfilter/vf_vignette.c @@ -342,7 +342,7 @@ static const AVFilterPad vignette_outputs[] = { { NULL } }; -AVFilter ff_vf_vignette = { +const AVFilter ff_vf_vignette = { .name = "vignette", .description = NULL_IF_CONFIG_SMALL("Make or reverse a vignette effect."), .priv_size = sizeof(VignetteContext), diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index 88d0b35095..2db4783d8d 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -355,7 +355,7 @@ static const AVFilterPad vmafmotion_outputs[] = { { NULL } }; -AVFilter ff_vf_vmafmotion = { +const AVFilter ff_vf_vmafmotion = { .name = "vmafmotion", .description = NULL_IF_CONFIG_SMALL("Calculate the VMAF Motion score."), .init = init, diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index d9c27ce43e..b9ab5c6490 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -591,7 +591,7 @@ static const AVFilterPad vpp_outputs[] = { { NULL } }; -AVFilter ff_vf_vpp_qsv = { +const AVFilter ff_vf_vpp_qsv = { .name = "vpp_qsv", .description = NULL_IF_CONFIG_SMALL("Quick Sync Video VPP."), .priv_size = sizeof(VPPContext), diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c index 1a64b2b953..c13c17e3ed 100644 --- a/libavfilter/vf_w3fdif.c +++ b/libavfilter/vf_w3fdif.c @@ -615,7 +615,7 @@ static const AVFilterPad w3fdif_outputs[] = { { NULL } }; -AVFilter ff_vf_w3fdif = { +const AVFilter ff_vf_w3fdif = { .name = "w3fdif", .description = NULL_IF_CONFIG_SMALL("Apply Martin Weston three field deinterlace."), .priv_size = sizeof(W3FDIFContext), diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index 8191da2792..2fa1815d6c 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -3490,7 +3490,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_waveform = { +const AVFilter ff_vf_waveform = { .name = "waveform", .description = NULL_IF_CONFIG_SMALL("Video waveform monitor."), .priv_size = sizeof(WaveformContext), diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c index 6139844b20..98b8d0bd06 100644 --- a/libavfilter/vf_weave.c +++ b/libavfilter/vf_weave.c @@ -190,7 +190,7 @@ static const AVFilterPad weave_outputs[] = { { NULL } }; -AVFilter ff_vf_weave = { +const AVFilter ff_vf_weave = { .name = "weave", .description = NULL_IF_CONFIG_SMALL("Weave input video fields into frames."), .priv_size = sizeof(WeaveContext), @@ -215,7 +215,7 @@ static av_cold int init(AVFilterContext *ctx) #define doubleweave_options weave_options AVFILTER_DEFINE_CLASS(doubleweave); -AVFilter ff_vf_doubleweave = { +const AVFilter ff_vf_doubleweave = { .name = "doubleweave", .description = NULL_IF_CONFIG_SMALL("Weave input video fields into double number of frames."), .priv_size = sizeof(WeaveContext), diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c index a381be4553..7226c03783 100644 --- a/libavfilter/vf_xbr.c +++ b/libavfilter/vf_xbr.c @@ -425,7 +425,7 @@ static const AVFilterPad xbr_outputs[] = { { NULL } }; -AVFilter ff_vf_xbr = { +const AVFilter ff_vf_xbr = { .name = "xbr", .description = NULL_IF_CONFIG_SMALL("Scale the input using xBR algorithm."), .inputs = xbr_inputs, diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c index cb4fae21d9..2e075cfb9a 100644 --- a/libavfilter/vf_xfade.c +++ b/libavfilter/vf_xfade.c @@ -1956,7 +1956,7 @@ static const AVFilterPad xfade_outputs[] = { { NULL } }; -AVFilter ff_vf_xfade = { +const AVFilter ff_vf_xfade = { .name = "xfade", .description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), .priv_size = sizeof(XFadeContext), diff --git a/libavfilter/vf_xfade_opencl.c b/libavfilter/vf_xfade_opencl.c index 4736043147..23c084546d 100644 --- a/libavfilter/vf_xfade_opencl.c +++ b/libavfilter/vf_xfade_opencl.c @@ -424,7 +424,7 @@ static const AVFilterPad xfade_opencl_outputs[] = { { NULL } }; -AVFilter ff_vf_xfade_opencl = { +const AVFilter ff_vf_xfade_opencl = { .name = "xfade_opencl", .description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), .priv_size = sizeof(XFadeOpenCLContext), diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c index 8b6dd69709..168a5944db 100644 --- a/libavfilter/vf_xmedian.c +++ b/libavfilter/vf_xmedian.c @@ -391,7 +391,7 @@ static const AVFilterPad outputs[] = { #if CONFIG_XMEDIAN_FILTER FRAMESYNC_DEFINE_CLASS(xmedian, XMedianContext, fs); -AVFilter ff_vf_xmedian = { +const AVFilter ff_vf_xmedian = { .name = "xmedian", .description = NULL_IF_CONFIG_SMALL("Pick median pixels from several video inputs."), .priv_size = sizeof(XMedianContext), @@ -475,7 +475,7 @@ static const AVFilterPad tmedian_outputs[] = { AVFILTER_DEFINE_CLASS(tmedian); -AVFilter ff_vf_tmedian = { +const AVFilter ff_vf_tmedian = { .name = "tmedian", .description = NULL_IF_CONFIG_SMALL("Pick median pixels from successive frames."), .priv_size = sizeof(XMedianContext), diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 43dea67add..a6942a2aa2 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -351,7 +351,7 @@ static const AVFilterPad avfilter_vf_yadif_outputs[] = { { NULL } }; -AVFilter ff_vf_yadif = { +const AVFilter ff_vf_yadif = { .name = "yadif", .description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), .priv_size = sizeof(YADIFContext), diff --git a/libavfilter/vf_yadif_cuda.c b/libavfilter/vf_yadif_cuda.c index 3841c5f0d4..4e41c8b554 100644 --- a/libavfilter/vf_yadif_cuda.c +++ b/libavfilter/vf_yadif_cuda.c @@ -373,7 +373,7 @@ static const AVFilterPad deint_cuda_outputs[] = { { NULL } }; -AVFilter ff_vf_yadif_cuda = { +const AVFilter ff_vf_yadif_cuda = { .name = "yadif_cuda", .description = NULL_IF_CONFIG_SMALL("Deinterlace CUDA frames"), .priv_size = sizeof(DeintCUDAContext), diff --git a/libavfilter/vf_yaepblur.c b/libavfilter/vf_yaepblur.c index 7c9aa7a1f4..3380f7112a 100644 --- a/libavfilter/vf_yaepblur.c +++ b/libavfilter/vf_yaepblur.c @@ -335,7 +335,7 @@ static const AVOption yaepblur_options[] = { AVFILTER_DEFINE_CLASS(yaepblur); -AVFilter ff_vf_yaepblur = { +const AVFilter ff_vf_yaepblur = { .name = "yaepblur", .description = NULL_IF_CONFIG_SMALL("Yet another edge preserving blur filter."), .priv_size = sizeof(YAEPContext), diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c index d9d53decf4..e18ebb4f11 100644 --- a/libavfilter/vf_zoompan.c +++ b/libavfilter/vf_zoompan.c @@ -377,7 +377,7 @@ static const AVFilterPad outputs[] = { { NULL } }; -AVFilter ff_vf_zoompan = { +const AVFilter ff_vf_zoompan = { .name = "zoompan", .description = NULL_IF_CONFIG_SMALL("Apply Zoom & Pan effect."), .priv_size = sizeof(ZPContext), diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c index c18a161ab4..f77aa720c4 100644 --- a/libavfilter/vf_zscale.c +++ b/libavfilter/vf_zscale.c @@ -927,7 +927,7 @@ static const AVFilterPad avfilter_vf_zscale_outputs[] = { { NULL } }; -AVFilter ff_vf_zscale = { +const AVFilter ff_vf_zscale = { .name = "zscale", .description = NULL_IF_CONFIG_SMALL("Apply resizing, colorspace and bit depth conversion."), .init_dict = init_dict, diff --git a/libavfilter/vsink_nullsink.c b/libavfilter/vsink_nullsink.c index 060a5a371f..1c796b7cb8 100644 --- a/libavfilter/vsink_nullsink.c +++ b/libavfilter/vsink_nullsink.c @@ -35,7 +35,7 @@ static const AVFilterPad avfilter_vsink_nullsink_inputs[] = { { NULL }, }; -AVFilter ff_vsink_nullsink = { +const AVFilter ff_vsink_nullsink = { .name = "nullsink", .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."), .priv_size = 0, diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c index 6fd812c54f..250c88c8da 100644 --- a/libavfilter/vsrc_cellauto.c +++ b/libavfilter/vsrc_cellauto.c @@ -327,7 +327,7 @@ static const AVFilterPad cellauto_outputs[] = { { NULL } }; -AVFilter ff_vsrc_cellauto = { +const AVFilter ff_vsrc_cellauto = { .name = "cellauto", .description = NULL_IF_CONFIG_SMALL("Create pattern generated by an elementary cellular automaton."), .priv_size = sizeof(CellAutoContext), diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c index b05ad5bf9a..904baf1360 100644 --- a/libavfilter/vsrc_gradients.c +++ b/libavfilter/vsrc_gradients.c @@ -298,7 +298,7 @@ static const AVFilterPad gradients_outputs[] = { { NULL } }; -AVFilter ff_vsrc_gradients = { +const AVFilter ff_vsrc_gradients = { .name = "gradients", .description = NULL_IF_CONFIG_SMALL("Draw a gradients."), .priv_size = sizeof(GradientsContext), diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c index 6218eb1ae6..ca12f294b8 100644 --- a/libavfilter/vsrc_life.c +++ b/libavfilter/vsrc_life.c @@ -441,7 +441,7 @@ static const AVFilterPad life_outputs[] = { { NULL} }; -AVFilter ff_vsrc_life = { +const AVFilter ff_vsrc_life = { .name = "life", .description = NULL_IF_CONFIG_SMALL("Create life."), .priv_size = sizeof(LifeContext), diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c index 761c915103..88c14f0d48 100644 --- a/libavfilter/vsrc_mandelbrot.c +++ b/libavfilter/vsrc_mandelbrot.c @@ -419,7 +419,7 @@ static const AVFilterPad mandelbrot_outputs[] = { { NULL } }; -AVFilter ff_vsrc_mandelbrot = { +const AVFilter ff_vsrc_mandelbrot = { .name = "mandelbrot", .description = NULL_IF_CONFIG_SMALL("Render a Mandelbrot fractal."), .priv_size = sizeof(MBContext), diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c index 2ea736b0b2..8aa75a24ac 100644 --- a/libavfilter/vsrc_mptestsrc.c +++ b/libavfilter/vsrc_mptestsrc.c @@ -357,7 +357,7 @@ static const AVFilterPad mptestsrc_outputs[] = { { NULL } }; -AVFilter ff_vsrc_mptestsrc = { +const AVFilter ff_vsrc_mptestsrc = { .name = "mptestsrc", .description = NULL_IF_CONFIG_SMALL("Generate various test pattern."), .priv_size = sizeof(MPTestContext), diff --git a/libavfilter/vsrc_sierpinski.c b/libavfilter/vsrc_sierpinski.c index 49d4cdfa95..7db4852892 100644 --- a/libavfilter/vsrc_sierpinski.c +++ b/libavfilter/vsrc_sierpinski.c @@ -223,7 +223,7 @@ static const AVFilterPad sierpinski_outputs[] = { { NULL } }; -AVFilter ff_vsrc_sierpinski = { +const AVFilter ff_vsrc_sierpinski = { .name = "sierpinski", .description = NULL_IF_CONFIG_SMALL("Render a Sierpinski fractal."), .priv_size = sizeof(SierpinskiContext), diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 7899c843c8..0ced726f5e 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -266,7 +266,7 @@ static const AVFilterPad color_outputs[] = { { NULL } }; -AVFilter ff_vsrc_color = { +const AVFilter ff_vsrc_color = { .name = "color", .description = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input."), .priv_class = &color_class, @@ -400,7 +400,7 @@ static const AVFilterPad haldclutsrc_outputs[] = { { NULL } }; -AVFilter ff_vsrc_haldclutsrc = { +const AVFilter ff_vsrc_haldclutsrc = { .name = "haldclutsrc", .description = NULL_IF_CONFIG_SMALL("Provide an identity Hald CLUT."), .priv_class = &haldclutsrc_class, @@ -438,7 +438,7 @@ static const AVFilterPad nullsrc_outputs[] = { { NULL }, }; -AVFilter ff_vsrc_nullsrc = { +const AVFilter ff_vsrc_nullsrc = { .name = "nullsrc", .description = NULL_IF_CONFIG_SMALL("Null video source, return unprocessed video frames."), .init = nullsrc_init, @@ -674,7 +674,7 @@ static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = { { NULL } }; -AVFilter ff_vsrc_testsrc = { +const AVFilter ff_vsrc_testsrc = { .name = "testsrc", .description = NULL_IF_CONFIG_SMALL("Generate test pattern."), .priv_size = sizeof(TestSourceContext), @@ -947,7 +947,7 @@ static const AVFilterPad avfilter_vsrc_testsrc2_outputs[] = { { NULL } }; -AVFilter ff_vsrc_testsrc2 = { +const AVFilter ff_vsrc_testsrc2 = { .name = "testsrc2", .description = NULL_IF_CONFIG_SMALL("Generate another test pattern."), .priv_size = sizeof(TestSourceContext), @@ -1122,7 +1122,7 @@ static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = { { NULL } }; -AVFilter ff_vsrc_rgbtestsrc = { +const AVFilter ff_vsrc_rgbtestsrc = { .name = "rgbtestsrc", .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), .priv_size = sizeof(TestSourceContext), @@ -1298,7 +1298,7 @@ static const AVFilterPad avfilter_vsrc_yuvtestsrc_outputs[] = { { NULL } }; -AVFilter ff_vsrc_yuvtestsrc = { +const AVFilter ff_vsrc_yuvtestsrc = { .name = "yuvtestsrc", .description = NULL_IF_CONFIG_SMALL("Generate YUV test pattern."), .priv_size = sizeof(TestSourceContext), @@ -1475,7 +1475,7 @@ static av_cold int pal75bars_init(AVFilterContext *ctx) return init(ctx); } -AVFilter ff_vsrc_pal75bars = { +const AVFilter ff_vsrc_pal75bars = { .name = "pal75bars", .description = NULL_IF_CONFIG_SMALL("Generate PAL 75% color bars."), .priv_size = sizeof(TestSourceContext), @@ -1522,7 +1522,7 @@ static av_cold int pal100bars_init(AVFilterContext *ctx) return init(ctx); } -AVFilter ff_vsrc_pal100bars = { +const AVFilter ff_vsrc_pal100bars = { .name = "pal100bars", .description = NULL_IF_CONFIG_SMALL("Generate PAL 100% color bars."), .priv_size = sizeof(TestSourceContext), @@ -1590,7 +1590,7 @@ static av_cold int smptebars_init(AVFilterContext *ctx) return init(ctx); } -AVFilter ff_vsrc_smptebars = { +const AVFilter ff_vsrc_smptebars = { .name = "smptebars", .description = NULL_IF_CONFIG_SMALL("Generate SMPTE color bars."), .priv_size = sizeof(TestSourceContext), @@ -1696,7 +1696,7 @@ static av_cold int smptehdbars_init(AVFilterContext *ctx) return init(ctx); } -AVFilter ff_vsrc_smptehdbars = { +const AVFilter ff_vsrc_smptehdbars = { .name = "smptehdbars", .description = NULL_IF_CONFIG_SMALL("Generate SMPTE HD color bars."), .priv_size = sizeof(TestSourceContext), @@ -1774,7 +1774,7 @@ static const AVFilterPad avfilter_vsrc_allyuv_outputs[] = { { NULL } }; -AVFilter ff_vsrc_allyuv = { +const AVFilter ff_vsrc_allyuv = { .name = "allyuv", .description = NULL_IF_CONFIG_SMALL("Generate all yuv colors."), .priv_size = sizeof(TestSourceContext), @@ -1851,7 +1851,7 @@ static const AVFilterPad avfilter_vsrc_allrgb_outputs[] = { { NULL } }; -AVFilter ff_vsrc_allrgb = { +const AVFilter ff_vsrc_allrgb = { .name = "allrgb", .description = NULL_IF_CONFIG_SMALL("Generate all RGB colors."), .priv_size = sizeof(TestSourceContext), From patchwork Mon Apr 19 18:09:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 27092 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp745927iob; Mon, 19 Apr 2021 11:10:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2nAb/MSaaHsNyN/1hv3RI8wahEVCwtZqcHBJgpO/oKmIyYqzOYKpQ7S2yVyvuC24acAWy X-Received: by 2002:a17:906:1a0d:: with SMTP id i13mr22577954ejf.197.1618855823833; Mon, 19 Apr 2021 11:10:23 -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 o6si14553623edi.504.2021.04.19.11.10.23; Mon, 19 Apr 2021 11:10:23 -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=rpqGvO8N; 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 444D068980B; Mon, 19 Apr 2021 21:10:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074068.outbound.protection.outlook.com [40.92.74.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6D785689730 for ; Mon, 19 Apr 2021 21:10:13 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WVPi1XyZocnB1E9yQXM/BdxyuTyogIQzFMvaLxuPHbsrsCpQ2+q8YCYyMtOJXGI/QB94VgT66SJ2AQqwHFo8VZZxOh6MW0UCcKAHCeYhGXiIH72jnfv/01ineJKRfdRyqGF7Kw036CRextlA8OAFenl+s2Rs777WPlHYrGjgh3BeGg9TftzkZx00X1ZOqMvIzo+M7pRxzX48d/NebAwciTOdrvN0/R5/XxPhYeY8LBHCez9LGwgY3Lbvifdexu//+TAu+ZcNQnPn/25NIu2RkTT+D+0Lj1Avb/P0fZK8kvg+Lm+kuoobrab0ZjrwFYIhtX9hHGqRhymIxosqIvupXg== 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-SenderADCheck; bh=m44eui/bodCqw0nmlcv/juOTilAzJIdHXRn3d/KshIk=; b=VRkOsi6OlvGCkW6hu9y9G54Oe5jwN6aVWKsKfeUN1acCZS5W9BeTQXZRu91aIhLaojrxsWybvJJ0uZujZ2UPcTZJNkTiGvXLFGR9aSnCBzUFDoKfsfAH+rCa1VdkAdSXAkWYiP50B2m5fHj3NOMuT0jEb2HJ64+XRl01gzykC+QK5HAiuyA/zptGQvmrzzW7dTcSwIVVDA+mpEYzu9F+lv4/nLGvbx/im+mkftxbjS9yYrhoQ7vq//ZI7t8knGhRNNu3BB4bxlyHK4cLOy1qoGG4zhjov/0WOWKqbYj1Drve1INpDH4l/bgver4YtivvOpCfvCVis06qRpiflKSW/w== 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=m44eui/bodCqw0nmlcv/juOTilAzJIdHXRn3d/KshIk=; b=rpqGvO8N2+J6TFdqhx7sacOA2XMtDaV0dTj6SvehUivg7AY8QYmPbLkF0kSnT7nMCxxLiTimfEsSJLfEKHDjDoCQNkY2b3WQ2eNHOKcQeS+mkeMkmHOItCFs4TNPzhn/lzvzSKG45mB6p9z/XlG8hZfp80Ri+UF+zfFoQwbuwOO3cInyR39VdF8mk4IWqhnD3ffWU4L/iWgQnHm8Puzw7LOleQynC5hkPTBoTaDr7sRJnJf1zCUwQGGU1tC1N+i1J93sgUEkKFdiJMbSe1akNJeHjEZS1h3NIOJQHHOildvLMF06RHvCKzs6GNX5SitjwuiIPeGULqXOwdHNH+09Bw== Received: from HE1EUR04FT056.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::53) by HE1EUR04HT250.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Mon, 19 Apr 2021 18:10:11 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e0d::46) by HE1EUR04FT056.mail.protection.outlook.com (2a01:111:e400:7e0d::301) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Mon, 19 Apr 2021 18:10:11 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:3234B7E03B3EE04444BD9DF10BE755556AB47A3821E6542523C0353D71EC72FB; UpperCasedChecksum:CA33BFE9DDA5C8EF30A256FD816230F035ABBC1A3B9841CADF3C4AB2984A5735; SizeAsReceived:7487; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.024; Mon, 19 Apr 2021 18:10:11 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 20:09:05 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> X-TMN: [ZNILLX7Thn5dqT4XBb+DsSj/go8EcidX] X-ClientProxiedBy: PR3PR09CA0013.eurprd09.prod.outlook.com (2603:10a6:102:b7::18) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210419180906.784013-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by PR3PR09CA0013.eurprd09.prod.outlook.com (2603:10a6:102:b7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Mon, 19 Apr 2021 18:10:10 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8b0b7b88-9ca2-4699-438d-08d9035e5f47 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/ULok4LoZGpi2I5UYHjZF4TQ1UvFRaRQeXVgsjwerwDL4KwYiPgFFls0UZN1r5Ix7gJfqErYR3vrtFRGpdKsjAUIzs92PhKsiO1omgqxpdF7B5NbiiX+ogxwT2tdimhrhysgPBLbMzw26f4UDMFwCXHfdyNwjJPYEzwgHBxkeTRzZFmz/IOrazkUvvVF3c+CAYZTNAgBRmcLI+jseAmEo5oAuqcbthj0Kj0bc8ZS/cttW+WOIkcRco2AqKiRt2leZtve77iu0tZV0k58gUL8nQ7PursMQ7Ixpj6TYI7Pg6LOqZB8BZ5WSd5yRN0swj4Uw0tD1uIFj//5jgflSiZNGGN/epwe1Uo0izdRXXl9EwjabLkU3vmMjcaKFoYmAi/okBXUNdxfVym2MFS0GlnfxyawFBdqLVv0FNpLfOQgcGRgtVn4W52g3TQbmyGiElqqLywAwm9KqMzUeKne3lo8Dt3jANrhHOslgEn/AuE4i6GgUziwj2Fj45jpMdhWwRoKO6U9+Dj1fZnReEGrqYCVRqGoEalzn7ZdVUdsskgtC4YbsEYBufT7d2pjoZtewjUKtfYfcPvOYqdf4rZnb2MEupGx4Y7G4t2+EvHbNDSNDT30sI7BW8a2bXeeOTJx5PJfwM9GW/xxZ6LuV0hd8VocTpsEpNyv/wF4rHe1vxqRVxwCdjfcx/3QWc1PcWm9gZUIU7Y8X7j9qd5tNQ== X-MS-TrafficTypeDiagnostic: HE1EUR04HT250: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wxSTfw8EvLnjtdNGlh6l+i2e6rEZzx1tvJYF1BUXq8sBHVoMEfq3tVvLBNM6fxxrcLooYXyV3n84XCo8Ct6KsXQjFlqkLR1jJ3tY9VNx4IAWFyI63HTcfHLOHqPkRSutFpz5llBX1w87F5N8LROPamc11z0gqY+qlgSoXZtJf/zMHEYMsuLqqtfejui/I5w1Xaiqx4WL6+WOnwpjFr4UCIr1is2ZcxXNyjg4CkeqaIWiMCk1oJX2PdwamHJdrGDmQ6Ga1Efgk1vTlYR72avhdmztUgT/V7ojhEQ5rWBFXgpkIsM5RddAeGpCuzy72IPzvri2qQlWipgOcPYz/phg98FLABo4ki25aLvEgV/XIGnDJ3Hbp46sCz+EBcpb9HghYOARSPi8dfbwBvWVdATtvw== X-MS-Exchange-AntiSpam-MessageData: Xbg65hI1J0iMna/cO5F1+PJmheO0AdoHY5GxyBopRTS/tIx9vmMrw0jH+Ji9ffQ14yjL6AGMTJpZE5zxkMcCgEQBElyavlOH+dad1A3RtwCYmJbDyAfWU7bg4rTQ4fxFdoogS8VbLAhz8BGK0gt6rw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b0b7b88-9ca2-4699-438d-08d9035e5f47 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2021 18:10:11.2339 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT056.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT250 Subject: [FFmpeg-devel] [PATCH 89/90] avdevice: Constify all devices 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: Jjw+HCUljJJb This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt --- libavdevice/alldevices.c | 66 +++++++++++++++++------------------ libavdevice/alsa_dec.c | 2 +- libavdevice/alsa_enc.c | 2 +- libavdevice/android_camera.c | 2 +- libavdevice/audiotoolbox.m | 2 +- libavdevice/avfoundation.m | 2 +- libavdevice/bktr.c | 2 +- libavdevice/caca.c | 2 +- libavdevice/decklink_dec_c.c | 2 +- libavdevice/decklink_enc_c.c | 2 +- libavdevice/dshow.c | 2 +- libavdevice/fbdev_dec.c | 2 +- libavdevice/fbdev_enc.c | 2 +- libavdevice/gdigrab.c | 2 +- libavdevice/iec61883.c | 2 +- libavdevice/jack.c | 2 +- libavdevice/kmsgrab.c | 2 +- libavdevice/lavfi.c | 2 +- libavdevice/libcdio.c | 2 +- libavdevice/libdc1394.c | 2 +- libavdevice/openal-dec.c | 2 +- libavdevice/opengl_enc.c | 2 +- libavdevice/oss_dec.c | 2 +- libavdevice/oss_enc.c | 2 +- libavdevice/pulse_audio_dec.c | 2 +- libavdevice/pulse_audio_enc.c | 2 +- libavdevice/sdl2.c | 2 +- libavdevice/sndio_dec.c | 2 +- libavdevice/sndio_enc.c | 2 +- libavdevice/v4l2.c | 2 +- libavdevice/v4l2enc.c | 2 +- libavdevice/vfwcap.c | 2 +- libavdevice/xcbgrab.c | 2 +- libavdevice/xv.c | 2 +- 34 files changed, 66 insertions(+), 66 deletions(-) diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index f65317018a..fbbe187a51 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -24,41 +24,41 @@ #include "avdevice.h" /* devices */ -extern AVInputFormat ff_alsa_demuxer; -extern AVOutputFormat ff_alsa_muxer; -extern AVInputFormat ff_android_camera_demuxer; -extern AVOutputFormat ff_audiotoolbox_muxer; -extern AVInputFormat ff_avfoundation_demuxer; -extern AVInputFormat ff_bktr_demuxer; -extern AVOutputFormat ff_caca_muxer; -extern AVInputFormat ff_decklink_demuxer; -extern AVOutputFormat ff_decklink_muxer; -extern AVInputFormat ff_dshow_demuxer; -extern AVInputFormat ff_fbdev_demuxer; -extern AVOutputFormat ff_fbdev_muxer; -extern AVInputFormat ff_gdigrab_demuxer; -extern AVInputFormat ff_iec61883_demuxer; -extern AVInputFormat ff_jack_demuxer; -extern AVInputFormat ff_kmsgrab_demuxer; -extern AVInputFormat ff_lavfi_demuxer; -extern AVInputFormat ff_openal_demuxer; -extern AVOutputFormat ff_opengl_muxer; -extern AVInputFormat ff_oss_demuxer; -extern AVOutputFormat ff_oss_muxer; -extern AVInputFormat ff_pulse_demuxer; -extern AVOutputFormat ff_pulse_muxer; -extern AVOutputFormat ff_sdl2_muxer; -extern AVInputFormat ff_sndio_demuxer; -extern AVOutputFormat ff_sndio_muxer; -extern AVInputFormat ff_v4l2_demuxer; -extern AVOutputFormat ff_v4l2_muxer; -extern AVInputFormat ff_vfwcap_demuxer; -extern AVInputFormat ff_xcbgrab_demuxer; -extern AVOutputFormat ff_xv_muxer; +extern const AVInputFormat ff_alsa_demuxer; +extern const AVOutputFormat ff_alsa_muxer; +extern const AVInputFormat ff_android_camera_demuxer; +extern const AVOutputFormat ff_audiotoolbox_muxer; +extern const AVInputFormat ff_avfoundation_demuxer; +extern const AVInputFormat ff_bktr_demuxer; +extern const AVOutputFormat ff_caca_muxer; +extern const AVInputFormat ff_decklink_demuxer; +extern const AVOutputFormat ff_decklink_muxer; +extern const AVInputFormat ff_dshow_demuxer; +extern const AVInputFormat ff_fbdev_demuxer; +extern const AVOutputFormat ff_fbdev_muxer; +extern const AVInputFormat ff_gdigrab_demuxer; +extern const AVInputFormat ff_iec61883_demuxer; +extern const AVInputFormat ff_jack_demuxer; +extern const AVInputFormat ff_kmsgrab_demuxer; +extern const AVInputFormat ff_lavfi_demuxer; +extern const AVInputFormat ff_openal_demuxer; +extern const AVOutputFormat ff_opengl_muxer; +extern const AVInputFormat ff_oss_demuxer; +extern const AVOutputFormat ff_oss_muxer; +extern const AVInputFormat ff_pulse_demuxer; +extern const AVOutputFormat ff_pulse_muxer; +extern const AVOutputFormat ff_sdl2_muxer; +extern const AVInputFormat ff_sndio_demuxer; +extern const AVOutputFormat ff_sndio_muxer; +extern const AVInputFormat ff_v4l2_demuxer; +extern const AVOutputFormat ff_v4l2_muxer; +extern const AVInputFormat ff_vfwcap_demuxer; +extern const AVInputFormat ff_xcbgrab_demuxer; +extern const AVOutputFormat ff_xv_muxer; /* external libraries */ -extern AVInputFormat ff_libcdio_demuxer; -extern AVInputFormat ff_libdc1394_demuxer; +extern const AVInputFormat ff_libcdio_demuxer; +extern const AVInputFormat ff_libdc1394_demuxer; #include "libavdevice/outdev_list.c" #include "libavdevice/indev_list.c" diff --git a/libavdevice/alsa_dec.c b/libavdevice/alsa_dec.c index d8d4f3293b..e93f31b146 100644 --- a/libavdevice/alsa_dec.c +++ b/libavdevice/alsa_dec.c @@ -157,7 +157,7 @@ static const AVClass alsa_demuxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, }; -AVInputFormat ff_alsa_demuxer = { +const AVInputFormat ff_alsa_demuxer = { .name = "alsa", .long_name = NULL_IF_CONFIG_SMALL("ALSA audio input"), .priv_data_size = sizeof(AlsaData), diff --git a/libavdevice/alsa_enc.c b/libavdevice/alsa_enc.c index 1a6d01e3b1..a783d8eca1 100644 --- a/libavdevice/alsa_enc.c +++ b/libavdevice/alsa_enc.c @@ -157,7 +157,7 @@ static const AVClass alsa_muxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT, }; -AVOutputFormat ff_alsa_muxer = { +const AVOutputFormat ff_alsa_muxer = { .name = "alsa", .long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"), .priv_data_size = sizeof(AlsaData), diff --git a/libavdevice/android_camera.c b/libavdevice/android_camera.c index 4a956a7f52..f089d1b6f9 100644 --- a/libavdevice/android_camera.c +++ b/libavdevice/android_camera.c @@ -859,7 +859,7 @@ static const AVClass android_camera_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_android_camera_demuxer = { +const AVInputFormat ff_android_camera_demuxer = { .name = "android_camera", .long_name = NULL_IF_CONFIG_SMALL("Android camera input device"), .priv_data_size = sizeof(AndroidCameraCtx), diff --git a/libavdevice/audiotoolbox.m b/libavdevice/audiotoolbox.m index d8c8312a00..0cb97b5e46 100644 --- a/libavdevice/audiotoolbox.m +++ b/libavdevice/audiotoolbox.m @@ -294,7 +294,7 @@ static const AVClass at_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT, }; -AVOutputFormat ff_audiotoolbox_muxer = { +const AVOutputFormat ff_audiotoolbox_muxer = { .name = "audiotoolbox", .long_name = NULL_IF_CONFIG_SMALL("AudioToolbox output device"), .priv_data_size = sizeof(ATContext), diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index 59d5b0af4f..bad3760159 100644 --- a/libavdevice/avfoundation.m +++ b/libavdevice/avfoundation.m @@ -1214,7 +1214,7 @@ static const AVClass avf_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_avfoundation_demuxer = { +const AVInputFormat ff_avfoundation_demuxer = { .name = "avfoundation", .long_name = NULL_IF_CONFIG_SMALL("AVFoundation input device"), .priv_data_size = sizeof(AVFContext), diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c index 0688028f90..e96c4a359e 100644 --- a/libavdevice/bktr.c +++ b/libavdevice/bktr.c @@ -348,7 +348,7 @@ static const AVClass bktr_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_bktr_demuxer = { +const AVInputFormat ff_bktr_demuxer = { .name = "bktr", .long_name = NULL_IF_CONFIG_SMALL("video grab"), .priv_data_size = sizeof(VideoData), diff --git a/libavdevice/caca.c b/libavdevice/caca.c index 726cfda95f..5e8d40a748 100644 --- a/libavdevice/caca.c +++ b/libavdevice/caca.c @@ -227,7 +227,7 @@ static const AVClass caca_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -AVOutputFormat ff_caca_muxer = { +const AVOutputFormat ff_caca_muxer = { .name = "caca", .long_name = NULL_IF_CONFIG_SMALL("caca (color ASCII art) output device"), .priv_data_size = sizeof(CACAContext), diff --git a/libavdevice/decklink_dec_c.c b/libavdevice/decklink_dec_c.c index 07b1b39f74..1d93e8bab5 100644 --- a/libavdevice/decklink_dec_c.c +++ b/libavdevice/decklink_dec_c.c @@ -101,7 +101,7 @@ static const AVClass decklink_demuxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_decklink_demuxer = { +const AVInputFormat ff_decklink_demuxer = { .name = "decklink", .long_name = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink input"), .flags = AVFMT_NOFILE, diff --git a/libavdevice/decklink_enc_c.c b/libavdevice/decklink_enc_c.c index f09659909f..828cf5db65 100644 --- a/libavdevice/decklink_enc_c.c +++ b/libavdevice/decklink_enc_c.c @@ -48,7 +48,7 @@ static const AVClass decklink_muxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -AVOutputFormat ff_decklink_muxer = { +const AVOutputFormat ff_decklink_muxer = { .name = "decklink", .long_name = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink output"), .audio_codec = AV_CODEC_ID_PCM_S16LE, diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 73a9a48b20..82097dfde2 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1328,7 +1328,7 @@ static const AVClass dshow_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_dshow_demuxer = { +const AVInputFormat ff_dshow_demuxer = { .name = "dshow", .long_name = NULL_IF_CONFIG_SMALL("DirectShow capture"), .priv_data_size = sizeof(struct dshow_ctx), diff --git a/libavdevice/fbdev_dec.c b/libavdevice/fbdev_dec.c index 586caeef88..b73f31f1ef 100644 --- a/libavdevice/fbdev_dec.c +++ b/libavdevice/fbdev_dec.c @@ -232,7 +232,7 @@ static const AVClass fbdev_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_fbdev_demuxer = { +const AVInputFormat ff_fbdev_demuxer = { .name = "fbdev", .long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"), .priv_data_size = sizeof(FBDevContext), diff --git a/libavdevice/fbdev_enc.c b/libavdevice/fbdev_enc.c index 4191596825..e8d8d7b85b 100644 --- a/libavdevice/fbdev_enc.c +++ b/libavdevice/fbdev_enc.c @@ -205,7 +205,7 @@ static const AVClass fbdev_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -AVOutputFormat ff_fbdev_muxer = { +const AVOutputFormat ff_fbdev_muxer = { .name = "fbdev", .long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"), .priv_data_size = sizeof(FBDevContext), diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c index 7688370643..c069232472 100644 --- a/libavdevice/gdigrab.c +++ b/libavdevice/gdigrab.c @@ -664,7 +664,7 @@ static const AVClass gdigrab_class = { }; /** gdi grabber device demuxer declaration */ -AVInputFormat ff_gdigrab_demuxer = { +const AVInputFormat ff_gdigrab_demuxer = { .name = "gdigrab", .long_name = NULL_IF_CONFIG_SMALL("GDI API Windows frame grabber"), .priv_data_size = sizeof(struct gdigrab), diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c index cafafb2672..e7b71c757a 100644 --- a/libavdevice/iec61883.c +++ b/libavdevice/iec61883.c @@ -499,7 +499,7 @@ static const AVClass iec61883_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_iec61883_demuxer = { +const AVInputFormat ff_iec61883_demuxer = { .name = "iec61883", .long_name = NULL_IF_CONFIG_SMALL("libiec61883 (new DV1394) A/V input device"), .priv_data_size = sizeof(struct iec61883_data), diff --git a/libavdevice/jack.c b/libavdevice/jack.c index 34f1c6de97..31534134f3 100644 --- a/libavdevice/jack.c +++ b/libavdevice/jack.c @@ -342,7 +342,7 @@ static const AVClass jack_indev_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, }; -AVInputFormat ff_jack_demuxer = { +const AVInputFormat ff_jack_demuxer = { .name = "jack", .long_name = NULL_IF_CONFIG_SMALL("JACK Audio Connection Kit"), .priv_data_size = sizeof(JackData), diff --git a/libavdevice/kmsgrab.c b/libavdevice/kmsgrab.c index 6cc305b16f..ba9b306c65 100644 --- a/libavdevice/kmsgrab.c +++ b/libavdevice/kmsgrab.c @@ -708,7 +708,7 @@ static const AVClass kmsgrab_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_kmsgrab_demuxer = { +const AVInputFormat ff_kmsgrab_demuxer = { .name = "kmsgrab", .long_name = NULL_IF_CONFIG_SMALL("KMS screen capture"), .priv_data_size = sizeof(KMSGrabContext), diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index b26d8b739d..57d977e7ce 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -494,7 +494,7 @@ static const AVClass lavfi_class = { .category = AV_CLASS_CATEGORY_DEVICE_INPUT, }; -AVInputFormat ff_lavfi_demuxer = { +const AVInputFormat ff_lavfi_demuxer = { .name = "lavfi", .long_name = NULL_IF_CONFIG_SMALL("Libavfilter virtual input device"), .priv_data_size = sizeof(LavfiContext), diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c index a4c9f52337..f1a1468554 100644 --- a/libavdevice/libcdio.c +++ b/libavdevice/libcdio.c @@ -182,7 +182,7 @@ static const AVClass libcdio_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, }; -AVInputFormat ff_libcdio_demuxer = { +const AVInputFormat ff_libcdio_demuxer = { .name = "libcdio", .read_header = read_header, .read_packet = read_packet, diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c index 003335fdd8..e98b88c1a2 100644 --- a/libavdevice/libdc1394.c +++ b/libavdevice/libdc1394.c @@ -288,7 +288,7 @@ static int dc1394_close(AVFormatContext * context) return 0; } -AVInputFormat ff_libdc1394_demuxer = { +const AVInputFormat ff_libdc1394_demuxer = { .name = "libdc1394", .long_name = NULL_IF_CONFIG_SMALL("dc1394 v.2 A/V grab"), .priv_data_size = sizeof(struct dc1394_data), diff --git a/libavdevice/openal-dec.c b/libavdevice/openal-dec.c index 57de665eb6..54f1203130 100644 --- a/libavdevice/openal-dec.c +++ b/libavdevice/openal-dec.c @@ -248,7 +248,7 @@ static const AVClass class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, }; -AVInputFormat ff_openal_demuxer = { +const AVInputFormat ff_openal_demuxer = { .name = "openal", .long_name = NULL_IF_CONFIG_SMALL("OpenAL audio capture device"), .priv_data_size = sizeof(al_data), diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index 2bdb8da732..9302979f46 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -1292,7 +1292,7 @@ static const AVClass opengl_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -AVOutputFormat ff_opengl_muxer = { +const AVOutputFormat ff_opengl_muxer = { .name = "opengl", .long_name = NULL_IF_CONFIG_SMALL("OpenGL output"), .priv_data_size = sizeof(OpenGLContext), diff --git a/libavdevice/oss_dec.c b/libavdevice/oss_dec.c index 13ace7000d..34efb6b184 100644 --- a/libavdevice/oss_dec.c +++ b/libavdevice/oss_dec.c @@ -132,7 +132,7 @@ static const AVClass oss_demuxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, }; -AVInputFormat ff_oss_demuxer = { +const AVInputFormat ff_oss_demuxer = { .name = "oss", .long_name = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) capture"), .priv_data_size = sizeof(OSSAudioData), diff --git a/libavdevice/oss_enc.c b/libavdevice/oss_enc.c index 274c7601aa..6c1bc042c1 100644 --- a/libavdevice/oss_enc.c +++ b/libavdevice/oss_enc.c @@ -96,7 +96,7 @@ static const AVClass oss_muxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT, }; -AVOutputFormat ff_oss_muxer = { +const AVOutputFormat ff_oss_muxer = { .name = "oss", .long_name = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) playback"), .priv_data_size = sizeof(OSSAudioData), diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c index 3777396ef6..b23d08e4d3 100644 --- a/libavdevice/pulse_audio_dec.c +++ b/libavdevice/pulse_audio_dec.c @@ -386,7 +386,7 @@ static const AVClass pulse_demuxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, }; -AVInputFormat ff_pulse_demuxer = { +const AVInputFormat ff_pulse_demuxer = { .name = "pulse", .long_name = NULL_IF_CONFIG_SMALL("Pulse audio input"), .priv_data_size = sizeof(PulseData), diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c index e0a631b227..bfd7be4f37 100644 --- a/libavdevice/pulse_audio_enc.c +++ b/libavdevice/pulse_audio_enc.c @@ -778,7 +778,7 @@ static const AVClass pulse_muxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT, }; -AVOutputFormat ff_pulse_muxer = { +const AVOutputFormat ff_pulse_muxer = { .name = "pulse", .long_name = NULL_IF_CONFIG_SMALL("Pulse audio output"), .priv_data_size = sizeof(PulseData), diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c index d6fc74a66c..a9023153f1 100644 --- a/libavdevice/sdl2.c +++ b/libavdevice/sdl2.c @@ -355,7 +355,7 @@ static const AVClass sdl2_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -AVOutputFormat ff_sdl2_muxer = { +const AVOutputFormat ff_sdl2_muxer = { .name = "sdl,sdl2", .long_name = NULL_IF_CONFIG_SMALL("SDL2 output device"), .priv_data_size = sizeof(SDLContext), diff --git a/libavdevice/sndio_dec.c b/libavdevice/sndio_dec.c index ebb485a2c7..ec8fa4126a 100644 --- a/libavdevice/sndio_dec.c +++ b/libavdevice/sndio_dec.c @@ -109,7 +109,7 @@ static const AVClass sndio_demuxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, }; -AVInputFormat ff_sndio_demuxer = { +const AVInputFormat ff_sndio_demuxer = { .name = "sndio", .long_name = NULL_IF_CONFIG_SMALL("sndio audio capture"), .priv_data_size = sizeof(SndioData), diff --git a/libavdevice/sndio_enc.c b/libavdevice/sndio_enc.c index f6dd290108..2e698d7c35 100644 --- a/libavdevice/sndio_enc.c +++ b/libavdevice/sndio_enc.c @@ -86,7 +86,7 @@ static const AVClass sndio_muxer_class = { .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT, }; -AVOutputFormat ff_sndio_muxer = { +const AVOutputFormat ff_sndio_muxer = { .name = "sndio", .long_name = NULL_IF_CONFIG_SMALL("sndio audio playback"), .priv_data_size = sizeof(SndioData), diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index a5226d5e6f..a5149a9132 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -1117,7 +1117,7 @@ static const AVClass v4l2_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -AVInputFormat ff_v4l2_demuxer = { +const AVInputFormat ff_v4l2_demuxer = { .name = "video4linux2,v4l2", .long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"), .priv_data_size = sizeof(struct video_data), diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c index 6e5cb88491..787fe53547 100644 --- a/libavdevice/v4l2enc.c +++ b/libavdevice/v4l2enc.c @@ -109,7 +109,7 @@ static const AVClass v4l2_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -AVOutputFormat ff_v4l2_muxer = { +const AVOutputFormat ff_v4l2_muxer = { .name = "video4linux2,v4l2", .long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 output device"), .priv_data_size = sizeof(V4L2Context), diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index b3ef5f3448..6fad466f8a 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -482,7 +482,7 @@ static const AVClass vfw_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT }; -AVInputFormat ff_vfwcap_demuxer = { +const AVInputFormat ff_vfwcap_demuxer = { .name = "vfwcap", .long_name = NULL_IF_CONFIG_SMALL("VfW video capture"), .priv_data_size = sizeof(struct vfw_ctx), diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c index fbe89d472d..8164101c5e 100644 --- a/libavdevice/xcbgrab.c +++ b/libavdevice/xcbgrab.c @@ -900,7 +900,7 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_xcbgrab_demuxer = { +const AVInputFormat ff_xcbgrab_demuxer = { .name = "x11grab", .long_name = NULL_IF_CONFIG_SMALL("X11 screen capture, using XCB"), .priv_data_size = sizeof(XCBGrabContext), diff --git a/libavdevice/xv.c b/libavdevice/xv.c index 50dc4e0d04..24ba3179f6 100644 --- a/libavdevice/xv.c +++ b/libavdevice/xv.c @@ -376,7 +376,7 @@ static const AVClass xv_class = { .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, }; -AVOutputFormat ff_xv_muxer = { +const AVOutputFormat ff_xv_muxer = { .name = "xv", .long_name = NULL_IF_CONFIG_SMALL("XV (XVideo) output device"), .priv_data_size = sizeof(XVContext), From patchwork Mon Apr 19 18:09:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 27091 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp746356iob; Mon, 19 Apr 2021 11:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDBtvqIJNFPzuQwqaUIK2gtTo8RRIvSZKTb/faFgnTr/a99cOqTd9tAeQiasPbiKZoFofv X-Received: by 2002:a17:906:3018:: with SMTP id 24mr23583543ejz.186.1618855855608; Mon, 19 Apr 2021 11:10: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 d8si3798137ejp.214.2021.04.19.11.10.55; Mon, 19 Apr 2021 11:10: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=s+HknaGj; 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 64AD6689810; Mon, 19 Apr 2021 21:10:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074015.outbound.protection.outlook.com [40.92.74.15]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 77922687FAC for ; Mon, 19 Apr 2021 21:10:44 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PcPIY0ujidS75LghPtAAe4xGsfL/CP+V3VdtkBJ4HTLWTvmBG0GAObFjkgtPAcQs8wM+So/me+nW7M2cz3t+O+N90RwpB0M5W6zjjBXNwicNepZphebzYB0tbbbtujnM/TdfLN9Vme2DcbUqR2MLtuA+1eWIouSEv66boeUqq+uwiszvOCk0Rhhk0TUj/HhgH8L8z1FjuGXaHS746tUOSxsgZyToU20sOL4EMbNKqWWpav8D1RZ4l1h0/EZoOcsOcgsSZXOVnVTbcv9b69GEbcNgjRkymAGECYuhKSnOWUSK9b9tokSpepP+paAghTYaOReW2mIaKuvgZBPjDsIbfQ== 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-SenderADCheck; bh=dcmvtRErx+FEo9b5hcBez8dQO6cBBh7O2OMnKOrUavU=; b=Aac7v7MOurv4iDvZ3QzyabR7YFAjJfyPofW3XgLBPUqzZcq310v/xHpKsvlgjLaMtb8Ltuaf3uUCBO/nhMItA6xpWkQpUgxHhEMQr9J40qpKPgPGzt7J0BL8KcDNZZjqft13HNwX/KI4TYI3jiNVxbkHH9YG+6Ua1eoJKu5G8fQ5unhxjmJ8AoB3C8AArzXjmyd5bBK6BQBSQVCh5KrMDh7HOD1K+A44VNOthKzxOw9VJV82fylTG+f3z+kNyCe9xCIrQpNnXuVMoT2gnVMgyjf2BGJhG7Oyj8NGiE/dsfTFiFQoRuJWV//wo69vbbOxyc6ohiP28+tNYq8yQNblRg== 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=dcmvtRErx+FEo9b5hcBez8dQO6cBBh7O2OMnKOrUavU=; b=s+HknaGjcf3CRhJ9uSA2jdx66Cna9wFz08Y6BgWVKT0Qv3LWojjrpWiSkzqC1hCtTbDxGJPmVLbdNdq7P0WqmylCdBneBunsanYIWKDYsCkEsxzHWC5sMBM8rgJ7NX8VIuSNm3Z/q3zowNqJAHvM1AuILXo01n95IuUld6Bp+T4W2/2l9JajIB6MVIvuandXW2frMWTW9EsGOrcNcCI7JVrKMn9ZuOwqSd/qS8vueRzsuff2bFYjInv1u7TkrUadP2NEm6HCeHrbmCN/HZCUjouUVTDCXTj71HXhtCSmr24w/LN+beHVE9Uo67iL7JoC7byhOGd9i8y4QzyZDjs7MQ== Received: from HE1EUR04FT056.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::42) by HE1EUR04HT233.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::418) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Mon, 19 Apr 2021 18:10:33 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e0d::46) by HE1EUR04FT056.mail.protection.outlook.com (2a01:111:e400:7e0d::301) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Mon, 19 Apr 2021 18:10:33 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:A219727851D715ED853E8B43A8DB7DA58E9B8AEC1B2DB1E6EF34DA0DC52DCDCE; UpperCasedChecksum:BFE02197CE88F79E78E922C2547A3B3BB5B5C8B08B3483E297D090834E905D77; SizeAsReceived:7494; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.024; Mon, 19 Apr 2021 18:10:33 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 20:09:06 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> X-TMN: [28RQW6RdJI3ZefmAgiF7Eppt3vZ2hBZ3] X-ClientProxiedBy: PR3PR09CA0013.eurprd09.prod.outlook.com (2603:10a6:102:b7::18) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210419180906.784013-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by PR3PR09CA0013.eurprd09.prod.outlook.com (2603:10a6:102:b7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Mon, 19 Apr 2021 18:10:30 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: cd4ed022-96e8-4aec-39b1-08d9035e6b53 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXso3HBMtYYIuL6f8PkhXcHmJDcwmG5j1mS158zTrKs+EU8YRjl6zbCcUpvOqOxSns7NSqeAmNnxG4AVq0v8ZatPepbcafhex8FRn1+Ex3fowTzG9Dmtah1VjbKoLuAZaZ9q/5xNTxD1ihoZJwmBzNaNuCfEE5Cv+yhweZP7VKSVa7M1yhcD9nkGCEWbtqd0os6zp2BwLsArgnmmNbNMjYXJMngFmv5vtoGWYlRJx4EsWkWSRrpYMeuP3LAsmrcx7pXzT/cMSI54WbpNOxOInjMzVKvbdAoVyuv4X4rw/qQuSqKnR9b04Btpk3NM6/CNUf9Wg7aRja5wMcr7BVRwHBk5N5JLkMBrFfJVF0L6Ghf832I4ecdBtVSQ+njF6mX1TepGwvLPlj5r9CnSjkccEcfhsXkBK9iYq9bhXxJBsrjCb+Vd8DormnmrLqhmt7miqmuu5DCi1d/RfkKeL6et9U4Vw+jezDvVNm6lQMm9kXUU5iy5q/ZVLGol3XCfB7MtV2CDA2q3JXO25f1wpaC+xAlZxJctPPTrGNoKXrBPV67F1loEGTWkXvhYyx+8F0t8DD6UVbegPUub4gAaAy74Fl9RcsB8nrL/CFWl4sTVd/ji39eRwo+kM/oblXuq3et6EdTjFZ2Eqer41AwtrU+GDTJlA0HvaDMqVl5OcP+SSYoBT7uiXKXl4xKL9pOKD3hsHjgtlCcxEQAXxv2Z3LwuOpQXT2TzUBT6x8= X-MS-TrafficTypeDiagnostic: HE1EUR04HT233: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /xkxaXiHhELuNtLTz9T5HAQamb6XjPskEjHxRA7gPBnQLJUS9X7S6tITXl5G6sJ9c5Ye/opEpGpMbuKgmlzElTVR6wQ7YK+O5giNMdoZDb2PwdghLkmiq38TgoChHdzxIKdntSEX9Qi6z7Sz+3kfBESks7gMlQTQNmWG80ITNRdIVBAF3VbB85ms5Dt2GemNxg0cxfn7xhG6c+olYBI3bUERbE0Bm0qYhKw0KRuj8SkelMJ/oNvK69GdZijFQ4FdJO5nVfOJPYCinJN1oFiLcw1k6R86L8QX5TYUlB7m2W2rFNlfpA0Phx5zP9QECLCCp9uDy00aBsxc0QSbAbqBMNIcW1MrDVGdWwofD1ydGOAlBnafqcRiV3gKFbfYwJL/D0VjoXZezr5mLoCqobfpyA== X-MS-Exchange-AntiSpam-MessageData: lzLm1sTheaYWnrrXAGD3pXYxGVQko1AJT/ZZ81UdK7aJQWXYmqPdc6YvuE39FlJhiFsrdqA8Zd1s2IMzVJIcG++cYmZBwZywEa0aDQFM/gJ0vt+sPXD7rsgMbU2KL4MUaXxxMTm0mm6jjMCrBzGdmQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd4ed022-96e8-4aec-39b1-08d9035e6b53 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2021 18:10:33.2572 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT056.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT233 Subject: [FFmpeg-devel] [PATCH 90/90] avformat: Constify all muxer/demuxers 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: LochgUuqcOnM This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt --- libavformat/3dostr.c | 2 +- libavformat/4xm.c | 2 +- libavformat/a64.c | 2 +- libavformat/aacdec.c | 2 +- libavformat/aadec.c | 2 +- libavformat/aaxdec.c | 2 +- libavformat/ac3dec.c | 4 +- libavformat/acedec.c | 2 +- libavformat/acm.c | 2 +- libavformat/act.c | 2 +- libavformat/adp.c | 2 +- libavformat/ads.c | 2 +- libavformat/adtsenc.c | 2 +- libavformat/adxdec.c | 2 +- libavformat/aea.c | 2 +- libavformat/afc.c | 2 +- libavformat/aiffdec.c | 2 +- libavformat/aiffenc.c | 2 +- libavformat/aixdec.c | 2 +- libavformat/allformats.c | 998 +++++++++++++++---------------- libavformat/alp.c | 4 +- libavformat/amr.c | 8 +- libavformat/amvenc.c | 2 +- libavformat/anm.c | 2 +- libavformat/apc.c | 2 +- libavformat/ape.c | 2 +- libavformat/apm.c | 4 +- libavformat/apngdec.c | 2 +- libavformat/apngenc.c | 2 +- libavformat/aptxdec.c | 4 +- libavformat/aqtitledec.c | 2 +- libavformat/argo_asf.c | 4 +- libavformat/argo_brp.c | 2 +- libavformat/asfdec_f.c | 2 +- libavformat/asfdec_o.c | 2 +- libavformat/asfenc.c | 4 +- libavformat/assdec.c | 2 +- libavformat/assenc.c | 2 +- libavformat/astdec.c | 2 +- libavformat/astenc.c | 2 +- libavformat/au.c | 4 +- libavformat/av1dec.c | 4 +- libavformat/avidec.c | 2 +- libavformat/avienc.c | 2 +- libavformat/avisynth.c | 2 +- libavformat/avr.c | 2 +- libavformat/avs.c | 2 +- libavformat/bethsoftvid.c | 2 +- libavformat/bfi.c | 2 +- libavformat/bink.c | 2 +- libavformat/binka.c | 2 +- libavformat/bintext.c | 8 +- libavformat/bit.c | 4 +- libavformat/bmv.c | 2 +- libavformat/boadec.c | 2 +- libavformat/brstm.c | 4 +- libavformat/c93.c | 2 +- libavformat/cafdec.c | 2 +- libavformat/cafenc.c | 2 +- libavformat/cdg.c | 2 +- libavformat/cdxl.c | 2 +- libavformat/chromaprint.c | 2 +- libavformat/cinedec.c | 2 +- libavformat/codec2.c | 6 +- libavformat/concatdec.c | 2 +- libavformat/crcenc.c | 2 +- libavformat/dashdec.c | 2 +- libavformat/dashenc.c | 2 +- libavformat/dauddec.c | 2 +- libavformat/daudenc.c | 2 +- libavformat/dcstr.c | 2 +- libavformat/derf.c | 2 +- libavformat/dfa.c | 2 +- libavformat/dhav.c | 2 +- libavformat/dsfdec.c | 2 +- libavformat/dsicin.c | 2 +- libavformat/dss.c | 2 +- libavformat/dtsdec.c | 2 +- libavformat/dtshddec.c | 2 +- libavformat/dv.c | 2 +- libavformat/dvenc.c | 2 +- libavformat/dxa.c | 2 +- libavformat/eacdata.c | 2 +- libavformat/electronicarts.c | 2 +- libavformat/epafdec.c | 2 +- libavformat/ffmetadec.c | 2 +- libavformat/ffmetaenc.c | 2 +- libavformat/fifo.c | 2 +- libavformat/fifo_test.c | 2 +- libavformat/filmstripdec.c | 2 +- libavformat/filmstripenc.c | 2 +- libavformat/fitsdec.c | 2 +- libavformat/fitsenc.c | 2 +- libavformat/flacdec.c | 2 +- libavformat/flacenc.c | 2 +- libavformat/flic.c | 2 +- libavformat/flvdec.c | 6 +- libavformat/flvenc.c | 2 +- libavformat/framecrcenc.c | 2 +- libavformat/frmdec.c | 2 +- libavformat/fsb.c | 2 +- libavformat/fwse.c | 2 +- libavformat/g722.c | 2 +- libavformat/g723_1.c | 2 +- libavformat/g726.c | 4 +- libavformat/g729dec.c | 2 +- libavformat/gdv.c | 2 +- libavformat/genh.c | 2 +- libavformat/gif.c | 2 +- libavformat/gifdec.c | 2 +- libavformat/gsmdec.c | 2 +- libavformat/gxf.c | 2 +- libavformat/gxfenc.c | 2 +- libavformat/hashenc.c | 10 +- libavformat/hca.c | 2 +- libavformat/hcom.c | 2 +- libavformat/hdsenc.c | 2 +- libavformat/hls.c | 2 +- libavformat/hlsenc.c | 2 +- libavformat/hnm.c | 2 +- libavformat/icodec.c | 2 +- libavformat/icoenc.c | 2 +- libavformat/idcin.c | 2 +- libavformat/idroqdec.c | 2 +- libavformat/idroqenc.c | 2 +- libavformat/iff.c | 2 +- libavformat/ifv.c | 2 +- libavformat/ilbc.c | 4 +- libavformat/img2_alias_pix.c | 2 +- libavformat/img2_brender_pix.c | 2 +- libavformat/img2dec.c | 6 +- libavformat/img2enc.c | 4 +- libavformat/imx.c | 2 +- libavformat/ingenientdec.c | 2 +- libavformat/ipmovie.c | 2 +- libavformat/ipudec.c | 2 +- libavformat/ircamdec.c | 2 +- libavformat/ircamenc.c | 2 +- libavformat/iss.c | 2 +- libavformat/iv8.c | 2 +- libavformat/ivfdec.c | 2 +- libavformat/ivfenc.c | 2 +- libavformat/jacosubdec.c | 2 +- libavformat/jacosubenc.c | 2 +- libavformat/jvdec.c | 2 +- libavformat/kvag.c | 4 +- libavformat/latmenc.c | 2 +- libavformat/libgme.c | 2 +- libavformat/libmodplug.c | 2 +- libavformat/libopenmpt.c | 2 +- libavformat/lmlm4.c | 2 +- libavformat/loasdec.c | 2 +- libavformat/lrcdec.c | 2 +- libavformat/lrcenc.c | 2 +- libavformat/luodatdec.c | 2 +- libavformat/lvfdec.c | 2 +- libavformat/lxfdec.c | 2 +- libavformat/matroskadec.c | 4 +- libavformat/matroskaenc.c | 6 +- libavformat/mca.c | 2 +- libavformat/mccdec.c | 2 +- libavformat/mgsts.c | 2 +- libavformat/microdvddec.c | 2 +- libavformat/microdvdenc.c | 2 +- libavformat/mkvtimestamp_v2.c | 2 +- libavformat/mlpdec.c | 4 +- libavformat/mlvdec.c | 2 +- libavformat/mm.c | 2 +- libavformat/mmf.c | 4 +- libavformat/mods.c | 2 +- libavformat/moflex.c | 2 +- libavformat/mov.c | 2 +- libavformat/movenc.c | 16 +- libavformat/mp3dec.c | 2 +- libavformat/mp3enc.c | 2 +- libavformat/mpc.c | 2 +- libavformat/mpc8.c | 2 +- libavformat/mpeg.c | 4 +- libavformat/mpegenc.c | 18 +- libavformat/mpegts.c | 6 +- libavformat/mpegtsenc.c | 2 +- libavformat/mpjpeg.c | 2 +- libavformat/mpjpegdec.c | 2 +- libavformat/mpl2dec.c | 2 +- libavformat/mpsubdec.c | 2 +- libavformat/msf.c | 2 +- libavformat/msnwc_tcp.c | 2 +- libavformat/mspdec.c | 2 +- libavformat/mtaf.c | 2 +- libavformat/mtv.c | 2 +- libavformat/musx.c | 2 +- libavformat/mvdec.c | 2 +- libavformat/mvi.c | 2 +- libavformat/mxfdec.c | 2 +- libavformat/mxfenc.c | 10 +- libavformat/mxg.c | 2 +- libavformat/ncdec.c | 2 +- libavformat/nistspheredec.c | 2 +- libavformat/nspdec.c | 2 +- libavformat/nsvdec.c | 2 +- libavformat/nullenc.c | 2 +- libavformat/nutdec.c | 2 +- libavformat/nutenc.c | 2 +- libavformat/nuv.c | 2 +- libavformat/oggdec.c | 2 +- libavformat/oggenc.c | 10 +- libavformat/omadec.c | 2 +- libavformat/omaenc.c | 2 +- libavformat/paf.c | 2 +- libavformat/pcmdec.c | 4 +- libavformat/pcmenc.c | 2 +- libavformat/pjsdec.c | 2 +- libavformat/pmpdec.c | 2 +- libavformat/pp_bnk.c | 2 +- libavformat/psxstr.c | 2 +- libavformat/pva.c | 2 +- libavformat/pvfdec.c | 2 +- libavformat/qcp.c | 2 +- libavformat/r3d.c | 2 +- libavformat/rawdec.c | 2 +- libavformat/rawdec.h | 4 +- libavformat/rawenc.c | 62 +- libavformat/rawvideodec.c | 2 +- libavformat/realtextdec.c | 2 +- libavformat/redspark.c | 2 +- libavformat/rl2.c | 2 +- libavformat/rm.h | 2 +- libavformat/rmdec.c | 6 +- libavformat/rmenc.c | 2 +- libavformat/rpl.c | 2 +- libavformat/rsd.c | 2 +- libavformat/rsodec.c | 2 +- libavformat/rsoenc.c | 2 +- libavformat/rtpenc.c | 2 +- libavformat/rtpenc_mpegts.c | 2 +- libavformat/rtsp.c | 4 +- libavformat/rtspdec.c | 2 +- libavformat/rtspenc.c | 2 +- libavformat/s337m.c | 2 +- libavformat/samidec.c | 2 +- libavformat/sapdec.c | 2 +- libavformat/sapenc.c | 2 +- libavformat/sbcdec.c | 2 +- libavformat/sbgdec.c | 2 +- libavformat/sccdec.c | 2 +- libavformat/sccenc.c | 2 +- libavformat/sdr2.c | 2 +- libavformat/sdsdec.c | 2 +- libavformat/sdxdec.c | 2 +- libavformat/segafilm.c | 2 +- libavformat/segafilmenc.c | 2 +- libavformat/segment.c | 4 +- libavformat/serdec.c | 2 +- libavformat/sga.c | 2 +- libavformat/shortendec.c | 2 +- libavformat/sierravmd.c | 2 +- libavformat/siff.c | 2 +- libavformat/smacker.c | 2 +- libavformat/smjpegdec.c | 2 +- libavformat/smjpegenc.c | 2 +- libavformat/smoothstreamingenc.c | 2 +- libavformat/smush.c | 2 +- libavformat/sol.c | 2 +- libavformat/soxdec.c | 2 +- libavformat/soxenc.c | 2 +- libavformat/spdifdec.c | 2 +- libavformat/spdifenc.c | 2 +- libavformat/srtdec.c | 2 +- libavformat/srtenc.c | 2 +- libavformat/stldec.c | 2 +- libavformat/subviewer1dec.c | 2 +- libavformat/subviewerdec.c | 2 +- libavformat/supdec.c | 2 +- libavformat/supenc.c | 2 +- libavformat/svag.c | 2 +- libavformat/svs.c | 2 +- libavformat/swfdec.c | 2 +- libavformat/swfenc.c | 4 +- libavformat/takdec.c | 2 +- libavformat/tedcaptionsdec.c | 2 +- libavformat/tee.c | 2 +- libavformat/thp.c | 2 +- libavformat/tiertexseq.c | 2 +- libavformat/tmv.c | 2 +- libavformat/tta.c | 2 +- libavformat/ttaenc.c | 2 +- libavformat/ttmlenc.c | 2 +- libavformat/tty.c | 2 +- libavformat/txd.c | 2 +- libavformat/ty.c | 2 +- libavformat/uncodedframecrcenc.c | 2 +- libavformat/v210.c | 4 +- libavformat/vag.c | 2 +- libavformat/vapoursynth.c | 2 +- libavformat/vc1test.c | 2 +- libavformat/vc1testenc.c | 2 +- libavformat/vividas.c | 2 +- libavformat/vivo.c | 2 +- libavformat/vocdec.c | 2 +- libavformat/vocenc.c | 2 +- libavformat/vpk.c | 2 +- libavformat/vplayerdec.c | 2 +- libavformat/vqf.c | 2 +- libavformat/wavdec.c | 4 +- libavformat/wavenc.c | 4 +- libavformat/wc3movie.c | 2 +- libavformat/webm_chunk.c | 2 +- libavformat/webmdashenc.c | 2 +- libavformat/webpenc.c | 2 +- libavformat/webvttdec.c | 2 +- libavformat/webvttenc.c | 2 +- libavformat/westwood_aud.c | 2 +- libavformat/westwood_vqa.c | 2 +- libavformat/wsddec.c | 2 +- libavformat/wtvdec.c | 2 +- libavformat/wtvenc.c | 2 +- libavformat/wvdec.c | 2 +- libavformat/wvedec.c | 2 +- libavformat/wvenc.c | 2 +- libavformat/xa.c | 2 +- libavformat/xmv.c | 2 +- libavformat/xvag.c | 2 +- libavformat/xwma.c | 2 +- libavformat/yop.c | 2 +- libavformat/yuv4mpegdec.c | 2 +- libavformat/yuv4mpegenc.c | 2 +- 326 files changed, 925 insertions(+), 925 deletions(-) diff --git a/libavformat/3dostr.c b/libavformat/3dostr.c index 534f205fc4..0c136c9ea0 100644 --- a/libavformat/3dostr.c +++ b/libavformat/3dostr.c @@ -191,7 +191,7 @@ static int threedostr_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; } -AVInputFormat ff_threedostr_demuxer = { +const AVInputFormat ff_threedostr_demuxer = { .name = "3dostr", .long_name = NULL_IF_CONFIG_SMALL("3DO STR"), .read_probe = threedostr_probe, diff --git a/libavformat/4xm.c b/libavformat/4xm.c index 30f1b05324..427eaaddd0 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -393,7 +393,7 @@ static int fourxm_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_fourxm_demuxer = { +const AVInputFormat ff_fourxm_demuxer = { .name = "4xm", .long_name = NULL_IF_CONFIG_SMALL("4X Technologies"), .priv_data_size = sizeof(FourxmDemuxContext), diff --git a/libavformat/a64.c b/libavformat/a64.c index 2a0489dae4..e6018f06d3 100644 --- a/libavformat/a64.c +++ b/libavformat/a64.c @@ -58,7 +58,7 @@ static int a64_write_header(AVFormatContext *s) return 0; } -AVOutputFormat ff_a64_muxer = { +const AVOutputFormat ff_a64_muxer = { .name = "a64", .long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"), .extensions = "a64, A64", diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c index ea3203df36..ba468909e9 100644 --- a/libavformat/aacdec.c +++ b/libavformat/aacdec.c @@ -206,7 +206,7 @@ retry: return ret; } -AVInputFormat ff_aac_demuxer = { +const AVInputFormat ff_aac_demuxer = { .name = "aac", .long_name = NULL_IF_CONFIG_SMALL("raw ADTS AAC (Advanced Audio Coding)"), .read_probe = adts_aac_probe, diff --git a/libavformat/aadec.c b/libavformat/aadec.c index 2575e98153..21051d79b8 100644 --- a/libavformat/aadec.c +++ b/libavformat/aadec.c @@ -406,7 +406,7 @@ static const AVClass aa_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_aa_demuxer = { +const AVInputFormat ff_aa_demuxer = { .name = "aa", .long_name = NULL_IF_CONFIG_SMALL("Audible AA format files"), .priv_class = &aa_class, diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c index c6d2d1c8d1..0cbf933dfd 100644 --- a/libavformat/aaxdec.c +++ b/libavformat/aaxdec.c @@ -402,7 +402,7 @@ static int aax_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_aax_demuxer = { +const AVInputFormat ff_aax_demuxer = { .name = "aax", .long_name = NULL_IF_CONFIG_SMALL("CRI AAX"), .priv_data_size = sizeof(AAXContext), diff --git a/libavformat/ac3dec.c b/libavformat/ac3dec.c index 1f87939388..246c483671 100644 --- a/libavformat/ac3dec.c +++ b/libavformat/ac3dec.c @@ -103,7 +103,7 @@ static int ac3_probe(const AVProbeData *p) } FF_RAW_DEMUXER_CLASS(ac3) -AVInputFormat ff_ac3_demuxer = { +const AVInputFormat ff_ac3_demuxer = { .name = "ac3", .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"), .read_probe = ac3_probe, @@ -124,7 +124,7 @@ static int eac3_probe(const AVProbeData *p) } FF_RAW_DEMUXER_CLASS(eac3) -AVInputFormat ff_eac3_demuxer = { +const AVInputFormat ff_eac3_demuxer = { .name = "eac3", .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"), .read_probe = eac3_probe, diff --git a/libavformat/acedec.c b/libavformat/acedec.c index f1bc512d57..a52a0f0e54 100644 --- a/libavformat/acedec.c +++ b/libavformat/acedec.c @@ -104,7 +104,7 @@ static int ace_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align); } -AVInputFormat ff_ace_demuxer = { +const AVInputFormat ff_ace_demuxer = { .name = "ace", .long_name = NULL_IF_CONFIG_SMALL("tri-Ace Audio Container"), .read_probe = ace_probe, diff --git a/libavformat/acm.c b/libavformat/acm.c index 5e03cf8bff..c78a408aa0 100644 --- a/libavformat/acm.c +++ b/libavformat/acm.c @@ -61,7 +61,7 @@ static int acm_read_header(AVFormatContext *s) } FF_RAW_DEMUXER_CLASS(acm) -AVInputFormat ff_acm_demuxer = { +const AVInputFormat ff_acm_demuxer = { .name = "acm", .long_name = NULL_IF_CONFIG_SMALL("Interplay ACM"), .read_probe = acm_probe, diff --git a/libavformat/act.c b/libavformat/act.c index 26425ca1bb..5688952a31 100644 --- a/libavformat/act.c +++ b/libavformat/act.c @@ -197,7 +197,7 @@ static int read_packet(AVFormatContext *s, return ret; } -AVInputFormat ff_act_demuxer = { +const AVInputFormat ff_act_demuxer = { .name = "act", .long_name = "ACT Voice file format", .priv_data_size = sizeof(ACTContext), diff --git a/libavformat/adp.c b/libavformat/adp.c index b0ee09753e..6d5f9d274e 100644 --- a/libavformat/adp.c +++ b/libavformat/adp.c @@ -83,7 +83,7 @@ static int adp_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_adp_demuxer = { +const AVInputFormat ff_adp_demuxer = { .name = "adp", .long_name = NULL_IF_CONFIG_SMALL("ADP"), .read_probe = adp_probe, diff --git a/libavformat/ads.c b/libavformat/ads.c index 544d652829..e7b419ce8d 100644 --- a/libavformat/ads.c +++ b/libavformat/ads.c @@ -80,7 +80,7 @@ static int ads_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_ads_demuxer = { +const AVInputFormat ff_ads_demuxer = { .name = "ads", .long_name = NULL_IF_CONFIG_SMALL("Sony PS2 ADS"), .read_probe = ads_probe, diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c index 14214eb0b9..5de920894b 100644 --- a/libavformat/adtsenc.c +++ b/libavformat/adtsenc.c @@ -227,7 +227,7 @@ static const AVClass adts_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_adts_muxer = { +const AVOutputFormat ff_adts_muxer = { .name = "adts", .long_name = NULL_IF_CONFIG_SMALL("ADTS AAC (Advanced Audio Coding)"), .mime_type = "audio/aac", diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c index a265c87dea..d91d43d114 100644 --- a/libavformat/adxdec.c +++ b/libavformat/adxdec.c @@ -129,7 +129,7 @@ static int adx_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_adx_demuxer = { +const AVInputFormat ff_adx_demuxer = { .name = "adx", .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"), .read_probe = adx_probe, diff --git a/libavformat/aea.c b/libavformat/aea.c index bdeed64254..14d0840cf3 100644 --- a/libavformat/aea.c +++ b/libavformat/aea.c @@ -98,7 +98,7 @@ static int aea_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_aea_demuxer = { +const AVInputFormat ff_aea_demuxer = { .name = "aea", .long_name = NULL_IF_CONFIG_SMALL("MD STUDIO audio"), .read_probe = aea_read_probe, diff --git a/libavformat/afc.c b/libavformat/afc.c index 2da04eb5dc..a99f65472d 100644 --- a/libavformat/afc.c +++ b/libavformat/afc.c @@ -69,7 +69,7 @@ static int afc_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_afc_demuxer = { +const AVInputFormat ff_afc_demuxer = { .name = "afc", .long_name = NULL_IF_CONFIG_SMALL("AFC"), .priv_data_size = sizeof(AFCDemuxContext), diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 1b693b71a3..cade05a9d6 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -424,7 +424,7 @@ static int aiff_read_packet(AVFormatContext *s, return 0; } -AVInputFormat ff_aiff_demuxer = { +const AVInputFormat ff_aiff_demuxer = { .name = "aiff", .long_name = NULL_IF_CONFIG_SMALL("Audio IFF"), .priv_data_size = sizeof(AIFFInputContext), diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c index 725e06b3bd..24bc17400e 100644 --- a/libavformat/aiffenc.c +++ b/libavformat/aiffenc.c @@ -285,7 +285,7 @@ static const AVClass aiff_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_aiff_muxer = { +const AVOutputFormat ff_aiff_muxer = { .name = "aiff", .long_name = NULL_IF_CONFIG_SMALL("Audio IFF"), .mime_type = "audio/aiff", diff --git a/libavformat/aixdec.c b/libavformat/aixdec.c index b536bc4b01..59c3d60da3 100644 --- a/libavformat/aixdec.c +++ b/libavformat/aixdec.c @@ -129,7 +129,7 @@ static int aix_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_aix_demuxer = { +const AVInputFormat ff_aix_demuxer = { .name = "aix", .long_name = NULL_IF_CONFIG_SMALL("CRI AIX"), .read_probe = aix_probe, diff --git a/libavformat/allformats.c b/libavformat/allformats.c index f450c1709b..101078df22 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -24,508 +24,508 @@ #include "avformat.h" /* (de)muxers */ -extern AVOutputFormat ff_a64_muxer; -extern AVInputFormat ff_aa_demuxer; -extern AVInputFormat ff_aac_demuxer; -extern AVInputFormat ff_aax_demuxer; -extern AVInputFormat ff_ac3_demuxer; -extern AVOutputFormat ff_ac3_muxer; -extern AVInputFormat ff_ace_demuxer; -extern AVInputFormat ff_acm_demuxer; -extern AVInputFormat ff_act_demuxer; -extern AVInputFormat ff_adf_demuxer; -extern AVInputFormat ff_adp_demuxer; -extern AVInputFormat ff_ads_demuxer; -extern AVOutputFormat ff_adts_muxer; -extern AVInputFormat ff_adx_demuxer; -extern AVOutputFormat ff_adx_muxer; -extern AVInputFormat ff_aea_demuxer; -extern AVInputFormat ff_afc_demuxer; -extern AVInputFormat ff_aiff_demuxer; -extern AVOutputFormat ff_aiff_muxer; -extern AVInputFormat ff_aix_demuxer; -extern AVInputFormat ff_alp_demuxer; -extern AVOutputFormat ff_alp_muxer; -extern AVInputFormat ff_amr_demuxer; -extern AVOutputFormat ff_amr_muxer; -extern AVInputFormat ff_amrnb_demuxer; -extern AVInputFormat ff_amrwb_demuxer; -extern AVOutputFormat ff_amv_muxer; -extern AVInputFormat ff_anm_demuxer; -extern AVInputFormat ff_apc_demuxer; -extern AVInputFormat ff_ape_demuxer; -extern AVInputFormat ff_apm_demuxer; -extern AVOutputFormat ff_apm_muxer; -extern AVInputFormat ff_apng_demuxer; -extern AVOutputFormat ff_apng_muxer; -extern AVInputFormat ff_aptx_demuxer; -extern AVOutputFormat ff_aptx_muxer; -extern AVInputFormat ff_aptx_hd_demuxer; -extern AVOutputFormat ff_aptx_hd_muxer; -extern AVInputFormat ff_aqtitle_demuxer; -extern AVInputFormat ff_argo_asf_demuxer; -extern AVOutputFormat ff_argo_asf_muxer; -extern AVInputFormat ff_argo_brp_demuxer; -extern AVInputFormat ff_asf_demuxer; -extern AVOutputFormat ff_asf_muxer; -extern AVInputFormat ff_asf_o_demuxer; -extern AVInputFormat ff_ass_demuxer; -extern AVOutputFormat ff_ass_muxer; -extern AVInputFormat ff_ast_demuxer; -extern AVOutputFormat ff_ast_muxer; -extern AVOutputFormat ff_asf_stream_muxer; -extern AVInputFormat ff_au_demuxer; -extern AVOutputFormat ff_au_muxer; -extern AVInputFormat ff_av1_demuxer; -extern AVInputFormat ff_avi_demuxer; -extern AVOutputFormat ff_avi_muxer; -extern AVInputFormat ff_avisynth_demuxer; -extern AVOutputFormat ff_avm2_muxer; -extern AVInputFormat ff_avr_demuxer; -extern AVInputFormat ff_avs_demuxer; -extern AVInputFormat ff_avs2_demuxer; -extern AVOutputFormat ff_avs2_muxer; -extern AVInputFormat ff_avs3_demuxer; -extern AVInputFormat ff_bethsoftvid_demuxer; -extern AVInputFormat ff_bfi_demuxer; -extern AVInputFormat ff_bintext_demuxer; -extern AVInputFormat ff_bink_demuxer; -extern AVInputFormat ff_binka_demuxer; -extern AVInputFormat ff_bit_demuxer; -extern AVOutputFormat ff_bit_muxer; -extern AVInputFormat ff_bmv_demuxer; -extern AVInputFormat ff_bfstm_demuxer; -extern AVInputFormat ff_brstm_demuxer; -extern AVInputFormat ff_boa_demuxer; -extern AVInputFormat ff_c93_demuxer; -extern AVInputFormat ff_caf_demuxer; -extern AVOutputFormat ff_caf_muxer; -extern AVInputFormat ff_cavsvideo_demuxer; -extern AVOutputFormat ff_cavsvideo_muxer; -extern AVInputFormat ff_cdg_demuxer; -extern AVInputFormat ff_cdxl_demuxer; -extern AVInputFormat ff_cine_demuxer; -extern AVInputFormat ff_codec2_demuxer; -extern AVOutputFormat ff_codec2_muxer; -extern AVInputFormat ff_codec2raw_demuxer; -extern AVOutputFormat ff_codec2raw_muxer; -extern AVInputFormat ff_concat_demuxer; -extern AVOutputFormat ff_crc_muxer; -extern AVInputFormat ff_dash_demuxer; -extern AVOutputFormat ff_dash_muxer; -extern AVInputFormat ff_data_demuxer; -extern AVOutputFormat ff_data_muxer; -extern AVInputFormat ff_daud_demuxer; -extern AVOutputFormat ff_daud_muxer; -extern AVInputFormat ff_dcstr_demuxer; -extern AVInputFormat ff_derf_demuxer; -extern AVInputFormat ff_dfa_demuxer; -extern AVInputFormat ff_dhav_demuxer; -extern AVInputFormat ff_dirac_demuxer; -extern AVOutputFormat ff_dirac_muxer; -extern AVInputFormat ff_dnxhd_demuxer; -extern AVOutputFormat ff_dnxhd_muxer; -extern AVInputFormat ff_dsf_demuxer; -extern AVInputFormat ff_dsicin_demuxer; -extern AVInputFormat ff_dss_demuxer; -extern AVInputFormat ff_dts_demuxer; -extern AVOutputFormat ff_dts_muxer; -extern AVInputFormat ff_dtshd_demuxer; -extern AVInputFormat ff_dv_demuxer; -extern AVOutputFormat ff_dv_muxer; -extern AVInputFormat ff_dvbsub_demuxer; -extern AVInputFormat ff_dvbtxt_demuxer; -extern AVInputFormat ff_dxa_demuxer; -extern AVInputFormat ff_ea_demuxer; -extern AVInputFormat ff_ea_cdata_demuxer; -extern AVInputFormat ff_eac3_demuxer; -extern AVOutputFormat ff_eac3_muxer; -extern AVInputFormat ff_epaf_demuxer; -extern AVOutputFormat ff_f4v_muxer; -extern AVInputFormat ff_ffmetadata_demuxer; -extern AVOutputFormat ff_ffmetadata_muxer; -extern AVOutputFormat ff_fifo_muxer; -extern AVOutputFormat ff_fifo_test_muxer; -extern AVInputFormat ff_filmstrip_demuxer; -extern AVOutputFormat ff_filmstrip_muxer; -extern AVInputFormat ff_fits_demuxer; -extern AVOutputFormat ff_fits_muxer; -extern AVInputFormat ff_flac_demuxer; -extern AVOutputFormat ff_flac_muxer; -extern AVInputFormat ff_flic_demuxer; -extern AVInputFormat ff_flv_demuxer; -extern AVOutputFormat ff_flv_muxer; -extern AVInputFormat ff_live_flv_demuxer; -extern AVInputFormat ff_fourxm_demuxer; -extern AVOutputFormat ff_framecrc_muxer; -extern AVOutputFormat ff_framehash_muxer; -extern AVOutputFormat ff_framemd5_muxer; -extern AVInputFormat ff_frm_demuxer; -extern AVInputFormat ff_fsb_demuxer; -extern AVInputFormat ff_fwse_demuxer; -extern AVInputFormat ff_g722_demuxer; -extern AVOutputFormat ff_g722_muxer; -extern AVInputFormat ff_g723_1_demuxer; -extern AVOutputFormat ff_g723_1_muxer; -extern AVInputFormat ff_g726_demuxer; -extern AVOutputFormat ff_g726_muxer; -extern AVInputFormat ff_g726le_demuxer; -extern AVOutputFormat ff_g726le_muxer; -extern AVInputFormat ff_g729_demuxer; -extern AVInputFormat ff_gdv_demuxer; -extern AVInputFormat ff_genh_demuxer; -extern AVInputFormat ff_gif_demuxer; -extern AVOutputFormat ff_gif_muxer; -extern AVInputFormat ff_gsm_demuxer; -extern AVOutputFormat ff_gsm_muxer; -extern AVInputFormat ff_gxf_demuxer; -extern AVOutputFormat ff_gxf_muxer; -extern AVInputFormat ff_h261_demuxer; -extern AVOutputFormat ff_h261_muxer; -extern AVInputFormat ff_h263_demuxer; -extern AVOutputFormat ff_h263_muxer; -extern AVInputFormat ff_h264_demuxer; -extern AVOutputFormat ff_h264_muxer; -extern AVOutputFormat ff_hash_muxer; -extern AVInputFormat ff_hca_demuxer; -extern AVInputFormat ff_hcom_demuxer; -extern AVOutputFormat ff_hds_muxer; -extern AVInputFormat ff_hevc_demuxer; -extern AVOutputFormat ff_hevc_muxer; -extern AVInputFormat ff_hls_demuxer; -extern AVOutputFormat ff_hls_muxer; -extern AVInputFormat ff_hnm_demuxer; -extern AVInputFormat ff_ico_demuxer; -extern AVOutputFormat ff_ico_muxer; -extern AVInputFormat ff_idcin_demuxer; -extern AVInputFormat ff_idf_demuxer; -extern AVInputFormat ff_iff_demuxer; -extern AVInputFormat ff_ifv_demuxer; -extern AVInputFormat ff_ilbc_demuxer; -extern AVOutputFormat ff_ilbc_muxer; -extern AVInputFormat ff_image2_demuxer; -extern AVOutputFormat ff_image2_muxer; -extern AVInputFormat ff_image2pipe_demuxer; -extern AVOutputFormat ff_image2pipe_muxer; -extern AVInputFormat ff_image2_alias_pix_demuxer; -extern AVInputFormat ff_image2_brender_pix_demuxer; -extern AVInputFormat ff_ingenient_demuxer; -extern AVInputFormat ff_ipmovie_demuxer; -extern AVOutputFormat ff_ipod_muxer; -extern AVInputFormat ff_ipu_demuxer; -extern AVInputFormat ff_ircam_demuxer; -extern AVOutputFormat ff_ircam_muxer; -extern AVOutputFormat ff_ismv_muxer; -extern AVInputFormat ff_iss_demuxer; -extern AVInputFormat ff_iv8_demuxer; -extern AVInputFormat ff_ivf_demuxer; -extern AVOutputFormat ff_ivf_muxer; -extern AVInputFormat ff_ivr_demuxer; -extern AVInputFormat ff_jacosub_demuxer; -extern AVOutputFormat ff_jacosub_muxer; -extern AVInputFormat ff_jv_demuxer; -extern AVInputFormat ff_kux_demuxer; -extern AVInputFormat ff_kvag_demuxer; -extern AVOutputFormat ff_kvag_muxer; -extern AVOutputFormat ff_latm_muxer; -extern AVInputFormat ff_lmlm4_demuxer; -extern AVInputFormat ff_loas_demuxer; -extern AVInputFormat ff_luodat_demuxer; -extern AVInputFormat ff_lrc_demuxer; -extern AVOutputFormat ff_lrc_muxer; -extern AVInputFormat ff_lvf_demuxer; -extern AVInputFormat ff_lxf_demuxer; -extern AVInputFormat ff_m4v_demuxer; -extern AVOutputFormat ff_m4v_muxer; -extern AVInputFormat ff_mca_demuxer; -extern AVInputFormat ff_mcc_demuxer; -extern AVOutputFormat ff_md5_muxer; -extern AVInputFormat ff_matroska_demuxer; -extern AVOutputFormat ff_matroska_muxer; -extern AVOutputFormat ff_matroska_audio_muxer; -extern AVInputFormat ff_mgsts_demuxer; -extern AVInputFormat ff_microdvd_demuxer; -extern AVOutputFormat ff_microdvd_muxer; -extern AVInputFormat ff_mjpeg_demuxer; -extern AVOutputFormat ff_mjpeg_muxer; -extern AVInputFormat ff_mjpeg_2000_demuxer; -extern AVInputFormat ff_mlp_demuxer; -extern AVOutputFormat ff_mlp_muxer; -extern AVInputFormat ff_mlv_demuxer; -extern AVInputFormat ff_mm_demuxer; -extern AVInputFormat ff_mmf_demuxer; -extern AVOutputFormat ff_mmf_muxer; -extern AVInputFormat ff_mods_demuxer; -extern AVInputFormat ff_moflex_demuxer; -extern AVInputFormat ff_mov_demuxer; -extern AVOutputFormat ff_mov_muxer; -extern AVOutputFormat ff_mp2_muxer; -extern AVInputFormat ff_mp3_demuxer; -extern AVOutputFormat ff_mp3_muxer; -extern AVOutputFormat ff_mp4_muxer; -extern AVInputFormat ff_mpc_demuxer; -extern AVInputFormat ff_mpc8_demuxer; -extern AVOutputFormat ff_mpeg1system_muxer; -extern AVOutputFormat ff_mpeg1vcd_muxer; -extern AVOutputFormat ff_mpeg1video_muxer; -extern AVOutputFormat ff_mpeg2dvd_muxer; -extern AVOutputFormat ff_mpeg2svcd_muxer; -extern AVOutputFormat ff_mpeg2video_muxer; -extern AVOutputFormat ff_mpeg2vob_muxer; -extern AVInputFormat ff_mpegps_demuxer; -extern AVInputFormat ff_mpegts_demuxer; -extern AVOutputFormat ff_mpegts_muxer; -extern AVInputFormat ff_mpegtsraw_demuxer; -extern AVInputFormat ff_mpegvideo_demuxer; -extern AVInputFormat ff_mpjpeg_demuxer; -extern AVOutputFormat ff_mpjpeg_muxer; -extern AVInputFormat ff_mpl2_demuxer; -extern AVInputFormat ff_mpsub_demuxer; -extern AVInputFormat ff_msf_demuxer; -extern AVInputFormat ff_msnwc_tcp_demuxer; -extern AVInputFormat ff_msp_demuxer; -extern AVInputFormat ff_mtaf_demuxer; -extern AVInputFormat ff_mtv_demuxer; -extern AVInputFormat ff_musx_demuxer; -extern AVInputFormat ff_mv_demuxer; -extern AVInputFormat ff_mvi_demuxer; -extern AVInputFormat ff_mxf_demuxer; -extern AVOutputFormat ff_mxf_muxer; -extern AVOutputFormat ff_mxf_d10_muxer; -extern AVOutputFormat ff_mxf_opatom_muxer; -extern AVInputFormat ff_mxg_demuxer; -extern AVInputFormat ff_nc_demuxer; -extern AVInputFormat ff_nistsphere_demuxer; -extern AVInputFormat ff_nsp_demuxer; -extern AVInputFormat ff_nsv_demuxer; -extern AVOutputFormat ff_null_muxer; -extern AVInputFormat ff_nut_demuxer; -extern AVOutputFormat ff_nut_muxer; -extern AVInputFormat ff_nuv_demuxer; -extern AVInputFormat ff_obu_demuxer; -extern AVOutputFormat ff_oga_muxer; -extern AVInputFormat ff_ogg_demuxer; -extern AVOutputFormat ff_ogg_muxer; -extern AVOutputFormat ff_ogv_muxer; -extern AVInputFormat ff_oma_demuxer; -extern AVOutputFormat ff_oma_muxer; -extern AVOutputFormat ff_opus_muxer; -extern AVInputFormat ff_paf_demuxer; -extern AVInputFormat ff_pcm_alaw_demuxer; -extern AVOutputFormat ff_pcm_alaw_muxer; -extern AVInputFormat ff_pcm_mulaw_demuxer; -extern AVOutputFormat ff_pcm_mulaw_muxer; -extern AVInputFormat ff_pcm_vidc_demuxer; -extern AVOutputFormat ff_pcm_vidc_muxer; -extern AVInputFormat ff_pcm_f64be_demuxer; -extern AVOutputFormat ff_pcm_f64be_muxer; -extern AVInputFormat ff_pcm_f64le_demuxer; -extern AVOutputFormat ff_pcm_f64le_muxer; -extern AVInputFormat ff_pcm_f32be_demuxer; -extern AVOutputFormat ff_pcm_f32be_muxer; -extern AVInputFormat ff_pcm_f32le_demuxer; -extern AVOutputFormat ff_pcm_f32le_muxer; -extern AVInputFormat ff_pcm_s32be_demuxer; -extern AVOutputFormat ff_pcm_s32be_muxer; -extern AVInputFormat ff_pcm_s32le_demuxer; -extern AVOutputFormat ff_pcm_s32le_muxer; -extern AVInputFormat ff_pcm_s24be_demuxer; -extern AVOutputFormat ff_pcm_s24be_muxer; -extern AVInputFormat ff_pcm_s24le_demuxer; -extern AVOutputFormat ff_pcm_s24le_muxer; -extern AVInputFormat ff_pcm_s16be_demuxer; -extern AVOutputFormat ff_pcm_s16be_muxer; -extern AVInputFormat ff_pcm_s16le_demuxer; -extern AVOutputFormat ff_pcm_s16le_muxer; -extern AVInputFormat ff_pcm_s8_demuxer; -extern AVOutputFormat ff_pcm_s8_muxer; -extern AVInputFormat ff_pcm_u32be_demuxer; -extern AVOutputFormat ff_pcm_u32be_muxer; -extern AVInputFormat ff_pcm_u32le_demuxer; -extern AVOutputFormat ff_pcm_u32le_muxer; -extern AVInputFormat ff_pcm_u24be_demuxer; -extern AVOutputFormat ff_pcm_u24be_muxer; -extern AVInputFormat ff_pcm_u24le_demuxer; -extern AVOutputFormat ff_pcm_u24le_muxer; -extern AVInputFormat ff_pcm_u16be_demuxer; -extern AVOutputFormat ff_pcm_u16be_muxer; -extern AVInputFormat ff_pcm_u16le_demuxer; -extern AVOutputFormat ff_pcm_u16le_muxer; -extern AVInputFormat ff_pcm_u8_demuxer; -extern AVOutputFormat ff_pcm_u8_muxer; -extern AVInputFormat ff_pjs_demuxer; -extern AVInputFormat ff_pmp_demuxer; -extern AVInputFormat ff_pp_bnk_demuxer; -extern AVOutputFormat ff_psp_muxer; -extern AVInputFormat ff_pva_demuxer; -extern AVInputFormat ff_pvf_demuxer; -extern AVInputFormat ff_qcp_demuxer; -extern AVInputFormat ff_r3d_demuxer; -extern AVInputFormat ff_rawvideo_demuxer; -extern AVOutputFormat ff_rawvideo_muxer; -extern AVInputFormat ff_realtext_demuxer; -extern AVInputFormat ff_redspark_demuxer; -extern AVInputFormat ff_rl2_demuxer; -extern AVInputFormat ff_rm_demuxer; -extern AVOutputFormat ff_rm_muxer; -extern AVInputFormat ff_roq_demuxer; -extern AVOutputFormat ff_roq_muxer; -extern AVInputFormat ff_rpl_demuxer; -extern AVInputFormat ff_rsd_demuxer; -extern AVInputFormat ff_rso_demuxer; -extern AVOutputFormat ff_rso_muxer; -extern AVInputFormat ff_rtp_demuxer; -extern AVOutputFormat ff_rtp_muxer; -extern AVOutputFormat ff_rtp_mpegts_muxer; -extern AVInputFormat ff_rtsp_demuxer; -extern AVOutputFormat ff_rtsp_muxer; -extern AVInputFormat ff_s337m_demuxer; -extern AVInputFormat ff_sami_demuxer; -extern AVInputFormat ff_sap_demuxer; -extern AVOutputFormat ff_sap_muxer; -extern AVInputFormat ff_sbc_demuxer; -extern AVOutputFormat ff_sbc_muxer; -extern AVInputFormat ff_sbg_demuxer; -extern AVInputFormat ff_scc_demuxer; -extern AVOutputFormat ff_scc_muxer; -extern AVInputFormat ff_sdp_demuxer; -extern AVInputFormat ff_sdr2_demuxer; -extern AVInputFormat ff_sds_demuxer; -extern AVInputFormat ff_sdx_demuxer; -extern AVInputFormat ff_segafilm_demuxer; -extern AVOutputFormat ff_segafilm_muxer; -extern AVOutputFormat ff_segment_muxer; -extern AVOutputFormat ff_stream_segment_muxer; -extern AVInputFormat ff_ser_demuxer; -extern AVInputFormat ff_sga_demuxer; -extern AVInputFormat ff_shorten_demuxer; -extern AVInputFormat ff_siff_demuxer; -extern AVInputFormat ff_simbiosis_imx_demuxer; -extern AVInputFormat ff_sln_demuxer; -extern AVInputFormat ff_smacker_demuxer; -extern AVInputFormat ff_smjpeg_demuxer; -extern AVOutputFormat ff_smjpeg_muxer; -extern AVOutputFormat ff_smoothstreaming_muxer; -extern AVInputFormat ff_smush_demuxer; -extern AVInputFormat ff_sol_demuxer; -extern AVInputFormat ff_sox_demuxer; -extern AVOutputFormat ff_sox_muxer; -extern AVOutputFormat ff_spx_muxer; -extern AVInputFormat ff_spdif_demuxer; -extern AVOutputFormat ff_spdif_muxer; -extern AVInputFormat ff_srt_demuxer; -extern AVOutputFormat ff_srt_muxer; -extern AVInputFormat ff_str_demuxer; -extern AVInputFormat ff_stl_demuxer; -extern AVOutputFormat ff_streamhash_muxer; -extern AVInputFormat ff_subviewer1_demuxer; -extern AVInputFormat ff_subviewer_demuxer; -extern AVInputFormat ff_sup_demuxer; -extern AVOutputFormat ff_sup_muxer; -extern AVInputFormat ff_svag_demuxer; -extern AVInputFormat ff_svs_demuxer; -extern AVInputFormat ff_swf_demuxer; -extern AVOutputFormat ff_swf_muxer; -extern AVInputFormat ff_tak_demuxer; -extern AVOutputFormat ff_tee_muxer; -extern AVInputFormat ff_tedcaptions_demuxer; -extern AVOutputFormat ff_tg2_muxer; -extern AVOutputFormat ff_tgp_muxer; -extern AVInputFormat ff_thp_demuxer; -extern AVInputFormat ff_threedostr_demuxer; -extern AVInputFormat ff_tiertexseq_demuxer; -extern AVOutputFormat ff_mkvtimestamp_v2_muxer; -extern AVInputFormat ff_tmv_demuxer; -extern AVInputFormat ff_truehd_demuxer; -extern AVOutputFormat ff_truehd_muxer; -extern AVInputFormat ff_tta_demuxer; -extern AVOutputFormat ff_tta_muxer; -extern AVOutputFormat ff_ttml_muxer; -extern AVInputFormat ff_txd_demuxer; -extern AVInputFormat ff_tty_demuxer; -extern AVInputFormat ff_ty_demuxer; -extern AVOutputFormat ff_uncodedframecrc_muxer; -extern AVInputFormat ff_v210_demuxer; -extern AVInputFormat ff_v210x_demuxer; -extern AVInputFormat ff_vag_demuxer; -extern AVInputFormat ff_vc1_demuxer; -extern AVOutputFormat ff_vc1_muxer; -extern AVInputFormat ff_vc1t_demuxer; -extern AVOutputFormat ff_vc1t_muxer; -extern AVInputFormat ff_vividas_demuxer; -extern AVInputFormat ff_vivo_demuxer; -extern AVInputFormat ff_vmd_demuxer; -extern AVInputFormat ff_vobsub_demuxer; -extern AVInputFormat ff_voc_demuxer; -extern AVOutputFormat ff_voc_muxer; -extern AVInputFormat ff_vpk_demuxer; -extern AVInputFormat ff_vplayer_demuxer; -extern AVInputFormat ff_vqf_demuxer; -extern AVInputFormat ff_w64_demuxer; -extern AVOutputFormat ff_w64_muxer; -extern AVInputFormat ff_wav_demuxer; -extern AVOutputFormat ff_wav_muxer; -extern AVInputFormat ff_wc3_demuxer; -extern AVOutputFormat ff_webm_muxer; -extern AVInputFormat ff_webm_dash_manifest_demuxer; -extern AVOutputFormat ff_webm_dash_manifest_muxer; -extern AVOutputFormat ff_webm_chunk_muxer; -extern AVOutputFormat ff_webp_muxer; -extern AVInputFormat ff_webvtt_demuxer; -extern AVOutputFormat ff_webvtt_muxer; -extern AVInputFormat ff_wsaud_demuxer; -extern AVInputFormat ff_wsd_demuxer; -extern AVInputFormat ff_wsvqa_demuxer; -extern AVInputFormat ff_wtv_demuxer; -extern AVOutputFormat ff_wtv_muxer; -extern AVInputFormat ff_wve_demuxer; -extern AVInputFormat ff_wv_demuxer; -extern AVOutputFormat ff_wv_muxer; -extern AVInputFormat ff_xa_demuxer; -extern AVInputFormat ff_xbin_demuxer; -extern AVInputFormat ff_xmv_demuxer; -extern AVInputFormat ff_xvag_demuxer; -extern AVInputFormat ff_xwma_demuxer; -extern AVInputFormat ff_yop_demuxer; -extern AVInputFormat ff_yuv4mpegpipe_demuxer; -extern AVOutputFormat ff_yuv4mpegpipe_muxer; +extern const AVOutputFormat ff_a64_muxer; +extern const AVInputFormat ff_aa_demuxer; +extern const AVInputFormat ff_aac_demuxer; +extern const AVInputFormat ff_aax_demuxer; +extern const AVInputFormat ff_ac3_demuxer; +extern const AVOutputFormat ff_ac3_muxer; +extern const AVInputFormat ff_ace_demuxer; +extern const AVInputFormat ff_acm_demuxer; +extern const AVInputFormat ff_act_demuxer; +extern const AVInputFormat ff_adf_demuxer; +extern const AVInputFormat ff_adp_demuxer; +extern const AVInputFormat ff_ads_demuxer; +extern const AVOutputFormat ff_adts_muxer; +extern const AVInputFormat ff_adx_demuxer; +extern const AVOutputFormat ff_adx_muxer; +extern const AVInputFormat ff_aea_demuxer; +extern const AVInputFormat ff_afc_demuxer; +extern const AVInputFormat ff_aiff_demuxer; +extern const AVOutputFormat ff_aiff_muxer; +extern const AVInputFormat ff_aix_demuxer; +extern const AVInputFormat ff_alp_demuxer; +extern const AVOutputFormat ff_alp_muxer; +extern const AVInputFormat ff_amr_demuxer; +extern const AVOutputFormat ff_amr_muxer; +extern const AVInputFormat ff_amrnb_demuxer; +extern const AVInputFormat ff_amrwb_demuxer; +extern const AVOutputFormat ff_amv_muxer; +extern const AVInputFormat ff_anm_demuxer; +extern const AVInputFormat ff_apc_demuxer; +extern const AVInputFormat ff_ape_demuxer; +extern const AVInputFormat ff_apm_demuxer; +extern const AVOutputFormat ff_apm_muxer; +extern const AVInputFormat ff_apng_demuxer; +extern const AVOutputFormat ff_apng_muxer; +extern const AVInputFormat ff_aptx_demuxer; +extern const AVOutputFormat ff_aptx_muxer; +extern const AVInputFormat ff_aptx_hd_demuxer; +extern const AVOutputFormat ff_aptx_hd_muxer; +extern const AVInputFormat ff_aqtitle_demuxer; +extern const AVInputFormat ff_argo_asf_demuxer; +extern const AVOutputFormat ff_argo_asf_muxer; +extern const AVInputFormat ff_argo_brp_demuxer; +extern const AVInputFormat ff_asf_demuxer; +extern const AVOutputFormat ff_asf_muxer; +extern const AVInputFormat ff_asf_o_demuxer; +extern const AVInputFormat ff_ass_demuxer; +extern const AVOutputFormat ff_ass_muxer; +extern const AVInputFormat ff_ast_demuxer; +extern const AVOutputFormat ff_ast_muxer; +extern const AVOutputFormat ff_asf_stream_muxer; +extern const AVInputFormat ff_au_demuxer; +extern const AVOutputFormat ff_au_muxer; +extern const AVInputFormat ff_av1_demuxer; +extern const AVInputFormat ff_avi_demuxer; +extern const AVOutputFormat ff_avi_muxer; +extern const AVInputFormat ff_avisynth_demuxer; +extern const AVOutputFormat ff_avm2_muxer; +extern const AVInputFormat ff_avr_demuxer; +extern const AVInputFormat ff_avs_demuxer; +extern const AVInputFormat ff_avs2_demuxer; +extern const AVOutputFormat ff_avs2_muxer; +extern const AVInputFormat ff_avs3_demuxer; +extern const AVInputFormat ff_bethsoftvid_demuxer; +extern const AVInputFormat ff_bfi_demuxer; +extern const AVInputFormat ff_bintext_demuxer; +extern const AVInputFormat ff_bink_demuxer; +extern const AVInputFormat ff_binka_demuxer; +extern const AVInputFormat ff_bit_demuxer; +extern const AVOutputFormat ff_bit_muxer; +extern const AVInputFormat ff_bmv_demuxer; +extern const AVInputFormat ff_bfstm_demuxer; +extern const AVInputFormat ff_brstm_demuxer; +extern const AVInputFormat ff_boa_demuxer; +extern const AVInputFormat ff_c93_demuxer; +extern const AVInputFormat ff_caf_demuxer; +extern const AVOutputFormat ff_caf_muxer; +extern const AVInputFormat ff_cavsvideo_demuxer; +extern const AVOutputFormat ff_cavsvideo_muxer; +extern const AVInputFormat ff_cdg_demuxer; +extern const AVInputFormat ff_cdxl_demuxer; +extern const AVInputFormat ff_cine_demuxer; +extern const AVInputFormat ff_codec2_demuxer; +extern const AVOutputFormat ff_codec2_muxer; +extern const AVInputFormat ff_codec2raw_demuxer; +extern const AVOutputFormat ff_codec2raw_muxer; +extern const AVInputFormat ff_concat_demuxer; +extern const AVOutputFormat ff_crc_muxer; +extern const AVInputFormat ff_dash_demuxer; +extern const AVOutputFormat ff_dash_muxer; +extern const AVInputFormat ff_data_demuxer; +extern const AVOutputFormat ff_data_muxer; +extern const AVInputFormat ff_daud_demuxer; +extern const AVOutputFormat ff_daud_muxer; +extern const AVInputFormat ff_dcstr_demuxer; +extern const AVInputFormat ff_derf_demuxer; +extern const AVInputFormat ff_dfa_demuxer; +extern const AVInputFormat ff_dhav_demuxer; +extern const AVInputFormat ff_dirac_demuxer; +extern const AVOutputFormat ff_dirac_muxer; +extern const AVInputFormat ff_dnxhd_demuxer; +extern const AVOutputFormat ff_dnxhd_muxer; +extern const AVInputFormat ff_dsf_demuxer; +extern const AVInputFormat ff_dsicin_demuxer; +extern const AVInputFormat ff_dss_demuxer; +extern const AVInputFormat ff_dts_demuxer; +extern const AVOutputFormat ff_dts_muxer; +extern const AVInputFormat ff_dtshd_demuxer; +extern const AVInputFormat ff_dv_demuxer; +extern const AVOutputFormat ff_dv_muxer; +extern const AVInputFormat ff_dvbsub_demuxer; +extern const AVInputFormat ff_dvbtxt_demuxer; +extern const AVInputFormat ff_dxa_demuxer; +extern const AVInputFormat ff_ea_demuxer; +extern const AVInputFormat ff_ea_cdata_demuxer; +extern const AVInputFormat ff_eac3_demuxer; +extern const AVOutputFormat ff_eac3_muxer; +extern const AVInputFormat ff_epaf_demuxer; +extern const AVOutputFormat ff_f4v_muxer; +extern const AVInputFormat ff_ffmetadata_demuxer; +extern const AVOutputFormat ff_ffmetadata_muxer; +extern const AVOutputFormat ff_fifo_muxer; +extern const AVOutputFormat ff_fifo_test_muxer; +extern const AVInputFormat ff_filmstrip_demuxer; +extern const AVOutputFormat ff_filmstrip_muxer; +extern const AVInputFormat ff_fits_demuxer; +extern const AVOutputFormat ff_fits_muxer; +extern const AVInputFormat ff_flac_demuxer; +extern const AVOutputFormat ff_flac_muxer; +extern const AVInputFormat ff_flic_demuxer; +extern const AVInputFormat ff_flv_demuxer; +extern const AVOutputFormat ff_flv_muxer; +extern const AVInputFormat ff_live_flv_demuxer; +extern const AVInputFormat ff_fourxm_demuxer; +extern const AVOutputFormat ff_framecrc_muxer; +extern const AVOutputFormat ff_framehash_muxer; +extern const AVOutputFormat ff_framemd5_muxer; +extern const AVInputFormat ff_frm_demuxer; +extern const AVInputFormat ff_fsb_demuxer; +extern const AVInputFormat ff_fwse_demuxer; +extern const AVInputFormat ff_g722_demuxer; +extern const AVOutputFormat ff_g722_muxer; +extern const AVInputFormat ff_g723_1_demuxer; +extern const AVOutputFormat ff_g723_1_muxer; +extern const AVInputFormat ff_g726_demuxer; +extern const AVOutputFormat ff_g726_muxer; +extern const AVInputFormat ff_g726le_demuxer; +extern const AVOutputFormat ff_g726le_muxer; +extern const AVInputFormat ff_g729_demuxer; +extern const AVInputFormat ff_gdv_demuxer; +extern const AVInputFormat ff_genh_demuxer; +extern const AVInputFormat ff_gif_demuxer; +extern const AVOutputFormat ff_gif_muxer; +extern const AVInputFormat ff_gsm_demuxer; +extern const AVOutputFormat ff_gsm_muxer; +extern const AVInputFormat ff_gxf_demuxer; +extern const AVOutputFormat ff_gxf_muxer; +extern const AVInputFormat ff_h261_demuxer; +extern const AVOutputFormat ff_h261_muxer; +extern const AVInputFormat ff_h263_demuxer; +extern const AVOutputFormat ff_h263_muxer; +extern const AVInputFormat ff_h264_demuxer; +extern const AVOutputFormat ff_h264_muxer; +extern const AVOutputFormat ff_hash_muxer; +extern const AVInputFormat ff_hca_demuxer; +extern const AVInputFormat ff_hcom_demuxer; +extern const AVOutputFormat ff_hds_muxer; +extern const AVInputFormat ff_hevc_demuxer; +extern const AVOutputFormat ff_hevc_muxer; +extern const AVInputFormat ff_hls_demuxer; +extern const AVOutputFormat ff_hls_muxer; +extern const AVInputFormat ff_hnm_demuxer; +extern const AVInputFormat ff_ico_demuxer; +extern const AVOutputFormat ff_ico_muxer; +extern const AVInputFormat ff_idcin_demuxer; +extern const AVInputFormat ff_idf_demuxer; +extern const AVInputFormat ff_iff_demuxer; +extern const AVInputFormat ff_ifv_demuxer; +extern const AVInputFormat ff_ilbc_demuxer; +extern const AVOutputFormat ff_ilbc_muxer; +extern const AVInputFormat ff_image2_demuxer; +extern const AVOutputFormat ff_image2_muxer; +extern const AVInputFormat ff_image2pipe_demuxer; +extern const AVOutputFormat ff_image2pipe_muxer; +extern const AVInputFormat ff_image2_alias_pix_demuxer; +extern const AVInputFormat ff_image2_brender_pix_demuxer; +extern const AVInputFormat ff_ingenient_demuxer; +extern const AVInputFormat ff_ipmovie_demuxer; +extern const AVOutputFormat ff_ipod_muxer; +extern const AVInputFormat ff_ipu_demuxer; +extern const AVInputFormat ff_ircam_demuxer; +extern const AVOutputFormat ff_ircam_muxer; +extern const AVOutputFormat ff_ismv_muxer; +extern const AVInputFormat ff_iss_demuxer; +extern const AVInputFormat ff_iv8_demuxer; +extern const AVInputFormat ff_ivf_demuxer; +extern const AVOutputFormat ff_ivf_muxer; +extern const AVInputFormat ff_ivr_demuxer; +extern const AVInputFormat ff_jacosub_demuxer; +extern const AVOutputFormat ff_jacosub_muxer; +extern const AVInputFormat ff_jv_demuxer; +extern const AVInputFormat ff_kux_demuxer; +extern const AVInputFormat ff_kvag_demuxer; +extern const AVOutputFormat ff_kvag_muxer; +extern const AVOutputFormat ff_latm_muxer; +extern const AVInputFormat ff_lmlm4_demuxer; +extern const AVInputFormat ff_loas_demuxer; +extern const AVInputFormat ff_luodat_demuxer; +extern const AVInputFormat ff_lrc_demuxer; +extern const AVOutputFormat ff_lrc_muxer; +extern const AVInputFormat ff_lvf_demuxer; +extern const AVInputFormat ff_lxf_demuxer; +extern const AVInputFormat ff_m4v_demuxer; +extern const AVOutputFormat ff_m4v_muxer; +extern const AVInputFormat ff_mca_demuxer; +extern const AVInputFormat ff_mcc_demuxer; +extern const AVOutputFormat ff_md5_muxer; +extern const AVInputFormat ff_matroska_demuxer; +extern const AVOutputFormat ff_matroska_muxer; +extern const AVOutputFormat ff_matroska_audio_muxer; +extern const AVInputFormat ff_mgsts_demuxer; +extern const AVInputFormat ff_microdvd_demuxer; +extern const AVOutputFormat ff_microdvd_muxer; +extern const AVInputFormat ff_mjpeg_demuxer; +extern const AVOutputFormat ff_mjpeg_muxer; +extern const AVInputFormat ff_mjpeg_2000_demuxer; +extern const AVInputFormat ff_mlp_demuxer; +extern const AVOutputFormat ff_mlp_muxer; +extern const AVInputFormat ff_mlv_demuxer; +extern const AVInputFormat ff_mm_demuxer; +extern const AVInputFormat ff_mmf_demuxer; +extern const AVOutputFormat ff_mmf_muxer; +extern const AVInputFormat ff_mods_demuxer; +extern const AVInputFormat ff_moflex_demuxer; +extern const AVInputFormat ff_mov_demuxer; +extern const AVOutputFormat ff_mov_muxer; +extern const AVOutputFormat ff_mp2_muxer; +extern const AVInputFormat ff_mp3_demuxer; +extern const AVOutputFormat ff_mp3_muxer; +extern const AVOutputFormat ff_mp4_muxer; +extern const AVInputFormat ff_mpc_demuxer; +extern const AVInputFormat ff_mpc8_demuxer; +extern const AVOutputFormat ff_mpeg1system_muxer; +extern const AVOutputFormat ff_mpeg1vcd_muxer; +extern const AVOutputFormat ff_mpeg1video_muxer; +extern const AVOutputFormat ff_mpeg2dvd_muxer; +extern const AVOutputFormat ff_mpeg2svcd_muxer; +extern const AVOutputFormat ff_mpeg2video_muxer; +extern const AVOutputFormat ff_mpeg2vob_muxer; +extern const AVInputFormat ff_mpegps_demuxer; +extern const AVInputFormat ff_mpegts_demuxer; +extern const AVOutputFormat ff_mpegts_muxer; +extern const AVInputFormat ff_mpegtsraw_demuxer; +extern const AVInputFormat ff_mpegvideo_demuxer; +extern const AVInputFormat ff_mpjpeg_demuxer; +extern const AVOutputFormat ff_mpjpeg_muxer; +extern const AVInputFormat ff_mpl2_demuxer; +extern const AVInputFormat ff_mpsub_demuxer; +extern const AVInputFormat ff_msf_demuxer; +extern const AVInputFormat ff_msnwc_tcp_demuxer; +extern const AVInputFormat ff_msp_demuxer; +extern const AVInputFormat ff_mtaf_demuxer; +extern const AVInputFormat ff_mtv_demuxer; +extern const AVInputFormat ff_musx_demuxer; +extern const AVInputFormat ff_mv_demuxer; +extern const AVInputFormat ff_mvi_demuxer; +extern const AVInputFormat ff_mxf_demuxer; +extern const AVOutputFormat ff_mxf_muxer; +extern const AVOutputFormat ff_mxf_d10_muxer; +extern const AVOutputFormat ff_mxf_opatom_muxer; +extern const AVInputFormat ff_mxg_demuxer; +extern const AVInputFormat ff_nc_demuxer; +extern const AVInputFormat ff_nistsphere_demuxer; +extern const AVInputFormat ff_nsp_demuxer; +extern const AVInputFormat ff_nsv_demuxer; +extern const AVOutputFormat ff_null_muxer; +extern const AVInputFormat ff_nut_demuxer; +extern const AVOutputFormat ff_nut_muxer; +extern const AVInputFormat ff_nuv_demuxer; +extern const AVInputFormat ff_obu_demuxer; +extern const AVOutputFormat ff_oga_muxer; +extern const AVInputFormat ff_ogg_demuxer; +extern const AVOutputFormat ff_ogg_muxer; +extern const AVOutputFormat ff_ogv_muxer; +extern const AVInputFormat ff_oma_demuxer; +extern const AVOutputFormat ff_oma_muxer; +extern const AVOutputFormat ff_opus_muxer; +extern const AVInputFormat ff_paf_demuxer; +extern const AVInputFormat ff_pcm_alaw_demuxer; +extern const AVOutputFormat ff_pcm_alaw_muxer; +extern const AVInputFormat ff_pcm_mulaw_demuxer; +extern const AVOutputFormat ff_pcm_mulaw_muxer; +extern const AVInputFormat ff_pcm_vidc_demuxer; +extern const AVOutputFormat ff_pcm_vidc_muxer; +extern const AVInputFormat ff_pcm_f64be_demuxer; +extern const AVOutputFormat ff_pcm_f64be_muxer; +extern const AVInputFormat ff_pcm_f64le_demuxer; +extern const AVOutputFormat ff_pcm_f64le_muxer; +extern const AVInputFormat ff_pcm_f32be_demuxer; +extern const AVOutputFormat ff_pcm_f32be_muxer; +extern const AVInputFormat ff_pcm_f32le_demuxer; +extern const AVOutputFormat ff_pcm_f32le_muxer; +extern const AVInputFormat ff_pcm_s32be_demuxer; +extern const AVOutputFormat ff_pcm_s32be_muxer; +extern const AVInputFormat ff_pcm_s32le_demuxer; +extern const AVOutputFormat ff_pcm_s32le_muxer; +extern const AVInputFormat ff_pcm_s24be_demuxer; +extern const AVOutputFormat ff_pcm_s24be_muxer; +extern const AVInputFormat ff_pcm_s24le_demuxer; +extern const AVOutputFormat ff_pcm_s24le_muxer; +extern const AVInputFormat ff_pcm_s16be_demuxer; +extern const AVOutputFormat ff_pcm_s16be_muxer; +extern const AVInputFormat ff_pcm_s16le_demuxer; +extern const AVOutputFormat ff_pcm_s16le_muxer; +extern const AVInputFormat ff_pcm_s8_demuxer; +extern const AVOutputFormat ff_pcm_s8_muxer; +extern const AVInputFormat ff_pcm_u32be_demuxer; +extern const AVOutputFormat ff_pcm_u32be_muxer; +extern const AVInputFormat ff_pcm_u32le_demuxer; +extern const AVOutputFormat ff_pcm_u32le_muxer; +extern const AVInputFormat ff_pcm_u24be_demuxer; +extern const AVOutputFormat ff_pcm_u24be_muxer; +extern const AVInputFormat ff_pcm_u24le_demuxer; +extern const AVOutputFormat ff_pcm_u24le_muxer; +extern const AVInputFormat ff_pcm_u16be_demuxer; +extern const AVOutputFormat ff_pcm_u16be_muxer; +extern const AVInputFormat ff_pcm_u16le_demuxer; +extern const AVOutputFormat ff_pcm_u16le_muxer; +extern const AVInputFormat ff_pcm_u8_demuxer; +extern const AVOutputFormat ff_pcm_u8_muxer; +extern const AVInputFormat ff_pjs_demuxer; +extern const AVInputFormat ff_pmp_demuxer; +extern const AVInputFormat ff_pp_bnk_demuxer; +extern const AVOutputFormat ff_psp_muxer; +extern const AVInputFormat ff_pva_demuxer; +extern const AVInputFormat ff_pvf_demuxer; +extern const AVInputFormat ff_qcp_demuxer; +extern const AVInputFormat ff_r3d_demuxer; +extern const AVInputFormat ff_rawvideo_demuxer; +extern const AVOutputFormat ff_rawvideo_muxer; +extern const AVInputFormat ff_realtext_demuxer; +extern const AVInputFormat ff_redspark_demuxer; +extern const AVInputFormat ff_rl2_demuxer; +extern const AVInputFormat ff_rm_demuxer; +extern const AVOutputFormat ff_rm_muxer; +extern const AVInputFormat ff_roq_demuxer; +extern const AVOutputFormat ff_roq_muxer; +extern const AVInputFormat ff_rpl_demuxer; +extern const AVInputFormat ff_rsd_demuxer; +extern const AVInputFormat ff_rso_demuxer; +extern const AVOutputFormat ff_rso_muxer; +extern const AVInputFormat ff_rtp_demuxer; +extern const AVOutputFormat ff_rtp_muxer; +extern const AVOutputFormat ff_rtp_mpegts_muxer; +extern const AVInputFormat ff_rtsp_demuxer; +extern const AVOutputFormat ff_rtsp_muxer; +extern const AVInputFormat ff_s337m_demuxer; +extern const AVInputFormat ff_sami_demuxer; +extern const AVInputFormat ff_sap_demuxer; +extern const AVOutputFormat ff_sap_muxer; +extern const AVInputFormat ff_sbc_demuxer; +extern const AVOutputFormat ff_sbc_muxer; +extern const AVInputFormat ff_sbg_demuxer; +extern const AVInputFormat ff_scc_demuxer; +extern const AVOutputFormat ff_scc_muxer; +extern const AVInputFormat ff_sdp_demuxer; +extern const AVInputFormat ff_sdr2_demuxer; +extern const AVInputFormat ff_sds_demuxer; +extern const AVInputFormat ff_sdx_demuxer; +extern const AVInputFormat ff_segafilm_demuxer; +extern const AVOutputFormat ff_segafilm_muxer; +extern const AVOutputFormat ff_segment_muxer; +extern const AVOutputFormat ff_stream_segment_muxer; +extern const AVInputFormat ff_ser_demuxer; +extern const AVInputFormat ff_sga_demuxer; +extern const AVInputFormat ff_shorten_demuxer; +extern const AVInputFormat ff_siff_demuxer; +extern const AVInputFormat ff_simbiosis_imx_demuxer; +extern const AVInputFormat ff_sln_demuxer; +extern const AVInputFormat ff_smacker_demuxer; +extern const AVInputFormat ff_smjpeg_demuxer; +extern const AVOutputFormat ff_smjpeg_muxer; +extern const AVOutputFormat ff_smoothstreaming_muxer; +extern const AVInputFormat ff_smush_demuxer; +extern const AVInputFormat ff_sol_demuxer; +extern const AVInputFormat ff_sox_demuxer; +extern const AVOutputFormat ff_sox_muxer; +extern const AVOutputFormat ff_spx_muxer; +extern const AVInputFormat ff_spdif_demuxer; +extern const AVOutputFormat ff_spdif_muxer; +extern const AVInputFormat ff_srt_demuxer; +extern const AVOutputFormat ff_srt_muxer; +extern const AVInputFormat ff_str_demuxer; +extern const AVInputFormat ff_stl_demuxer; +extern const AVOutputFormat ff_streamhash_muxer; +extern const AVInputFormat ff_subviewer1_demuxer; +extern const AVInputFormat ff_subviewer_demuxer; +extern const AVInputFormat ff_sup_demuxer; +extern const AVOutputFormat ff_sup_muxer; +extern const AVInputFormat ff_svag_demuxer; +extern const AVInputFormat ff_svs_demuxer; +extern const AVInputFormat ff_swf_demuxer; +extern const AVOutputFormat ff_swf_muxer; +extern const AVInputFormat ff_tak_demuxer; +extern const AVOutputFormat ff_tee_muxer; +extern const AVInputFormat ff_tedcaptions_demuxer; +extern const AVOutputFormat ff_tg2_muxer; +extern const AVOutputFormat ff_tgp_muxer; +extern const AVInputFormat ff_thp_demuxer; +extern const AVInputFormat ff_threedostr_demuxer; +extern const AVInputFormat ff_tiertexseq_demuxer; +extern const AVOutputFormat ff_mkvtimestamp_v2_muxer; +extern const AVInputFormat ff_tmv_demuxer; +extern const AVInputFormat ff_truehd_demuxer; +extern const AVOutputFormat ff_truehd_muxer; +extern const AVInputFormat ff_tta_demuxer; +extern const AVOutputFormat ff_tta_muxer; +extern const AVOutputFormat ff_ttml_muxer; +extern const AVInputFormat ff_txd_demuxer; +extern const AVInputFormat ff_tty_demuxer; +extern const AVInputFormat ff_ty_demuxer; +extern const AVOutputFormat ff_uncodedframecrc_muxer; +extern const AVInputFormat ff_v210_demuxer; +extern const AVInputFormat ff_v210x_demuxer; +extern const AVInputFormat ff_vag_demuxer; +extern const AVInputFormat ff_vc1_demuxer; +extern const AVOutputFormat ff_vc1_muxer; +extern const AVInputFormat ff_vc1t_demuxer; +extern const AVOutputFormat ff_vc1t_muxer; +extern const AVInputFormat ff_vividas_demuxer; +extern const AVInputFormat ff_vivo_demuxer; +extern const AVInputFormat ff_vmd_demuxer; +extern const AVInputFormat ff_vobsub_demuxer; +extern const AVInputFormat ff_voc_demuxer; +extern const AVOutputFormat ff_voc_muxer; +extern const AVInputFormat ff_vpk_demuxer; +extern const AVInputFormat ff_vplayer_demuxer; +extern const AVInputFormat ff_vqf_demuxer; +extern const AVInputFormat ff_w64_demuxer; +extern const AVOutputFormat ff_w64_muxer; +extern const AVInputFormat ff_wav_demuxer; +extern const AVOutputFormat ff_wav_muxer; +extern const AVInputFormat ff_wc3_demuxer; +extern const AVOutputFormat ff_webm_muxer; +extern const AVInputFormat ff_webm_dash_manifest_demuxer; +extern const AVOutputFormat ff_webm_dash_manifest_muxer; +extern const AVOutputFormat ff_webm_chunk_muxer; +extern const AVOutputFormat ff_webp_muxer; +extern const AVInputFormat ff_webvtt_demuxer; +extern const AVOutputFormat ff_webvtt_muxer; +extern const AVInputFormat ff_wsaud_demuxer; +extern const AVInputFormat ff_wsd_demuxer; +extern const AVInputFormat ff_wsvqa_demuxer; +extern const AVInputFormat ff_wtv_demuxer; +extern const AVOutputFormat ff_wtv_muxer; +extern const AVInputFormat ff_wve_demuxer; +extern const AVInputFormat ff_wv_demuxer; +extern const AVOutputFormat ff_wv_muxer; +extern const AVInputFormat ff_xa_demuxer; +extern const AVInputFormat ff_xbin_demuxer; +extern const AVInputFormat ff_xmv_demuxer; +extern const AVInputFormat ff_xvag_demuxer; +extern const AVInputFormat ff_xwma_demuxer; +extern const AVInputFormat ff_yop_demuxer; +extern const AVInputFormat ff_yuv4mpegpipe_demuxer; +extern const AVOutputFormat ff_yuv4mpegpipe_muxer; /* image demuxers */ -extern AVInputFormat ff_image_bmp_pipe_demuxer; -extern AVInputFormat ff_image_cri_pipe_demuxer; -extern AVInputFormat ff_image_dds_pipe_demuxer; -extern AVInputFormat ff_image_dpx_pipe_demuxer; -extern AVInputFormat ff_image_exr_pipe_demuxer; -extern AVInputFormat ff_image_gif_pipe_demuxer; -extern AVInputFormat ff_image_j2k_pipe_demuxer; -extern AVInputFormat ff_image_jpeg_pipe_demuxer; -extern AVInputFormat ff_image_jpegls_pipe_demuxer; -extern AVInputFormat ff_image_pam_pipe_demuxer; -extern AVInputFormat ff_image_pbm_pipe_demuxer; -extern AVInputFormat ff_image_pcx_pipe_demuxer; -extern AVInputFormat ff_image_pgmyuv_pipe_demuxer; -extern AVInputFormat ff_image_pgm_pipe_demuxer; -extern AVInputFormat ff_image_pgx_pipe_demuxer; -extern AVInputFormat ff_image_photocd_pipe_demuxer; -extern AVInputFormat ff_image_pictor_pipe_demuxer; -extern AVInputFormat ff_image_png_pipe_demuxer; -extern AVInputFormat ff_image_ppm_pipe_demuxer; -extern AVInputFormat ff_image_psd_pipe_demuxer; -extern AVInputFormat ff_image_qdraw_pipe_demuxer; -extern AVInputFormat ff_image_sgi_pipe_demuxer; -extern AVInputFormat ff_image_svg_pipe_demuxer; -extern AVInputFormat ff_image_sunrast_pipe_demuxer; -extern AVInputFormat ff_image_tiff_pipe_demuxer; -extern AVInputFormat ff_image_webp_pipe_demuxer; -extern AVInputFormat ff_image_xbm_pipe_demuxer; -extern AVInputFormat ff_image_xpm_pipe_demuxer; -extern AVInputFormat ff_image_xwd_pipe_demuxer; +extern const AVInputFormat ff_image_bmp_pipe_demuxer; +extern const AVInputFormat ff_image_cri_pipe_demuxer; +extern const AVInputFormat ff_image_dds_pipe_demuxer; +extern const AVInputFormat ff_image_dpx_pipe_demuxer; +extern const AVInputFormat ff_image_exr_pipe_demuxer; +extern const AVInputFormat ff_image_gif_pipe_demuxer; +extern const AVInputFormat ff_image_j2k_pipe_demuxer; +extern const AVInputFormat ff_image_jpeg_pipe_demuxer; +extern const AVInputFormat ff_image_jpegls_pipe_demuxer; +extern const AVInputFormat ff_image_pam_pipe_demuxer; +extern const AVInputFormat ff_image_pbm_pipe_demuxer; +extern const AVInputFormat ff_image_pcx_pipe_demuxer; +extern const AVInputFormat ff_image_pgmyuv_pipe_demuxer; +extern const AVInputFormat ff_image_pgm_pipe_demuxer; +extern const AVInputFormat ff_image_pgx_pipe_demuxer; +extern const AVInputFormat ff_image_photocd_pipe_demuxer; +extern const AVInputFormat ff_image_pictor_pipe_demuxer; +extern const AVInputFormat ff_image_png_pipe_demuxer; +extern const AVInputFormat ff_image_ppm_pipe_demuxer; +extern const AVInputFormat ff_image_psd_pipe_demuxer; +extern const AVInputFormat ff_image_qdraw_pipe_demuxer; +extern const AVInputFormat ff_image_sgi_pipe_demuxer; +extern const AVInputFormat ff_image_svg_pipe_demuxer; +extern const AVInputFormat ff_image_sunrast_pipe_demuxer; +extern const AVInputFormat ff_image_tiff_pipe_demuxer; +extern const AVInputFormat ff_image_webp_pipe_demuxer; +extern const AVInputFormat ff_image_xbm_pipe_demuxer; +extern const AVInputFormat ff_image_xpm_pipe_demuxer; +extern const AVInputFormat ff_image_xwd_pipe_demuxer; /* external libraries */ -extern AVOutputFormat ff_chromaprint_muxer; -extern AVInputFormat ff_libgme_demuxer; -extern AVInputFormat ff_libmodplug_demuxer; -extern AVInputFormat ff_libopenmpt_demuxer; -extern AVInputFormat ff_vapoursynth_demuxer; +extern const AVOutputFormat ff_chromaprint_muxer; +extern const AVInputFormat ff_libgme_demuxer; +extern const AVInputFormat ff_libmodplug_demuxer; +extern const AVInputFormat ff_libopenmpt_demuxer; +extern const AVInputFormat ff_vapoursynth_demuxer; #include "libavformat/muxer_list.c" #include "libavformat/demuxer_list.c" diff --git a/libavformat/alp.c b/libavformat/alp.c index 222cc246a2..bc19f02083 100644 --- a/libavformat/alp.c +++ b/libavformat/alp.c @@ -163,7 +163,7 @@ static int alp_seek(AVFormatContext *s, int stream_index, return avio_seek(s->pb, hdr->header_size + 8, SEEK_SET); } -AVInputFormat ff_alp_demuxer = { +const AVInputFormat ff_alp_demuxer = { .name = "alp", .long_name = NULL_IF_CONFIG_SMALL("LEGO Racers ALP"), .priv_data_size = sizeof(ALPHeader), @@ -291,7 +291,7 @@ static const AVClass alp_muxer_class = { .version = LIBAVUTIL_VERSION_INT }; -AVOutputFormat ff_alp_muxer = { +const AVOutputFormat ff_alp_muxer = { .name = "alp", .long_name = NULL_IF_CONFIG_SMALL("LEGO Racers ALP"), .extensions = "tun,pcm", diff --git a/libavformat/amr.c b/libavformat/amr.c index e4f8e4d860..836b276fd5 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -159,7 +159,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt) } #if CONFIG_AMR_DEMUXER -AVInputFormat ff_amr_demuxer = { +const AVInputFormat ff_amr_demuxer = { .name = "amr", .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR"), .priv_data_size = sizeof(AMRContext), @@ -215,7 +215,7 @@ static int amrnb_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_amrnb_demuxer = { +const AVInputFormat ff_amrnb_demuxer = { .name = "amrnb", .long_name = NULL_IF_CONFIG_SMALL("raw AMR-NB"), .priv_data_size = sizeof(AMRContext), @@ -271,7 +271,7 @@ static int amrwb_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_amrwb_demuxer = { +const AVInputFormat ff_amrwb_demuxer = { .name = "amrwb", .long_name = NULL_IF_CONFIG_SMALL("raw AMR-WB"), .priv_data_size = sizeof(AMRContext), @@ -283,7 +283,7 @@ AVInputFormat ff_amrwb_demuxer = { #endif #if CONFIG_AMR_MUXER -AVOutputFormat ff_amr_muxer = { +const AVOutputFormat ff_amr_muxer = { .name = "amr", .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR"), .mime_type = "audio/amr", diff --git a/libavformat/amvenc.c b/libavformat/amvenc.c index 362b474fa6..cb03f00ed7 100644 --- a/libavformat/amvenc.c +++ b/libavformat/amvenc.c @@ -404,7 +404,7 @@ static int amv_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_amv_muxer = { +const AVOutputFormat ff_amv_muxer = { .name = "amv", .long_name = NULL_IF_CONFIG_SMALL("AMV"), .mime_type = "video/amv", diff --git a/libavformat/anm.c b/libavformat/anm.c index 9af3a41794..1c29bbca29 100644 --- a/libavformat/anm.c +++ b/libavformat/anm.c @@ -214,7 +214,7 @@ repeat: return 0; } -AVInputFormat ff_anm_demuxer = { +const AVInputFormat ff_anm_demuxer = { .name = "anm", .long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"), .priv_data_size = sizeof(AnmDemuxContext), diff --git a/libavformat/apc.c b/libavformat/apc.c index 7210bfbb56..56151bb59a 100644 --- a/libavformat/apc.c +++ b/libavformat/apc.c @@ -83,7 +83,7 @@ static int apc_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_apc_demuxer = { +const AVInputFormat ff_apc_demuxer = { .name = "apc", .long_name = NULL_IF_CONFIG_SMALL("CRYO APC"), .read_probe = apc_probe, diff --git a/libavformat/ape.c b/libavformat/ape.c index 4c161235fe..a4cfd01807 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -450,7 +450,7 @@ static int ape_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp return 0; } -AVInputFormat ff_ape_demuxer = { +const AVInputFormat ff_ape_demuxer = { .name = "ape", .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), .priv_data_size = sizeof(APEContext), diff --git a/libavformat/apm.c b/libavformat/apm.c index 38a0f6382a..6ae53b8712 100644 --- a/libavformat/apm.c +++ b/libavformat/apm.c @@ -201,7 +201,7 @@ static int apm_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_apm_demuxer = { +const AVInputFormat ff_apm_demuxer = { .name = "apm", .long_name = NULL_IF_CONFIG_SMALL("Ubisoft Rayman 2 APM"), .read_probe = apm_probe, @@ -303,7 +303,7 @@ static int apm_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_apm_muxer = { +const AVOutputFormat ff_apm_muxer = { .name = "apm", .long_name = NULL_IF_CONFIG_SMALL("Ubisoft Rayman 2 APM"), .extensions = "apm", diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index bf8343faf3..e84f74e9d0 100644 --- a/libavformat/apngdec.c +++ b/libavformat/apngdec.c @@ -421,7 +421,7 @@ static const AVClass demuxer_class = { .category = AV_CLASS_CATEGORY_DEMUXER, }; -AVInputFormat ff_apng_demuxer = { +const AVInputFormat ff_apng_demuxer = { .name = "apng", .long_name = NULL_IF_CONFIG_SMALL("Animated Portable Network Graphics"), .priv_data_size = sizeof(APNGDemuxContext), diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c index 643bf73300..c97c475274 100644 --- a/libavformat/apngenc.c +++ b/libavformat/apngenc.c @@ -294,7 +294,7 @@ static const AVClass apng_muxer_class = { .option = options, }; -AVOutputFormat ff_apng_muxer = { +const AVOutputFormat ff_apng_muxer = { .name = "apng", .long_name = NULL_IF_CONFIG_SMALL("Animated Portable Network Graphics"), .mime_type = "image/png", diff --git a/libavformat/aptxdec.c b/libavformat/aptxdec.c index a262cd9ebe..489194f49d 100644 --- a/libavformat/aptxdec.c +++ b/libavformat/aptxdec.c @@ -95,7 +95,7 @@ static const AVClass aptx_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_aptx_demuxer = { +const AVInputFormat ff_aptx_demuxer = { .name = "aptx", .long_name = NULL_IF_CONFIG_SMALL("raw aptX"), .extensions = "aptx", @@ -115,7 +115,7 @@ static const AVClass aptx_hd_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_aptx_hd_demuxer = { +const AVInputFormat ff_aptx_hd_demuxer = { .name = "aptx_hd", .long_name = NULL_IF_CONFIG_SMALL("raw aptX HD"), .extensions = "aptxhd", diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c index 81630d73b0..de28097f2f 100644 --- a/libavformat/aqtitledec.c +++ b/libavformat/aqtitledec.c @@ -137,7 +137,7 @@ static const AVClass aqt_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_aqtitle_demuxer = { +const AVInputFormat ff_aqtitle_demuxer = { .name = "aqtitle", .long_name = NULL_IF_CONFIG_SMALL("AQTitle subtitles"), .priv_data_size = sizeof(AQTitleContext), diff --git a/libavformat/argo_asf.c b/libavformat/argo_asf.c index 8e2bf21c71..c3ac49fdc2 100644 --- a/libavformat/argo_asf.c +++ b/libavformat/argo_asf.c @@ -271,7 +271,7 @@ static int argo_asf_seek(AVFormatContext *s, int stream_index, * - Argonaut Sound File? * - Audio Stream File? */ -AVInputFormat ff_argo_asf_demuxer = { +const AVInputFormat ff_argo_asf_demuxer = { .name = "argo_asf", .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games ASF"), .priv_data_size = sizeof(ArgoASFDemuxContext), @@ -468,7 +468,7 @@ static const AVClass argo_asf_muxer_class = { .version = LIBAVUTIL_VERSION_INT }; -AVOutputFormat ff_argo_asf_muxer = { +const AVOutputFormat ff_argo_asf_muxer = { .name = "argo_asf", .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games ASF"), /* diff --git a/libavformat/argo_brp.c b/libavformat/argo_brp.c index 6d6da851e9..059418cd1d 100644 --- a/libavformat/argo_brp.c +++ b/libavformat/argo_brp.c @@ -413,7 +413,7 @@ static int argo_brp_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_argo_brp_demuxer = { +const AVInputFormat ff_argo_brp_demuxer = { .name = "argo_brp", .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games BRP"), .priv_data_size = sizeof(ArgoBRPDemuxContext), diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 27162e9559..2e806dd452 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -1606,7 +1606,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_asf_demuxer = { +const AVInputFormat ff_asf_demuxer = { .name = "asf", .long_name = NULL_IF_CONFIG_SMALL("ASF (Advanced / Active Streaming Format)"), .priv_data_size = sizeof(ASFContext), diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c index 6cfcd8b088..16d911dc25 100644 --- a/libavformat/asfdec_o.c +++ b/libavformat/asfdec_o.c @@ -1671,7 +1671,7 @@ failed: return ret; } -AVInputFormat ff_asf_o_demuxer = { +const AVInputFormat ff_asf_o_demuxer = { .name = "asf_o", .long_name = NULL_IF_CONFIG_SMALL("ASF (Advanced / Active Streaming Format)"), .priv_data_size = sizeof(ASFContext), diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index 23a09efe05..8e29a3b733 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -1162,7 +1162,7 @@ static const AVClass asf_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_asf_muxer = { +const AVOutputFormat ff_asf_muxer = { .name = "asf", .long_name = NULL_IF_CONFIG_SMALL("ASF (Advanced / Active Streaming Format)"), .mime_type = "video/x-ms-asf", @@ -1187,7 +1187,7 @@ static const AVClass asf_stream_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_asf_stream_muxer = { +const AVOutputFormat ff_asf_stream_muxer = { .name = "asf_stream", .long_name = NULL_IF_CONFIG_SMALL("ASF (Advanced / Active Streaming Format)"), .mime_type = "video/x-ms-asf", diff --git a/libavformat/assdec.c b/libavformat/assdec.c index 8fb9e8e501..4a9650fe76 100644 --- a/libavformat/assdec.c +++ b/libavformat/assdec.c @@ -182,7 +182,7 @@ static int ass_read_seek(AVFormatContext *s, int stream_index, min_ts, ts, max_ts, flags); } -AVInputFormat ff_ass_demuxer = { +const AVInputFormat ff_ass_demuxer = { .name = "ass", .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"), .priv_data_size = sizeof(ASSContext), diff --git a/libavformat/assenc.c b/libavformat/assenc.c index 68c3396e5a..1600f0a02b 100644 --- a/libavformat/assenc.c +++ b/libavformat/assenc.c @@ -226,7 +226,7 @@ static const AVClass ass_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_ass_muxer = { +const AVOutputFormat ff_ass_muxer = { .name = "ass", .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"), .mime_type = "text/x-ass", diff --git a/libavformat/astdec.c b/libavformat/astdec.c index 610c9385aa..629372acf1 100644 --- a/libavformat/astdec.c +++ b/libavformat/astdec.c @@ -110,7 +110,7 @@ static int ast_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_ast_demuxer = { +const AVInputFormat ff_ast_demuxer = { .name = "ast", .long_name = NULL_IF_CONFIG_SMALL("AST (Audio Stream)"), .read_probe = ast_probe, diff --git a/libavformat/astenc.c b/libavformat/astenc.c index 69541bc0ca..cf75b48b21 100644 --- a/libavformat/astenc.c +++ b/libavformat/astenc.c @@ -196,7 +196,7 @@ static const AVClass ast_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_ast_muxer = { +const AVOutputFormat ff_ast_muxer = { .name = "ast", .long_name = NULL_IF_CONFIG_SMALL("AST (Audio Stream)"), .extensions = "ast", diff --git a/libavformat/au.c b/libavformat/au.c index c2c1b7a3a3..ff8f841cce 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -226,7 +226,7 @@ static int au_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_au_demuxer = { +const AVInputFormat ff_au_demuxer = { .name = "au", .long_name = NULL_IF_CONFIG_SMALL("Sun AU"), .read_probe = au_probe, @@ -328,7 +328,7 @@ static int au_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_au_muxer = { +const AVOutputFormat ff_au_muxer = { .name = "au", .long_name = NULL_IF_CONFIG_SMALL("Sun AU"), .mime_type = "audio/basic", diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c index 5ae81b34d4..b71d5d0e19 100644 --- a/libavformat/av1dec.c +++ b/libavformat/av1dec.c @@ -281,7 +281,7 @@ static const AVClass annexb_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_av1_demuxer = { +const AVInputFormat ff_av1_demuxer = { .name = "av1", .long_name = NULL_IF_CONFIG_SMALL("AV1 Annex B"), .priv_data_size = sizeof(AnnexBContext), @@ -468,7 +468,7 @@ static const AVClass obu_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_obu_demuxer = { +const AVInputFormat ff_obu_demuxer = { .name = "obu", .long_name = NULL_IF_CONFIG_SMALL("AV1 low overhead OBU"), .priv_data_size = sizeof(ObuContext), diff --git a/libavformat/avidec.c b/libavformat/avidec.c index ac020109c6..d5dcab6193 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1969,7 +1969,7 @@ static int avi_probe(const AVProbeData *p) return 0; } -AVInputFormat ff_avi_demuxer = { +const AVInputFormat ff_avi_demuxer = { .name = "avi", .long_name = NULL_IF_CONFIG_SMALL("AVI (Audio Video Interleaved)"), .priv_data_size = sizeof(AVIContext), diff --git a/libavformat/avienc.c b/libavformat/avienc.c index ac11dd9cb2..9eb072ce12 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -1011,7 +1011,7 @@ static const AVClass avi_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_avi_muxer = { +const AVOutputFormat ff_avi_muxer = { .name = "avi", .long_name = NULL_IF_CONFIG_SMALL("AVI (Audio Video Interleaved)"), .mime_type = "video/x-msvideo", diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 21ae8c183a..350ac6d11d 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -878,7 +878,7 @@ static int avisynth_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_avisynth_demuxer = { +const AVInputFormat ff_avisynth_demuxer = { .name = "avisynth", .long_name = NULL_IF_CONFIG_SMALL("AviSynth script"), .priv_data_size = sizeof(AviSynthContext), diff --git a/libavformat/avr.c b/libavformat/avr.c index c4ce70142a..6fdcf68952 100644 --- a/libavformat/avr.c +++ b/libavformat/avr.c @@ -87,7 +87,7 @@ static int avr_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_avr_demuxer = { +const AVInputFormat ff_avr_demuxer = { .name = "avr", .long_name = NULL_IF_CONFIG_SMALL("AVR (Audio Visual Research)"), .read_probe = avr_probe, diff --git a/libavformat/avs.c b/libavformat/avs.c index 097c171908..ab47980a11 100644 --- a/libavformat/avs.c +++ b/libavformat/avs.c @@ -224,7 +224,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) } } -AVInputFormat ff_avs_demuxer = { +const AVInputFormat ff_avs_demuxer = { .name = "avs", .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Creature Shock"), .priv_data_size = sizeof(AvsFormat), diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c index 709603daf5..65aab11ad6 100644 --- a/libavformat/bethsoftvid.c +++ b/libavformat/bethsoftvid.c @@ -291,7 +291,7 @@ static int vid_read_packet(AVFormatContext *s, } } -AVInputFormat ff_bethsoftvid_demuxer = { +const AVInputFormat ff_bethsoftvid_demuxer = { .name = "bethsoftvid", .long_name = NULL_IF_CONFIG_SMALL("Bethesda Softworks VID"), .priv_data_size = sizeof(BVID_DemuxContext), diff --git a/libavformat/bfi.c b/libavformat/bfi.c index 2dab986f3a..bff6f0154e 100644 --- a/libavformat/bfi.c +++ b/libavformat/bfi.c @@ -174,7 +174,7 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt) return ret; } -AVInputFormat ff_bfi_demuxer = { +const AVInputFormat ff_bfi_demuxer = { .name = "bfi", .long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"), .priv_data_size = sizeof(BFIContext), diff --git a/libavformat/bink.c b/libavformat/bink.c index 99bbd27ef3..2488aeae2f 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -323,7 +323,7 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, in return 0; } -AVInputFormat ff_bink_demuxer = { +const AVInputFormat ff_bink_demuxer = { .name = "bink", .long_name = NULL_IF_CONFIG_SMALL("Bink"), .priv_data_size = sizeof(BinkDemuxContext), diff --git a/libavformat/binka.c b/libavformat/binka.c index 13ca9ca4b5..d4cfee0368 100644 --- a/libavformat/binka.c +++ b/libavformat/binka.c @@ -89,7 +89,7 @@ static int binka_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_binka_demuxer = { +const AVInputFormat ff_binka_demuxer = { .name = "binka", .long_name = NULL_IF_CONFIG_SMALL("Bink Audio"), .read_probe = binka_probe, diff --git a/libavformat/bintext.c b/libavformat/bintext.c index bc0f6bd099..1270c7fb2c 100644 --- a/libavformat/bintext.c +++ b/libavformat/bintext.c @@ -394,7 +394,7 @@ static const AVOption options[] = { }} #if CONFIG_BINTEXT_DEMUXER -AVInputFormat ff_bintext_demuxer = { +const AVInputFormat ff_bintext_demuxer = { .name = "bin", .long_name = NULL_IF_CONFIG_SMALL("Binary text"), .priv_data_size = sizeof(BinDemuxContext), @@ -406,7 +406,7 @@ AVInputFormat ff_bintext_demuxer = { #endif #if CONFIG_XBIN_DEMUXER -AVInputFormat ff_xbin_demuxer = { +const AVInputFormat ff_xbin_demuxer = { .name = "xbin", .long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text (XBIN)"), .priv_data_size = sizeof(BinDemuxContext), @@ -418,7 +418,7 @@ AVInputFormat ff_xbin_demuxer = { #endif #if CONFIG_ADF_DEMUXER -AVInputFormat ff_adf_demuxer = { +const AVInputFormat ff_adf_demuxer = { .name = "adf", .long_name = NULL_IF_CONFIG_SMALL("Artworx Data Format"), .priv_data_size = sizeof(BinDemuxContext), @@ -430,7 +430,7 @@ AVInputFormat ff_adf_demuxer = { #endif #if CONFIG_IDF_DEMUXER -AVInputFormat ff_idf_demuxer = { +const AVInputFormat ff_idf_demuxer = { .name = "idf", .long_name = NULL_IF_CONFIG_SMALL("iCE Draw File"), .priv_data_size = sizeof(BinDemuxContext), diff --git a/libavformat/bit.c b/libavformat/bit.c index 2dc7d4f3f7..380cbd37cd 100644 --- a/libavformat/bit.c +++ b/libavformat/bit.c @@ -109,7 +109,7 @@ static int read_packet(AVFormatContext *s, return 0; } -AVInputFormat ff_bit_demuxer = { +const AVInputFormat ff_bit_demuxer = { .name = "bit", .long_name = NULL_IF_CONFIG_SMALL("G.729 BIT file format"), .read_probe = probe, @@ -155,7 +155,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_bit_muxer = { +const AVOutputFormat ff_bit_muxer = { .name = "bit", .long_name = NULL_IF_CONFIG_SMALL("G.729 BIT file format"), .mime_type = "audio/bit", diff --git a/libavformat/bmv.c b/libavformat/bmv.c index 9f03fba058..873ecb027c 100644 --- a/libavformat/bmv.c +++ b/libavformat/bmv.c @@ -125,7 +125,7 @@ static int bmv_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_bmv_demuxer = { +const AVInputFormat ff_bmv_demuxer = { .name = "bmv", .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV"), .priv_data_size = sizeof(BMVContext), diff --git a/libavformat/boadec.c b/libavformat/boadec.c index 74a6ceecb1..69d17763ef 100644 --- a/libavformat/boadec.c +++ b/libavformat/boadec.c @@ -75,7 +75,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, st->codecpar->block_align); } -AVInputFormat ff_boa_demuxer = { +const AVInputFormat ff_boa_demuxer = { .name = "boa", .long_name = NULL_IF_CONFIG_SMALL("Black Ops Audio"), .read_probe = probe, diff --git a/libavformat/brstm.c b/libavformat/brstm.c index 6754c1712e..f1f0f86ed5 100644 --- a/libavformat/brstm.c +++ b/libavformat/brstm.c @@ -481,7 +481,7 @@ static int read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_brstm_demuxer = { +const AVInputFormat ff_brstm_demuxer = { .name = "brstm", .long_name = NULL_IF_CONFIG_SMALL("BRSTM (Binary Revolution Stream)"), .priv_data_size = sizeof(BRSTMDemuxContext), @@ -493,7 +493,7 @@ AVInputFormat ff_brstm_demuxer = { .extensions = "brstm", }; -AVInputFormat ff_bfstm_demuxer = { +const AVInputFormat ff_bfstm_demuxer = { .name = "bfstm", .long_name = NULL_IF_CONFIG_SMALL("BFSTM (Binary Cafe Stream)"), .priv_data_size = sizeof(BRSTMDemuxContext), diff --git a/libavformat/c93.c b/libavformat/c93.c index 256b9800ca..9ecf1427a9 100644 --- a/libavformat/c93.c +++ b/libavformat/c93.c @@ -185,7 +185,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_c93_demuxer = { +const AVInputFormat ff_c93_demuxer = { .name = "c93", .long_name = NULL_IF_CONFIG_SMALL("Interplay C93"), .priv_data_size = sizeof(C93DemuxContext), diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index 2a9299d777..958e8098c6 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -457,7 +457,7 @@ static int read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_caf_demuxer = { +const AVInputFormat ff_caf_demuxer = { .name = "caf", .long_name = NULL_IF_CONFIG_SMALL("Apple CAF (Core Audio Format)"), .priv_data_size = sizeof(CafContext), diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c index 7e44797a52..422beaf93d 100644 --- a/libavformat/cafenc.c +++ b/libavformat/cafenc.c @@ -263,7 +263,7 @@ static int caf_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_caf_muxer = { +const AVOutputFormat ff_caf_muxer = { .name = "caf", .long_name = NULL_IF_CONFIG_SMALL("Apple CAF (Core Audio Format)"), .mime_type = "audio/x-caf", diff --git a/libavformat/cdg.c b/libavformat/cdg.c index 8fb287a998..36f25e7f66 100644 --- a/libavformat/cdg.c +++ b/libavformat/cdg.c @@ -67,7 +67,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_cdg_demuxer = { +const AVInputFormat ff_cdg_demuxer = { .name = "cdg", .long_name = NULL_IF_CONFIG_SMALL("CD Graphics"), .read_header = read_header, diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c index 33b6d5cbad..c42e0d3545 100644 --- a/libavformat/cdxl.c +++ b/libavformat/cdxl.c @@ -258,7 +258,7 @@ static const AVClass cdxl_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_cdxl_demuxer = { +const AVInputFormat ff_cdxl_demuxer = { .name = "cdxl", .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"), .priv_data_size = sizeof(CDXLDemuxContext), diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c index 423f5b7d61..399de725d3 100644 --- a/libavformat/chromaprint.c +++ b/libavformat/chromaprint.c @@ -179,7 +179,7 @@ static const AVClass chromaprint_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_chromaprint_muxer = { +const AVOutputFormat ff_chromaprint_muxer = { .name = "chromaprint", .long_name = NULL_IF_CONFIG_SMALL("Chromaprint"), .priv_data_size = sizeof(ChromaprintMuxContext), diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index e5c6468c39..f1fae6e5db 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -322,7 +322,7 @@ static int cine_read_seek(AVFormatContext *avctx, int stream_index, int64_t time return 0; } -AVInputFormat ff_cine_demuxer = { +const AVInputFormat ff_cine_demuxer = { .name = "cine", .long_name = NULL_IF_CONFIG_SMALL("Phantom Cine"), .priv_data_size = sizeof(CineDemuxContext), diff --git a/libavformat/codec2.c b/libavformat/codec2.c index 0c2ad3aa01..ce249d4470 100644 --- a/libavformat/codec2.c +++ b/libavformat/codec2.c @@ -300,7 +300,7 @@ static const AVClass codec2raw_demux_class = { }; #if CONFIG_CODEC2_DEMUXER -AVInputFormat ff_codec2_demuxer = { +const AVInputFormat ff_codec2_demuxer = { .name = "codec2", .long_name = NULL_IF_CONFIG_SMALL("codec2 .c2 demuxer"), .priv_data_size = sizeof(Codec2Context), @@ -316,7 +316,7 @@ AVInputFormat ff_codec2_demuxer = { #endif #if CONFIG_CODEC2_MUXER -AVOutputFormat ff_codec2_muxer = { +const AVOutputFormat ff_codec2_muxer = { .name = "codec2", .long_name = NULL_IF_CONFIG_SMALL("codec2 .c2 muxer"), .priv_data_size = sizeof(Codec2Context), @@ -331,7 +331,7 @@ AVOutputFormat ff_codec2_muxer = { #endif #if CONFIG_CODEC2RAW_DEMUXER -AVInputFormat ff_codec2raw_demuxer = { +const AVInputFormat ff_codec2raw_demuxer = { .name = "codec2raw", .long_name = NULL_IF_CONFIG_SMALL("raw codec2 demuxer"), .priv_data_size = sizeof(Codec2Context), diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index fb70c21dc2..65fbe0a854 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -775,7 +775,7 @@ static const AVClass concat_class = { }; -AVInputFormat ff_concat_demuxer = { +const AVInputFormat ff_concat_demuxer = { .name = "concat", .long_name = NULL_IF_CONFIG_SMALL("Virtual concatenation script"), .priv_data_size = sizeof(ConcatContext), diff --git a/libavformat/crcenc.c b/libavformat/crcenc.c index 3fdfea5207..4fdc448141 100644 --- a/libavformat/crcenc.c +++ b/libavformat/crcenc.c @@ -56,7 +56,7 @@ static int crc_write_trailer(struct AVFormatContext *s) return 0; } -AVOutputFormat ff_crc_muxer = { +const AVOutputFormat ff_crc_muxer = { .name = "crc", .long_name = NULL_IF_CONFIG_SMALL("CRC testing"), .priv_data_size = sizeof(CRCState), diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 39e7810e42..bc27c96c97 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -2397,7 +2397,7 @@ static const AVClass dash_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_dash_demuxer = { +const AVInputFormat ff_dash_demuxer = { .name = "dash", .long_name = NULL_IF_CONFIG_SMALL("Dynamic Adaptive Streaming over HTTP"), .priv_class = &dash_class, diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 0ceaa5fdfd..07f191e2a2 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -2383,7 +2383,7 @@ static const AVClass dash_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_dash_muxer = { +const AVOutputFormat ff_dash_muxer = { .name = "dash", .long_name = NULL_IF_CONFIG_SMALL("DASH Muxer"), .extensions = "mpd", diff --git a/libavformat/dauddec.c b/libavformat/dauddec.c index 69196b0a1a..6a5962c238 100644 --- a/libavformat/dauddec.c +++ b/libavformat/dauddec.c @@ -50,7 +50,7 @@ static int daud_packet(AVFormatContext *s, AVPacket *pkt) { return ret; } -AVInputFormat ff_daud_demuxer = { +const AVInputFormat ff_daud_demuxer = { .name = "daud", .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio"), .read_header = daud_header, diff --git a/libavformat/daudenc.c b/libavformat/daudenc.c index b489659a80..183a08ba30 100644 --- a/libavformat/daudenc.c +++ b/libavformat/daudenc.c @@ -42,7 +42,7 @@ static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_daud_muxer = { +const AVOutputFormat ff_daud_muxer = { .name = "daud", .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio"), .extensions = "302", diff --git a/libavformat/dcstr.c b/libavformat/dcstr.c index 9ddccc7f2d..71dce08bf7 100644 --- a/libavformat/dcstr.c +++ b/libavformat/dcstr.c @@ -78,7 +78,7 @@ static int dcstr_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align); } -AVInputFormat ff_dcstr_demuxer = { +const AVInputFormat ff_dcstr_demuxer = { .name = "dcstr", .long_name = NULL_IF_CONFIG_SMALL("Sega DC STR"), .read_probe = dcstr_probe, diff --git a/libavformat/derf.c b/libavformat/derf.c index 58bbf5b791..a09433ba07 100644 --- a/libavformat/derf.c +++ b/libavformat/derf.c @@ -68,7 +68,7 @@ static int derf_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_derf_demuxer = { +const AVInputFormat ff_derf_demuxer = { .name = "derf", .long_name = NULL_IF_CONFIG_SMALL("Xilam DERF"), .read_probe = derf_probe, diff --git a/libavformat/dfa.c b/libavformat/dfa.c index bd4ef2dafe..9808c9b617 100644 --- a/libavformat/dfa.c +++ b/libavformat/dfa.c @@ -120,7 +120,7 @@ static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_dfa_demuxer = { +const AVInputFormat ff_dfa_demuxer = { .name = "dfa", .long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"), .read_probe = dfa_probe, diff --git a/libavformat/dhav.c b/libavformat/dhav.c index 526331ae4c..92bbfab7c5 100644 --- a/libavformat/dhav.c +++ b/libavformat/dhav.c @@ -451,7 +451,7 @@ static int dhav_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_dhav_demuxer = { +const AVInputFormat ff_dhav_demuxer = { .name = "dhav", .long_name = NULL_IF_CONFIG_SMALL("Video DAV"), .priv_data_size = sizeof(DHAVContext), diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c index 2fca25ef32..690fd02bb3 100644 --- a/libavformat/dsfdec.c +++ b/libavformat/dsfdec.c @@ -199,7 +199,7 @@ static int dsf_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_dsf_demuxer = { +const AVInputFormat ff_dsf_demuxer = { .name = "dsf", .long_name = NULL_IF_CONFIG_SMALL("DSD Stream File (DSF)"), .priv_data_size = sizeof(DSFContext), diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c index b18f43b9a0..5693b11e8c 100644 --- a/libavformat/dsicin.c +++ b/libavformat/dsicin.c @@ -223,7 +223,7 @@ static int cin_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_dsicin_demuxer = { +const AVInputFormat ff_dsicin_demuxer = { .name = "dsicin", .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN"), .priv_data_size = sizeof(CinDemuxContext), diff --git a/libavformat/dss.c b/libavformat/dss.c index 463ecd909a..ee3a099a95 100644 --- a/libavformat/dss.c +++ b/libavformat/dss.c @@ -354,7 +354,7 @@ static int dss_read_seek(AVFormatContext *s, int stream_index, } -AVInputFormat ff_dss_demuxer = { +const AVInputFormat ff_dss_demuxer = { .name = "dss", .long_name = NULL_IF_CONFIG_SMALL("Digital Speech Standard (DSS)"), .priv_data_size = sizeof(DSSDemuxContext), diff --git a/libavformat/dtsdec.c b/libavformat/dtsdec.c index 0215ee18bd..7f8f73fe05 100644 --- a/libavformat/dtsdec.c +++ b/libavformat/dtsdec.c @@ -133,7 +133,7 @@ static int dts_probe(const AVProbeData *p) } FF_RAW_DEMUXER_CLASS(dts) -AVInputFormat ff_dts_demuxer = { +const AVInputFormat ff_dts_demuxer = { .name = "dts", .long_name = NULL_IF_CONFIG_SMALL("raw DTS"), .read_probe = dts_probe, diff --git a/libavformat/dtshddec.c b/libavformat/dtshddec.c index b1eb7ffb2c..48d3afbebd 100644 --- a/libavformat/dtshddec.c +++ b/libavformat/dtshddec.c @@ -159,7 +159,7 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_dtshd_demuxer = { +const AVInputFormat ff_dtshd_demuxer = { .name = "dtshd", .long_name = NULL_IF_CONFIG_SMALL("raw DTS-HD"), .priv_data_size = sizeof(DTSHDDemuxContext), diff --git a/libavformat/dv.c b/libavformat/dv.c index 26a78139f5..cbb38cbd7d 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -614,7 +614,7 @@ static int dv_probe(const AVProbeData *p) return 0; } -AVInputFormat ff_dv_demuxer = { +const AVInputFormat ff_dv_demuxer = { .name = "dv", .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), .priv_data_size = sizeof(RawDVContext), diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index 320f8479f0..9a853ba7ce 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -436,7 +436,7 @@ static void dv_deinit(AVFormatContext *s) av_fifo_freep(&c->audio_data[i]); } -AVOutputFormat ff_dv_muxer = { +const AVOutputFormat ff_dv_muxer = { .name = "dv", .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), .extensions = "dv", diff --git a/libavformat/dxa.c b/libavformat/dxa.c index 909c5ba2ba..9e5d163db7 100644 --- a/libavformat/dxa.c +++ b/libavformat/dxa.c @@ -226,7 +226,7 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; } -AVInputFormat ff_dxa_demuxer = { +const AVInputFormat ff_dxa_demuxer = { .name = "dxa", .long_name = NULL_IF_CONFIG_SMALL("DXA"), .priv_data_size = sizeof(DXAContext), diff --git a/libavformat/eacdata.c b/libavformat/eacdata.c index b05d5c88b9..86b1101d6b 100644 --- a/libavformat/eacdata.c +++ b/libavformat/eacdata.c @@ -94,7 +94,7 @@ static int cdata_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_ea_cdata_demuxer = { +const AVInputFormat ff_ea_cdata_demuxer = { .name = "ea_cdata", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts cdata"), .priv_data_size = sizeof(CdataDemuxContext), diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 7c0d6a2e37..8080ee7e41 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -752,7 +752,7 @@ get_video_packet: return ret; } -AVInputFormat ff_ea_demuxer = { +const AVInputFormat ff_ea_demuxer = { .name = "ea", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia"), .priv_data_size = sizeof(EaDemuxContext), diff --git a/libavformat/epafdec.c b/libavformat/epafdec.c index 16239ee4af..8b94278c01 100644 --- a/libavformat/epafdec.c +++ b/libavformat/epafdec.c @@ -93,7 +93,7 @@ static int epaf_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_epaf_demuxer = { +const AVInputFormat ff_epaf_demuxer = { .name = "epaf", .long_name = NULL_IF_CONFIG_SMALL("Ensoniq Paris Audio File"), .read_probe = epaf_probe, diff --git a/libavformat/ffmetadec.c b/libavformat/ffmetadec.c index 9fcba08490..93ec6f5899 100644 --- a/libavformat/ffmetadec.c +++ b/libavformat/ffmetadec.c @@ -222,7 +222,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; } -AVInputFormat ff_ffmetadata_demuxer = { +const AVInputFormat ff_ffmetadata_demuxer = { .name = "ffmetadata", .long_name = NULL_IF_CONFIG_SMALL("FFmpeg metadata in text"), .read_probe = probe, diff --git a/libavformat/ffmetaenc.c b/libavformat/ffmetaenc.c index 800fb1887c..edd66e1a04 100644 --- a/libavformat/ffmetaenc.c +++ b/libavformat/ffmetaenc.c @@ -87,7 +87,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_ffmetadata_muxer = { +const AVOutputFormat ff_ffmetadata_muxer = { .name = "ffmetadata", .long_name = NULL_IF_CONFIG_SMALL("FFmpeg metadata in text"), .extensions = "ffmeta", diff --git a/libavformat/fifo.c b/libavformat/fifo.c index 78afaff197..620fffa032 100644 --- a/libavformat/fifo.c +++ b/libavformat/fifo.c @@ -697,7 +697,7 @@ static const AVClass fifo_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_fifo_muxer = { +const AVOutputFormat ff_fifo_muxer = { .name = "fifo", .long_name = NULL_IF_CONFIG_SMALL("FIFO queue pseudo-muxer"), .priv_data_size = sizeof(FifoContext), diff --git a/libavformat/fifo_test.c b/libavformat/fifo_test.c index 02ec215cbb..62670d6d5d 100644 --- a/libavformat/fifo_test.c +++ b/libavformat/fifo_test.c @@ -138,7 +138,7 @@ static const AVClass failing_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_fifo_test_muxer = { +const AVOutputFormat ff_fifo_test_muxer = { .name = "fifo_test", .long_name = NULL_IF_CONFIG_SMALL("Fifo test muxer"), .priv_data_size = sizeof(FailingMuxerContext), diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c index 0bf5a80830..2b6ba63fcf 100644 --- a/libavformat/filmstripdec.c +++ b/libavformat/filmstripdec.c @@ -104,7 +104,7 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, in return 0; } -AVInputFormat ff_filmstrip_demuxer = { +const AVInputFormat ff_filmstrip_demuxer = { .name = "filmstrip", .long_name = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"), .priv_data_size = sizeof(FilmstripDemuxContext), diff --git a/libavformat/filmstripenc.c b/libavformat/filmstripenc.c index 83faf29556..48f483bc90 100644 --- a/libavformat/filmstripenc.c +++ b/libavformat/filmstripenc.c @@ -60,7 +60,7 @@ static int write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_filmstrip_muxer = { +const AVOutputFormat ff_filmstrip_muxer = { .name = "filmstrip", .long_name = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"), .extensions = "flm", diff --git a/libavformat/fitsdec.c b/libavformat/fitsdec.c index df757e868b..54412c60ff 100644 --- a/libavformat/fitsdec.c +++ b/libavformat/fitsdec.c @@ -223,7 +223,7 @@ static const AVClass fits_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_fits_demuxer = { +const AVInputFormat ff_fits_demuxer = { .name = "fits", .long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"), .priv_data_size = sizeof(FITSContext), diff --git a/libavformat/fitsenc.c b/libavformat/fitsenc.c index 212c769df1..5cf34ef067 100644 --- a/libavformat/fitsenc.c +++ b/libavformat/fitsenc.c @@ -194,7 +194,7 @@ static int fits_write_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_fits_muxer = { +const AVOutputFormat ff_fits_muxer = { .name = "fits", .long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"), .extensions = "fits", diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c index f7b21986dc..4ed523f309 100644 --- a/libavformat/flacdec.c +++ b/libavformat/flacdec.c @@ -330,7 +330,7 @@ static int flac_seek(AVFormatContext *s, int stream_index, int64_t timestamp, in } FF_RAW_DEMUXER_CLASS(flac) -AVInputFormat ff_flac_demuxer = { +const AVInputFormat ff_flac_demuxer = { .name = "flac", .long_name = NULL_IF_CONFIG_SMALL("raw FLAC"), .read_probe = flac_probe, diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index cdd25b817f..d8cf3ea4db 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -411,7 +411,7 @@ static const AVClass flac_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_flac_muxer = { +const AVOutputFormat ff_flac_muxer = { .name = "flac", .long_name = NULL_IF_CONFIG_SMALL("raw FLAC"), .priv_data_size = sizeof(FlacMuxerContext), diff --git a/libavformat/flic.c b/libavformat/flic.c index 9a7b8081ed..efd9e54308 100644 --- a/libavformat/flic.c +++ b/libavformat/flic.c @@ -285,7 +285,7 @@ static int flic_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_flic_demuxer = { +const AVInputFormat ff_flic_demuxer = { .name = "flic", .long_name = NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation"), .priv_data_size = sizeof(FlicDemuxContext), diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index fca6f82f5c..718d690421 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1372,7 +1372,7 @@ static const AVClass flv_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_flv_demuxer = { +const AVInputFormat ff_flv_demuxer = { .name = "flv", .long_name = NULL_IF_CONFIG_SMALL("FLV (Flash Video)"), .priv_data_size = sizeof(FLVContext), @@ -1392,7 +1392,7 @@ static const AVClass live_flv_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_live_flv_demuxer = { +const AVInputFormat ff_live_flv_demuxer = { .name = "live_flv", .long_name = NULL_IF_CONFIG_SMALL("live RTMP FLV (Flash Video)"), .priv_data_size = sizeof(FLVContext), @@ -1413,7 +1413,7 @@ static const AVClass kux_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_kux_demuxer = { +const AVInputFormat ff_kux_demuxer = { .name = "kux", .long_name = NULL_IF_CONFIG_SMALL("KUX (YouKu)"), .priv_data_size = sizeof(FLVContext), diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 711b94c5bc..3f24c7e192 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -1112,7 +1112,7 @@ static const AVClass flv_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_flv_muxer = { +const AVOutputFormat ff_flv_muxer = { .name = "flv", .long_name = NULL_IF_CONFIG_SMALL("FLV (Flash Video)"), .mime_type = "video/x-flv", diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c index 4e62049305..eb58d251d2 100644 --- a/libavformat/framecrcenc.c +++ b/libavformat/framecrcenc.c @@ -129,7 +129,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_framecrc_muxer = { +const AVOutputFormat ff_framecrc_muxer = { .name = "framecrc", .long_name = NULL_IF_CONFIG_SMALL("framecrc testing"), .audio_codec = AV_CODEC_ID_PCM_S16LE, diff --git a/libavformat/frmdec.c b/libavformat/frmdec.c index 1bc3a83e11..478656b037 100644 --- a/libavformat/frmdec.c +++ b/libavformat/frmdec.c @@ -103,7 +103,7 @@ static int frm_read_packet(AVFormatContext *avctx, AVPacket *pkt) return 0; } -AVInputFormat ff_frm_demuxer = { +const AVInputFormat ff_frm_demuxer = { .name = "frm", .priv_data_size = sizeof(FrmContext), .long_name = NULL_IF_CONFIG_SMALL("Megalux Frame"), diff --git a/libavformat/fsb.c b/libavformat/fsb.c index fd3e484371..f145d10fd3 100644 --- a/libavformat/fsb.c +++ b/libavformat/fsb.c @@ -200,7 +200,7 @@ static int fsb_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_fsb_demuxer = { +const AVInputFormat ff_fsb_demuxer = { .name = "fsb", .long_name = NULL_IF_CONFIG_SMALL("FMOD Sample Bank"), .read_probe = fsb_probe, diff --git a/libavformat/fwse.c b/libavformat/fwse.c index 00e2e13b11..970d5ffe89 100644 --- a/libavformat/fwse.c +++ b/libavformat/fwse.c @@ -78,7 +78,7 @@ static int fwse_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_fwse_demuxer = { +const AVInputFormat ff_fwse_demuxer = { .name = "fwse", .long_name = NULL_IF_CONFIG_SMALL("Capcom's MT Framework sound"), .read_probe = fwse_probe, diff --git a/libavformat/g722.c b/libavformat/g722.c index fe8c4ae7bb..360ced7172 100644 --- a/libavformat/g722.c +++ b/libavformat/g722.c @@ -47,7 +47,7 @@ static int g722_read_header(AVFormatContext *s) } FF_RAW_DEMUXER_CLASS(g722) -AVInputFormat ff_g722_demuxer = { +const AVInputFormat ff_g722_demuxer = { .name = "g722", .long_name = NULL_IF_CONFIG_SMALL("raw G.722"), .read_header = g722_read_header, diff --git a/libavformat/g723_1.c b/libavformat/g723_1.c index 3af4809347..f38064b5b2 100644 --- a/libavformat/g723_1.c +++ b/libavformat/g723_1.c @@ -75,7 +75,7 @@ static int g723_1_read_packet(AVFormatContext *s, AVPacket *pkt) return pkt->size; } -AVInputFormat ff_g723_1_demuxer = { +const AVInputFormat ff_g723_1_demuxer = { .name = "g723_1", .long_name = NULL_IF_CONFIG_SMALL("G.723.1"), .read_header = g723_1_init, diff --git a/libavformat/g726.c b/libavformat/g726.c index eca9404866..01d92e1d6d 100644 --- a/libavformat/g726.c +++ b/libavformat/g726.c @@ -73,7 +73,7 @@ static const AVClass g726le_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_g726_demuxer = { +const AVInputFormat ff_g726_demuxer = { .name = "g726", .long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left aligned\")"), .read_header = g726_read_header, @@ -92,7 +92,7 @@ static const AVClass g726_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_g726le_demuxer = { +const AVInputFormat ff_g726le_demuxer = { .name = "g726le", .long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right aligned\")"), .read_header = g726_read_header, diff --git a/libavformat/g729dec.c b/libavformat/g729dec.c index c58855cb99..51112f5618 100644 --- a/libavformat/g729dec.c +++ b/libavformat/g729dec.c @@ -93,7 +93,7 @@ static const AVClass g729_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_g729_demuxer = { +const AVInputFormat ff_g729_demuxer = { .name = "g729", .long_name = NULL_IF_CONFIG_SMALL("G.729 raw format demuxer"), .priv_data_size = sizeof(G729DemuxerContext), diff --git a/libavformat/gdv.c b/libavformat/gdv.c index 2ecbb535e7..b20691a2a4 100644 --- a/libavformat/gdv.c +++ b/libavformat/gdv.c @@ -193,7 +193,7 @@ static int gdv_read_packet(AVFormatContext *ctx, AVPacket *pkt) return 0; } -AVInputFormat ff_gdv_demuxer = { +const AVInputFormat ff_gdv_demuxer = { .name = "gdv", .long_name = NULL_IF_CONFIG_SMALL("Gremlin Digital Video"), .priv_data_size = sizeof(GDVContext), diff --git a/libavformat/genh.c b/libavformat/genh.c index 698104a9d6..6d36e5f5fc 100644 --- a/libavformat/genh.c +++ b/libavformat/genh.c @@ -189,7 +189,7 @@ static int genh_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_genh_demuxer = { +const AVInputFormat ff_genh_demuxer = { .name = "genh", .long_name = NULL_IF_CONFIG_SMALL("GENeric Header"), .priv_data_size = sizeof(GENHDemuxContext), diff --git a/libavformat/gif.c b/libavformat/gif.c index e125d386bd..e4f2249083 100644 --- a/libavformat/gif.c +++ b/libavformat/gif.c @@ -203,7 +203,7 @@ static const AVClass gif_muxer_class = { .option = options, }; -AVOutputFormat ff_gif_muxer = { +const AVOutputFormat ff_gif_muxer = { .name = "gif", .long_name = NULL_IF_CONFIG_SMALL("CompuServe Graphics Interchange Format (GIF)"), .mime_type = "image/gif", diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c index d617de5f41..c20bde1781 100644 --- a/libavformat/gifdec.c +++ b/libavformat/gifdec.c @@ -397,7 +397,7 @@ static const AVClass demuxer_class = { .category = AV_CLASS_CATEGORY_DEMUXER, }; -AVInputFormat ff_gif_demuxer = { +const AVInputFormat ff_gif_demuxer = { .name = "gif", .long_name = NULL_IF_CONFIG_SMALL("CompuServe Graphics Interchange Format (GIF)"), .priv_data_size = sizeof(GIFDemuxContext), diff --git a/libavformat/gsmdec.c b/libavformat/gsmdec.c index ec6b2e924f..e14e9aa217 100644 --- a/libavformat/gsmdec.c +++ b/libavformat/gsmdec.c @@ -103,7 +103,7 @@ static const AVClass gsm_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_gsm_demuxer = { +const AVInputFormat ff_gsm_demuxer = { .name = "gsm", .long_name = NULL_IF_CONFIG_SMALL("raw GSM"), .priv_data_size = sizeof(GSMDemuxerContext), diff --git a/libavformat/gxf.c b/libavformat/gxf.c index b787d4f521..53fa302828 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -599,7 +599,7 @@ static int64_t gxf_read_timestamp(AVFormatContext *s, int stream_index, return res; } -AVInputFormat ff_gxf_demuxer = { +const AVInputFormat ff_gxf_demuxer = { .name = "gxf", .long_name = NULL_IF_CONFIG_SMALL("GXF (General eXchange Format)"), .priv_data_size = sizeof(struct gxf_stream_info), diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index 6d4df894f6..1a80ecb603 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -1025,7 +1025,7 @@ static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pk return ff_interleave_packet_per_dts(s, out, NULL, flush); } -AVOutputFormat ff_gxf_muxer = { +const AVOutputFormat ff_gxf_muxer = { .name = "gxf", .long_name = NULL_IF_CONFIG_SMALL("GXF (General eXchange Format)"), .extensions = "gxf", diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c index ec4e44ef12..a1e98eda89 100644 --- a/libavformat/hashenc.c +++ b/libavformat/hashenc.c @@ -171,7 +171,7 @@ static const AVClass hashenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_hash_muxer = { +const AVOutputFormat ff_hash_muxer = { .name = "hash", .long_name = NULL_IF_CONFIG_SMALL("Hash testing"), .priv_data_size = sizeof(struct HashContext), @@ -195,7 +195,7 @@ static const AVClass md5enc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_md5_muxer = { +const AVOutputFormat ff_md5_muxer = { .name = "md5", .long_name = NULL_IF_CONFIG_SMALL("MD5 testing"), .priv_data_size = sizeof(struct HashContext), @@ -219,7 +219,7 @@ static const AVClass streamhashenc_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_streamhash_muxer = { +const AVOutputFormat ff_streamhash_muxer = { .name = "streamhash", .long_name = NULL_IF_CONFIG_SMALL("Per-stream hash testing"), .priv_data_size = sizeof(struct HashContext), @@ -330,7 +330,7 @@ static const AVClass framehash_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_framehash_muxer = { +const AVOutputFormat ff_framehash_muxer = { .name = "framehash", .long_name = NULL_IF_CONFIG_SMALL("Per-frame hash testing"), .priv_data_size = sizeof(struct HashContext), @@ -354,7 +354,7 @@ static const AVClass framemd5_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_framemd5_muxer = { +const AVOutputFormat ff_framemd5_muxer = { .name = "framemd5", .long_name = NULL_IF_CONFIG_SMALL("Per-frame MD5 testing"), .priv_data_size = sizeof(struct HashContext), diff --git a/libavformat/hca.c b/libavformat/hca.c index 8f55e07204..86be5b1345 100644 --- a/libavformat/hca.c +++ b/libavformat/hca.c @@ -113,7 +113,7 @@ static int hca_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_hca_demuxer = { +const AVInputFormat ff_hca_demuxer = { .name = "hca", .long_name = NULL_IF_CONFIG_SMALL("CRI HCA"), .read_probe = hca_probe, diff --git a/libavformat/hcom.c b/libavformat/hcom.c index 3e1e8da236..b7fb7314c8 100644 --- a/libavformat/hcom.c +++ b/libavformat/hcom.c @@ -82,7 +82,7 @@ static int hcom_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_hcom_demuxer = { +const AVInputFormat ff_hcom_demuxer = { .name = "hcom", .long_name = NULL_IF_CONFIG_SMALL("Macintosh HCOM"), .read_probe = hcom_probe, diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 98156afafa..202855392e 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -566,7 +566,7 @@ static const AVClass hds_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_hds_muxer = { +const AVOutputFormat ff_hds_muxer = { .name = "hds", .long_name = NULL_IF_CONFIG_SMALL("HDS Muxer"), .priv_data_size = sizeof(HDSContext), diff --git a/libavformat/hls.c b/libavformat/hls.c index 83acbb0aa6..584f658fe4 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2413,7 +2413,7 @@ static const AVClass hls_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_hls_demuxer = { +const AVInputFormat ff_hls_demuxer = { .name = "hls", .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"), .priv_class = &hls_class, diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 6e7d6d554b..9d9f0c03d4 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3159,7 +3159,7 @@ static const AVClass hls_class = { }; -AVOutputFormat ff_hls_muxer = { +const AVOutputFormat ff_hls_muxer = { .name = "hls", .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"), .extensions = "m3u8", diff --git a/libavformat/hnm.c b/libavformat/hnm.c index f06add5cf8..97990b2673 100644 --- a/libavformat/hnm.c +++ b/libavformat/hnm.c @@ -158,7 +158,7 @@ static int hnm_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_hnm_demuxer = { +const AVInputFormat ff_hnm_demuxer = { .name = "hnm", .long_name = NULL_IF_CONFIG_SMALL("Cryo HNM v4"), .priv_data_size = sizeof(Hnm4DemuxContext), diff --git a/libavformat/icodec.c b/libavformat/icodec.c index 93179bb41e..9349582ffc 100644 --- a/libavformat/icodec.c +++ b/libavformat/icodec.c @@ -220,7 +220,7 @@ static int ico_read_close(AVFormatContext * s) return 0; } -AVInputFormat ff_ico_demuxer = { +const AVInputFormat ff_ico_demuxer = { .name = "ico", .long_name = NULL_IF_CONFIG_SMALL("Microsoft Windows ICO"), .priv_data_size = sizeof(IcoDemuxContext), diff --git a/libavformat/icoenc.c b/libavformat/icoenc.c index a7df8b72bc..39e92a41b7 100644 --- a/libavformat/icoenc.c +++ b/libavformat/icoenc.c @@ -191,7 +191,7 @@ static void ico_deinit(AVFormatContext *s) av_freep(&ico->images); } -AVOutputFormat ff_ico_muxer = { +const AVOutputFormat ff_ico_muxer = { .name = "ico", .long_name = NULL_IF_CONFIG_SMALL("Microsoft Windows ICO"), .priv_data_size = sizeof(IcoMuxContext), diff --git a/libavformat/idcin.c b/libavformat/idcin.c index 5a6a15aa81..0c38d880f4 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -366,7 +366,7 @@ static int idcin_read_seek(AVFormatContext *s, int stream_index, return -1; } -AVInputFormat ff_idcin_demuxer = { +const AVInputFormat ff_idcin_demuxer = { .name = "idcin", .long_name = NULL_IF_CONFIG_SMALL("id Cinematic"), .priv_data_size = sizeof(IdcinDemuxContext), diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c index 519f31d61a..0c8b7278e9 100644 --- a/libavformat/idroqdec.c +++ b/libavformat/idroqdec.c @@ -239,7 +239,7 @@ static int roq_read_packet(AVFormatContext *s, return ret; } -AVInputFormat ff_roq_demuxer = { +const AVInputFormat ff_roq_demuxer = { .name = "roq", .long_name = NULL_IF_CONFIG_SMALL("id RoQ"), .priv_data_size = sizeof(RoqDemuxContext), diff --git a/libavformat/idroqenc.c b/libavformat/idroqenc.c index 261f21939c..57dd7f024e 100644 --- a/libavformat/idroqenc.c +++ b/libavformat/idroqenc.c @@ -59,7 +59,7 @@ static int roq_write_header(struct AVFormatContext *s) return 0; } -AVOutputFormat ff_roq_muxer = { +const AVOutputFormat ff_roq_muxer = { .name = "roq", .long_name = NULL_IF_CONFIG_SMALL("raw id RoQ"), .extensions = "roq", diff --git a/libavformat/iff.c b/libavformat/iff.c index 27b5581cc3..74d96988a7 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -896,7 +896,7 @@ static int iff_read_packet(AVFormatContext *s, return ret; } -AVInputFormat ff_iff_demuxer = { +const AVInputFormat ff_iff_demuxer = { .name = "iff", .long_name = NULL_IF_CONFIG_SMALL("IFF (Interchange File Format)"), .priv_data_size = sizeof(IffDemuxContext), diff --git a/libavformat/ifv.c b/libavformat/ifv.c index bca8f85d09..f82328ada0 100644 --- a/libavformat/ifv.c +++ b/libavformat/ifv.c @@ -305,7 +305,7 @@ static int ifv_read_seek(AVFormatContext *s, int stream_index, int64_t ts, int f return 0; } -AVInputFormat ff_ifv_demuxer = { +const AVInputFormat ff_ifv_demuxer = { .name = "ifv", .long_name = NULL_IF_CONFIG_SMALL("IFV CCTV DVR"), .priv_data_size = sizeof(IFVContext), diff --git a/libavformat/ilbc.c b/libavformat/ilbc.c index 188c0f091a..efa5339089 100644 --- a/libavformat/ilbc.c +++ b/libavformat/ilbc.c @@ -112,7 +112,7 @@ static int ilbc_read_packet(AVFormatContext *s, return 0; } -AVInputFormat ff_ilbc_demuxer = { +const AVInputFormat ff_ilbc_demuxer = { .name = "ilbc", .long_name = NULL_IF_CONFIG_SMALL("iLBC storage"), .read_probe = ilbc_probe, @@ -122,7 +122,7 @@ AVInputFormat ff_ilbc_demuxer = { }; #if CONFIG_ILBC_MUXER -AVOutputFormat ff_ilbc_muxer = { +const AVOutputFormat ff_ilbc_muxer = { .name = "ilbc", .long_name = NULL_IF_CONFIG_SMALL("iLBC storage"), .mime_type = "audio/iLBC", diff --git a/libavformat/img2_alias_pix.c b/libavformat/img2_alias_pix.c index 2fa3b28e7c..d0aac83924 100644 --- a/libavformat/img2_alias_pix.c +++ b/libavformat/img2_alias_pix.c @@ -61,7 +61,7 @@ static const AVClass image2_alias_pix_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_image2_alias_pix_demuxer = { +const AVInputFormat ff_image2_alias_pix_demuxer = { .name = "alias_pix", .long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"), .priv_data_size = sizeof(VideoDemuxData), diff --git a/libavformat/img2_brender_pix.c b/libavformat/img2_brender_pix.c index b8ac3d2abd..9d9a7c0819 100644 --- a/libavformat/img2_brender_pix.c +++ b/libavformat/img2_brender_pix.c @@ -45,7 +45,7 @@ static const AVClass image2_brender_pix_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_image2_brender_pix_demuxer = { +const AVInputFormat ff_image2_brender_pix_demuxer = { .name = "brender_pix", .long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"), .priv_data_size = sizeof(VideoDemuxData), diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 84ce9ea093..d7a7cdaa16 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -633,7 +633,7 @@ static const AVClass img2_class = { .option = ff_img_options, .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_image2_demuxer = { +const AVInputFormat ff_image2_demuxer = { .name = "image2", .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"), .priv_data_size = sizeof(VideoDemuxData), @@ -659,7 +659,7 @@ static const AVClass img2pipe_class = { .option = ff_img2pipe_options, .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_image2pipe_demuxer = { +const AVInputFormat ff_image2pipe_demuxer = { .name = "image2pipe", .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"), .priv_data_size = sizeof(VideoDemuxData), @@ -1112,7 +1112,7 @@ static const AVClass imgname ## _class = {\ .option = ff_img2pipe_options,\ .version = LIBAVUTIL_VERSION_INT,\ };\ -AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\ +const AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\ .name = AV_STRINGIFY(imgname) "_pipe",\ .long_name = NULL_IF_CONFIG_SMALL("piped " AV_STRINGIFY(imgname) " sequence"),\ .priv_data_size = sizeof(VideoDemuxData),\ diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index 0f7a21ffa0..7b5133d300 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -257,7 +257,7 @@ static const AVClass img2mux_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_image2_muxer = { +const AVOutputFormat ff_image2_muxer = { .name = "image2", .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"), .extensions = "bmp,dpx,exr,jls,jpeg,jpg,ljpg,pam,pbm,pcx,pfm,pgm,pgmyuv,png," @@ -273,7 +273,7 @@ AVOutputFormat ff_image2_muxer = { }; #endif #if CONFIG_IMAGE2PIPE_MUXER -AVOutputFormat ff_image2pipe_muxer = { +const AVOutputFormat ff_image2pipe_muxer = { .name = "image2pipe", .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"), .priv_data_size = sizeof(VideoMuxData), diff --git a/libavformat/imx.c b/libavformat/imx.c index 22fca0bdc0..e26f3728ff 100644 --- a/libavformat/imx.c +++ b/libavformat/imx.c @@ -156,7 +156,7 @@ retry: return ret; } -AVInputFormat ff_simbiosis_imx_demuxer = { +const AVInputFormat ff_simbiosis_imx_demuxer = { .name = "simbiosis_imx", .long_name = NULL_IF_CONFIG_SMALL("Simbiosis Interactive IMX"), .priv_data_size = sizeof(SimbiosisIMXDemuxContext), diff --git a/libavformat/ingenientdec.c b/libavformat/ingenientdec.c index 1b437b48f9..9848e12e9e 100644 --- a/libavformat/ingenientdec.c +++ b/libavformat/ingenientdec.c @@ -63,7 +63,7 @@ static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt) FF_RAWVIDEO_DEMUXER_CLASS(ingenient) -AVInputFormat ff_ingenient_demuxer = { +const AVInputFormat ff_ingenient_demuxer = { .name = "ingenient", .long_name = NULL_IF_CONFIG_SMALL("raw Ingenient MJPEG"), .priv_data_size = sizeof(FFRawVideoDemuxerContext), diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c index 9118d7d807..c2505c6faf 100644 --- a/libavformat/ipmovie.c +++ b/libavformat/ipmovie.c @@ -701,7 +701,7 @@ static int ipmovie_read_packet(AVFormatContext *s, } } -AVInputFormat ff_ipmovie_demuxer = { +const AVInputFormat ff_ipmovie_demuxer = { .name = "ipmovie", .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE"), .priv_data_size = sizeof(IPMVEContext), diff --git a/libavformat/ipudec.c b/libavformat/ipudec.c index df53df00d9..283c798751 100644 --- a/libavformat/ipudec.c +++ b/libavformat/ipudec.c @@ -75,7 +75,7 @@ static const AVClass ipu_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_ipu_demuxer = { +const AVInputFormat ff_ipu_demuxer = { .name = "ipu", .long_name = NULL_IF_CONFIG_SMALL("raw IPU Video"), .read_probe = ipu_read_probe, diff --git a/libavformat/ircamdec.c b/libavformat/ircamdec.c index db09f606c6..a05ca5c9c7 100644 --- a/libavformat/ircamdec.c +++ b/libavformat/ircamdec.c @@ -106,7 +106,7 @@ static int ircam_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_ircam_demuxer = { +const AVInputFormat ff_ircam_demuxer = { .name = "ircam", .long_name = NULL_IF_CONFIG_SMALL("Berkeley/IRCAM/CARL Sound Format"), .read_probe = ircam_probe, diff --git a/libavformat/ircamenc.c b/libavformat/ircamenc.c index 323ecb37ee..d49a427b25 100644 --- a/libavformat/ircamenc.c +++ b/libavformat/ircamenc.c @@ -50,7 +50,7 @@ static int ircam_write_header(AVFormatContext *s) return 0; } -AVOutputFormat ff_ircam_muxer = { +const AVOutputFormat ff_ircam_muxer = { .name = "ircam", .extensions = "sf,ircam", .long_name = NULL_IF_CONFIG_SMALL("Berkeley/IRCAM/CARL Sound Format"), diff --git a/libavformat/iss.c b/libavformat/iss.c index 6d6aec2cec..c58c5923ba 100644 --- a/libavformat/iss.c +++ b/libavformat/iss.c @@ -143,7 +143,7 @@ static int iss_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_iss_demuxer = { +const AVInputFormat ff_iss_demuxer = { .name = "iss", .long_name = NULL_IF_CONFIG_SMALL("Funcom ISS"), .priv_data_size = sizeof(IssDemuxContext), diff --git a/libavformat/iv8.c b/libavformat/iv8.c index e25f24eeb9..7237e16172 100644 --- a/libavformat/iv8.c +++ b/libavformat/iv8.c @@ -107,7 +107,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_iv8_demuxer = { +const AVInputFormat ff_iv8_demuxer = { .name = "iv8", .long_name = NULL_IF_CONFIG_SMALL("IndigoVision 8000 video"), .read_probe = probe, diff --git a/libavformat/ivfdec.c b/libavformat/ivfdec.c index 4a802573e7..3e1ea52cbf 100644 --- a/libavformat/ivfdec.c +++ b/libavformat/ivfdec.c @@ -81,7 +81,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_ivf_demuxer = { +const AVInputFormat ff_ivf_demuxer = { .name = "ivf", .long_name = NULL_IF_CONFIG_SMALL("On2 IVF"), .read_probe = probe, diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c index 889c00438c..5aa8bd1257 100644 --- a/libavformat/ivfenc.c +++ b/libavformat/ivfenc.c @@ -121,7 +121,7 @@ static const AVCodecTag codec_ivf_tags[] = { { AV_CODEC_ID_NONE, 0 } }; -AVOutputFormat ff_ivf_muxer = { +const AVOutputFormat ff_ivf_muxer = { .priv_data_size = sizeof(IVFEncContext), .name = "ivf", .long_name = NULL_IF_CONFIG_SMALL("On2 IVF"), diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index 9c6640eef8..c8bded02fe 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -276,7 +276,7 @@ static int jacosub_read_seek(AVFormatContext *s, int stream_index, min_ts, ts, max_ts, flags); } -AVInputFormat ff_jacosub_demuxer = { +const AVInputFormat ff_jacosub_demuxer = { .name = "jacosub", .long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle format"), .priv_data_size = sizeof(JACOsubContext), diff --git a/libavformat/jacosubenc.c b/libavformat/jacosubenc.c index 77575c6b3c..324f2957fb 100644 --- a/libavformat/jacosubenc.c +++ b/libavformat/jacosubenc.c @@ -29,7 +29,7 @@ static int jacosub_write_header(AVFormatContext *s) return 0; } -AVOutputFormat ff_jacosub_muxer = { +const AVOutputFormat ff_jacosub_muxer = { .name = "jacosub", .long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle format"), .mime_type = "text/x-jacosub", diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c index 47d18e2beb..948cab37e5 100644 --- a/libavformat/jvdec.c +++ b/libavformat/jvdec.c @@ -254,7 +254,7 @@ static int read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_jv_demuxer = { +const AVInputFormat ff_jv_demuxer = { .name = "jv", .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV"), .priv_data_size = sizeof(JVDemuxContext), diff --git a/libavformat/kvag.c b/libavformat/kvag.c index 91d1d8a518..94dc1ddc04 100644 --- a/libavformat/kvag.c +++ b/libavformat/kvag.c @@ -119,7 +119,7 @@ static int kvag_seek(AVFormatContext *s, int stream_index, return avio_seek(s->pb, KVAG_HEADER_SIZE, SEEK_SET); } -AVInputFormat ff_kvag_demuxer = { +const AVInputFormat ff_kvag_demuxer = { .name = "kvag", .long_name = NULL_IF_CONFIG_SMALL("Simon & Schuster Interactive VAG"), .read_probe = kvag_probe, @@ -193,7 +193,7 @@ static int kvag_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_kvag_muxer = { +const AVOutputFormat ff_kvag_muxer = { .name = "kvag", .long_name = NULL_IF_CONFIG_SMALL("Simon & Schuster Interactive VAG"), .extensions = "vag", diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c index 80fd2dfe27..87a6b81798 100644 --- a/libavformat/latmenc.c +++ b/libavformat/latmenc.c @@ -256,7 +256,7 @@ static int latm_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) return ret; } -AVOutputFormat ff_latm_muxer = { +const AVOutputFormat ff_latm_muxer = { .name = "latm", .long_name = NULL_IF_CONFIG_SMALL("LOAS/LATM"), .mime_type = "audio/MP4A-LATM", diff --git a/libavformat/libgme.c b/libavformat/libgme.c index a9c487bdb4..95323002e6 100644 --- a/libavformat/libgme.c +++ b/libavformat/libgme.c @@ -197,7 +197,7 @@ static const AVClass class_gme = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_libgme_demuxer = { +const AVInputFormat ff_libgme_demuxer = { .name = "libgme", .long_name = NULL_IF_CONFIG_SMALL("Game Music Emu demuxer"), .priv_data_size = sizeof(GMEContext), diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c index b85269341b..8f8d0e9740 100644 --- a/libavformat/libmodplug.c +++ b/libavformat/libmodplug.c @@ -380,7 +380,7 @@ static const AVClass modplug_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_libmodplug_demuxer = { +const AVInputFormat ff_libmodplug_demuxer = { .name = "libmodplug", .long_name = NULL_IF_CONFIG_SMALL("ModPlug demuxer"), .priv_data_size = sizeof(ModPlugContext), diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c index b07da5f078..628b0939dc 100644 --- a/libavformat/libopenmpt.c +++ b/libavformat/libopenmpt.c @@ -281,7 +281,7 @@ static const AVClass class_openmpt = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_libopenmpt_demuxer = { +const AVInputFormat ff_libopenmpt_demuxer = { .name = "libopenmpt", .long_name = NULL_IF_CONFIG_SMALL("Tracker formats (libopenmpt)"), .priv_data_size = sizeof(OpenMPTContext), diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c index 79d703a8fc..99cba73a00 100644 --- a/libavformat/lmlm4.c +++ b/libavformat/lmlm4.c @@ -121,7 +121,7 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_lmlm4_demuxer = { +const AVInputFormat ff_lmlm4_demuxer = { .name = "lmlm4", .long_name = NULL_IF_CONFIG_SMALL("raw lmlm4"), .read_probe = lmlm4_probe, diff --git a/libavformat/loasdec.c b/libavformat/loasdec.c index e166a5928a..490dd68ee0 100644 --- a/libavformat/loasdec.c +++ b/libavformat/loasdec.c @@ -84,7 +84,7 @@ static int loas_read_header(AVFormatContext *s) } FF_RAW_DEMUXER_CLASS(loas) -AVInputFormat ff_loas_demuxer = { +const AVInputFormat ff_loas_demuxer = { .name = "loas", .long_name = NULL_IF_CONFIG_SMALL("LOAS AudioSyncStream"), .read_probe = loas_probe, diff --git a/libavformat/lrcdec.c b/libavformat/lrcdec.c index ca23a60f84..678b618498 100644 --- a/libavformat/lrcdec.c +++ b/libavformat/lrcdec.c @@ -241,7 +241,7 @@ static int lrc_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_lrc_demuxer = { +const AVInputFormat ff_lrc_demuxer = { .name = "lrc", .long_name = NULL_IF_CONFIG_SMALL("LRC lyrics"), .priv_data_size = sizeof (LRCContext), diff --git a/libavformat/lrcenc.c b/libavformat/lrcenc.c index c5fda64738..5d107cd49a 100644 --- a/libavformat/lrcenc.c +++ b/libavformat/lrcenc.c @@ -140,7 +140,7 @@ static int lrc_write_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_lrc_muxer = { +const AVOutputFormat ff_lrc_muxer = { .name = "lrc", .long_name = NULL_IF_CONFIG_SMALL("LRC lyrics"), .extensions = "lrc", diff --git a/libavformat/luodatdec.c b/libavformat/luodatdec.c index 3ec494a911..fbd621dae6 100644 --- a/libavformat/luodatdec.c +++ b/libavformat/luodatdec.c @@ -115,7 +115,7 @@ static int dat_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_luodat_demuxer = { +const AVInputFormat ff_luodat_demuxer = { .name = "luodat", .long_name = NULL_IF_CONFIG_SMALL("Video CCTV DAT"), .read_probe = dat_probe, diff --git a/libavformat/lvfdec.c b/libavformat/lvfdec.c index 4c87728def..cd64fb9aee 100644 --- a/libavformat/lvfdec.c +++ b/libavformat/lvfdec.c @@ -145,7 +145,7 @@ static int lvf_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; } -AVInputFormat ff_lvf_demuxer = { +const AVInputFormat ff_lvf_demuxer = { .name = "lvf", .long_name = NULL_IF_CONFIG_SMALL("LVF"), .read_probe = lvf_probe, diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c index 509d19fe7f..ebb745d360 100644 --- a/libavformat/lxfdec.c +++ b/libavformat/lxfdec.c @@ -334,7 +334,7 @@ static int lxf_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_lxf_demuxer = { +const AVInputFormat ff_lxf_demuxer = { .name = "lxf", .long_name = NULL_IF_CONFIG_SMALL("VR native stream (LXF)"), .priv_data_size = sizeof(LXFDemuxContext), diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 116e331215..63faea4e35 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -4306,7 +4306,7 @@ static const AVClass webm_dash_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_matroska_demuxer = { +const AVInputFormat ff_matroska_demuxer = { .name = "matroska,webm", .long_name = NULL_IF_CONFIG_SMALL("Matroska / WebM"), .extensions = "mkv,mk3d,mka,mks,webm", @@ -4319,7 +4319,7 @@ AVInputFormat ff_matroska_demuxer = { .mime_type = "audio/webm,audio/x-matroska,video/webm,video/x-matroska" }; -AVInputFormat ff_webm_dash_manifest_demuxer = { +const AVInputFormat ff_webm_dash_manifest_demuxer = { .name = "webm_dash_manifest", .long_name = NULL_IF_CONFIG_SMALL("WebM DASH Manifest"), .priv_data_size = sizeof(MatroskaDemuxContext), diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 5ac4db458b..186a25d920 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2837,7 +2837,7 @@ static const AVClass matroska_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_matroska_muxer = { +const AVOutputFormat ff_matroska_muxer = { .name = "matroska", .long_name = NULL_IF_CONFIG_SMALL("Matroska"), .mime_type = "video/x-matroska", @@ -2873,7 +2873,7 @@ static const AVClass webm_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_webm_muxer = { +const AVOutputFormat ff_webm_muxer = { .name = "webm", .long_name = NULL_IF_CONFIG_SMALL("WebM"), .mime_type = "video/webm", @@ -2902,7 +2902,7 @@ static const AVClass mka_class = { .option = options, .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_matroska_audio_muxer = { +const AVOutputFormat ff_matroska_audio_muxer = { .name = "matroska", .long_name = NULL_IF_CONFIG_SMALL("Matroska Audio"), .mime_type = "audio/x-matroska", diff --git a/libavformat/mca.c b/libavformat/mca.c index 27cfb1c777..0fd5ce8aaf 100644 --- a/libavformat/mca.c +++ b/libavformat/mca.c @@ -217,7 +217,7 @@ static int read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_mca_demuxer = { +const AVInputFormat ff_mca_demuxer = { .name = "mca", .long_name = NULL_IF_CONFIG_SMALL("MCA Audio Format"), .priv_data_size = sizeof(MCADemuxContext), diff --git a/libavformat/mccdec.c b/libavformat/mccdec.c index 2a0b7905a0..a096ac6e93 100644 --- a/libavformat/mccdec.c +++ b/libavformat/mccdec.c @@ -225,7 +225,7 @@ static int mcc_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_mcc_demuxer = { +const AVInputFormat ff_mcc_demuxer = { .name = "mcc", .long_name = NULL_IF_CONFIG_SMALL("MacCaption"), .priv_data_size = sizeof(MCCContext), diff --git a/libavformat/mgsts.c b/libavformat/mgsts.c index 415e052725..02f65e7b1b 100644 --- a/libavformat/mgsts.c +++ b/libavformat/mgsts.c @@ -96,7 +96,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_mgsts_demuxer = { +const AVInputFormat ff_mgsts_demuxer = { .name = "mgsts", .long_name = NULL_IF_CONFIG_SMALL("Metal Gear Solid: The Twin Snakes"), .read_probe = read_probe, diff --git a/libavformat/microdvddec.c b/libavformat/microdvddec.c index ecebff101c..3c45c72595 100644 --- a/libavformat/microdvddec.c +++ b/libavformat/microdvddec.c @@ -203,7 +203,7 @@ static const AVClass microdvd_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_microdvd_demuxer = { +const AVInputFormat ff_microdvd_demuxer = { .name = "microdvd", .long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle format"), .priv_data_size = sizeof(MicroDVDContext), diff --git a/libavformat/microdvdenc.c b/libavformat/microdvdenc.c index 1cd215d8de..4db5e70161 100644 --- a/libavformat/microdvdenc.c +++ b/libavformat/microdvdenc.c @@ -55,7 +55,7 @@ static int microdvd_write_packet(AVFormatContext *avf, AVPacket *pkt) return 0; } -AVOutputFormat ff_microdvd_muxer = { +const AVOutputFormat ff_microdvd_muxer = { .name = "microdvd", .long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle format"), .mime_type = "text/x-microdvd", diff --git a/libavformat/mkvtimestamp_v2.c b/libavformat/mkvtimestamp_v2.c index 7ba6691952..27c7d7a68b 100644 --- a/libavformat/mkvtimestamp_v2.c +++ b/libavformat/mkvtimestamp_v2.c @@ -40,7 +40,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_mkvtimestamp_v2_muxer = { +const AVOutputFormat ff_mkvtimestamp_v2_muxer = { .name = "mkvtimestamp_v2", .long_name = NULL_IF_CONFIG_SMALL("extract pts as timecode v2 format, as defined by mkvtoolnix"), .audio_codec = AV_CODEC_ID_NONE, diff --git a/libavformat/mlpdec.c b/libavformat/mlpdec.c index 40b1833761..6f2ba5d874 100644 --- a/libavformat/mlpdec.c +++ b/libavformat/mlpdec.c @@ -57,7 +57,7 @@ static int mlp_probe(const AVProbeData *p) } FF_RAW_DEMUXER_CLASS(mlp) -AVInputFormat ff_mlp_demuxer = { +const AVInputFormat ff_mlp_demuxer = { .name = "mlp", .long_name = NULL_IF_CONFIG_SMALL("raw MLP"), .read_probe = mlp_probe, @@ -78,7 +78,7 @@ static int thd_probe(const AVProbeData *p) } FF_RAW_DEMUXER_CLASS(truehd) -AVInputFormat ff_truehd_demuxer = { +const AVInputFormat ff_truehd_demuxer = { .name = "truehd", .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"), .read_probe = thd_probe, diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c index 1ddef3461e..998bf42dd6 100644 --- a/libavformat/mlvdec.c +++ b/libavformat/mlvdec.c @@ -481,7 +481,7 @@ static int read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_mlv_demuxer = { +const AVInputFormat ff_mlv_demuxer = { .name = "mlv", .long_name = NULL_IF_CONFIG_SMALL("Magic Lantern Video (MLV)"), .priv_data_size = sizeof(MlvContext), diff --git a/libavformat/mm.c b/libavformat/mm.c index 02ffbcd824..d1acfef445 100644 --- a/libavformat/mm.c +++ b/libavformat/mm.c @@ -190,7 +190,7 @@ static int read_packet(AVFormatContext *s, } } -AVInputFormat ff_mm_demuxer = { +const AVInputFormat ff_mm_demuxer = { .name = "mm", .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM"), .priv_data_size = sizeof(MmDemuxContext), diff --git a/libavformat/mmf.c b/libavformat/mmf.c index e4768db064..0c067a1025 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -295,7 +295,7 @@ static int mmf_read_packet(AVFormatContext *s, AVPacket *pkt) } #if CONFIG_MMF_DEMUXER -AVInputFormat ff_mmf_demuxer = { +const AVInputFormat ff_mmf_demuxer = { .name = "mmf", .long_name = NULL_IF_CONFIG_SMALL("Yamaha SMAF"), .priv_data_size = sizeof(MMFContext), @@ -307,7 +307,7 @@ AVInputFormat ff_mmf_demuxer = { #endif #if CONFIG_MMF_MUXER -AVOutputFormat ff_mmf_muxer = { +const AVOutputFormat ff_mmf_muxer = { .name = "mmf", .long_name = NULL_IF_CONFIG_SMALL("Yamaha SMAF"), .mime_type = "application/vnd.smaf", diff --git a/libavformat/mods.c b/libavformat/mods.c index a26db87e6c..34524a19d8 100644 --- a/libavformat/mods.c +++ b/libavformat/mods.c @@ -91,7 +91,7 @@ static int mods_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_mods_demuxer = { +const AVInputFormat ff_mods_demuxer = { .name = "mods", .long_name = NULL_IF_CONFIG_SMALL("MobiClip MODS"), .read_probe = mods_probe, diff --git a/libavformat/moflex.c b/libavformat/moflex.c index dabe113e6b..0adb5f4864 100644 --- a/libavformat/moflex.c +++ b/libavformat/moflex.c @@ -375,7 +375,7 @@ static int moflex_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_moflex_demuxer = { +const AVInputFormat ff_moflex_demuxer = { .name = "moflex", .long_name = NULL_IF_CONFIG_SMALL("MobiClip MOFLEX"), .priv_data_size = sizeof(MOFLEXDemuxContext), diff --git a/libavformat/mov.c b/libavformat/mov.c index f6e96f31eb..81e2395f12 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8218,7 +8218,7 @@ static const AVClass mov_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_mov_demuxer = { +const AVInputFormat ff_mov_demuxer = { .name = "mov,mp4,m4a,3gp,3g2,mj2", .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"), .priv_class = &mov_class, diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b3d1fda435..f33792661b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -7209,7 +7209,7 @@ static const AVCodecTag codec_f4v_tags[] = { #if CONFIG_MOV_MUXER MOV_CLASS(mov) -AVOutputFormat ff_mov_muxer = { +const AVOutputFormat ff_mov_muxer = { .name = "mov", .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"), .extensions = "mov", @@ -7232,7 +7232,7 @@ AVOutputFormat ff_mov_muxer = { #endif #if CONFIG_TGP_MUXER MOV_CLASS(tgp) -AVOutputFormat ff_tgp_muxer = { +const AVOutputFormat ff_tgp_muxer = { .name = "3gp", .long_name = NULL_IF_CONFIG_SMALL("3GP (3GPP file format)"), .extensions = "3gp", @@ -7252,7 +7252,7 @@ AVOutputFormat ff_tgp_muxer = { #endif #if CONFIG_MP4_MUXER MOV_CLASS(mp4) -AVOutputFormat ff_mp4_muxer = { +const AVOutputFormat ff_mp4_muxer = { .name = "mp4", .long_name = NULL_IF_CONFIG_SMALL("MP4 (MPEG-4 Part 14)"), .mime_type = "video/mp4", @@ -7274,7 +7274,7 @@ AVOutputFormat ff_mp4_muxer = { #endif #if CONFIG_PSP_MUXER MOV_CLASS(psp) -AVOutputFormat ff_psp_muxer = { +const AVOutputFormat ff_psp_muxer = { .name = "psp", .long_name = NULL_IF_CONFIG_SMALL("PSP MP4 (MPEG-4 Part 14)"), .extensions = "mp4,psp", @@ -7295,7 +7295,7 @@ AVOutputFormat ff_psp_muxer = { #endif #if CONFIG_TG2_MUXER MOV_CLASS(tg2) -AVOutputFormat ff_tg2_muxer = { +const AVOutputFormat ff_tg2_muxer = { .name = "3g2", .long_name = NULL_IF_CONFIG_SMALL("3GP2 (3GPP2 file format)"), .extensions = "3g2", @@ -7315,7 +7315,7 @@ AVOutputFormat ff_tg2_muxer = { #endif #if CONFIG_IPOD_MUXER MOV_CLASS(ipod) -AVOutputFormat ff_ipod_muxer = { +const AVOutputFormat ff_ipod_muxer = { .name = "ipod", .long_name = NULL_IF_CONFIG_SMALL("iPod H.264 MP4 (MPEG-4 Part 14)"), .mime_type = "video/mp4", @@ -7336,7 +7336,7 @@ AVOutputFormat ff_ipod_muxer = { #endif #if CONFIG_ISMV_MUXER MOV_CLASS(ismv) -AVOutputFormat ff_ismv_muxer = { +const AVOutputFormat ff_ismv_muxer = { .name = "ismv", .long_name = NULL_IF_CONFIG_SMALL("ISMV/ISMA (Smooth Streaming)"), .mime_type = "video/mp4", @@ -7358,7 +7358,7 @@ AVOutputFormat ff_ismv_muxer = { #endif #if CONFIG_F4V_MUXER MOV_CLASS(f4v) -AVOutputFormat ff_f4v_muxer = { +const AVOutputFormat ff_f4v_muxer = { .name = "f4v", .long_name = NULL_IF_CONFIG_SMALL("F4V Adobe Flash Video"), .mime_type = "application/f4v", diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 53f803ef55..611b423aea 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -606,7 +606,7 @@ static const AVClass demuxer_class = { .category = AV_CLASS_CATEGORY_DEMUXER, }; -AVInputFormat ff_mp3_demuxer = { +const AVInputFormat ff_mp3_demuxer = { .name = "mp3", .long_name = NULL_IF_CONFIG_SMALL("MP2/3 (MPEG audio layer 2/3)"), .read_probe = mp3_read_probe, diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 6607560086..c8328b8b9d 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -636,7 +636,7 @@ static void mp3_deinit(struct AVFormatContext *s) av_freep(&mp3->xing_frame); } -AVOutputFormat ff_mp3_muxer = { +const AVOutputFormat ff_mp3_muxer = { .name = "mp3", .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), .mime_type = "audio/mpeg", diff --git a/libavformat/mpc.c b/libavformat/mpc.c index 31a2072406..9eaf7de0bc 100644 --- a/libavformat/mpc.c +++ b/libavformat/mpc.c @@ -218,7 +218,7 @@ static int mpc_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp } -AVInputFormat ff_mpc_demuxer = { +const AVInputFormat ff_mpc_demuxer = { .name = "mpc", .long_name = NULL_IF_CONFIG_SMALL("Musepack"), .priv_data_size = sizeof(MPCContext), diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index b12a417f63..ff6f43231c 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -325,7 +325,7 @@ static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestam } -AVInputFormat ff_mpc8_demuxer = { +const AVInputFormat ff_mpc8_demuxer = { .name = "mpc8", .long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"), .priv_data_size = sizeof(MPCContext), diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 0ddeaa9fb8..fb1d54e52f 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -681,7 +681,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index, return dts; } -AVInputFormat ff_mpegps_demuxer = { +const AVInputFormat ff_mpegps_demuxer = { .name = "mpeg", .long_name = NULL_IF_CONFIG_SMALL("MPEG-PS (MPEG-2 Program Stream)"), .priv_data_size = sizeof(MpegDemuxContext), @@ -1040,7 +1040,7 @@ static const AVClass vobsub_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_vobsub_demuxer = { +const AVInputFormat ff_vobsub_demuxer = { .name = "vobsub", .long_name = NULL_IF_CONFIG_SMALL("VobSub subtitle format"), .priv_data_size = sizeof(VobSubDemuxContext), diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index d37f181eaa..93c4920904 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -83,10 +83,10 @@ typedef struct MpegMuxContext { int preload; } MpegMuxContext; -extern AVOutputFormat ff_mpeg1vcd_muxer; -extern AVOutputFormat ff_mpeg2dvd_muxer; -extern AVOutputFormat ff_mpeg2svcd_muxer; -extern AVOutputFormat ff_mpeg2vob_muxer; +extern const AVOutputFormat ff_mpeg1vcd_muxer; +extern const AVOutputFormat ff_mpeg2dvd_muxer; +extern const AVOutputFormat ff_mpeg2svcd_muxer; +extern const AVOutputFormat ff_mpeg2vob_muxer; static int put_pack_header(AVFormatContext *ctx, uint8_t *buf, int64_t timestamp) @@ -1290,7 +1290,7 @@ static const AVClass flavor ## _class = { \ #if CONFIG_MPEG1SYSTEM_MUXER MPEGENC_CLASS(mpeg) -AVOutputFormat ff_mpeg1system_muxer = { +const AVOutputFormat ff_mpeg1system_muxer = { .name = "mpeg", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 Systems / MPEG program stream"), .mime_type = "video/mpeg", @@ -1308,7 +1308,7 @@ AVOutputFormat ff_mpeg1system_muxer = { #if CONFIG_MPEG1VCD_MUXER MPEGENC_CLASS(vcd) -AVOutputFormat ff_mpeg1vcd_muxer = { +const AVOutputFormat ff_mpeg1vcd_muxer = { .name = "vcd", .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 Systems / MPEG program stream (VCD)"), .mime_type = "video/mpeg", @@ -1325,7 +1325,7 @@ AVOutputFormat ff_mpeg1vcd_muxer = { #if CONFIG_MPEG2VOB_MUXER MPEGENC_CLASS(vob) -AVOutputFormat ff_mpeg2vob_muxer = { +const AVOutputFormat ff_mpeg2vob_muxer = { .name = "vob", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS (VOB)"), .mime_type = "video/mpeg", @@ -1344,7 +1344,7 @@ AVOutputFormat ff_mpeg2vob_muxer = { /* Same as mpeg2vob_mux except that the pack size is 2324 */ #if CONFIG_MPEG2SVCD_MUXER MPEGENC_CLASS(svcd) -AVOutputFormat ff_mpeg2svcd_muxer = { +const AVOutputFormat ff_mpeg2svcd_muxer = { .name = "svcd", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS (SVCD)"), .mime_type = "video/mpeg", @@ -1363,7 +1363,7 @@ AVOutputFormat ff_mpeg2svcd_muxer = { /* Same as mpeg2vob_mux except the 'is_dvd' flag is set to produce NAV pkts */ #if CONFIG_MPEG2DVD_MUXER MPEGENC_CLASS(dvd) -AVOutputFormat ff_mpeg2dvd_muxer = { +const AVOutputFormat ff_mpeg2dvd_muxer = { .name = "dvd", .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS (DVD VOB)"), .mime_type = "video/mpeg", diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index f947e2cbb1..9092dbce72 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -266,7 +266,7 @@ typedef struct PESContext { int merged_st; } PESContext; -extern AVInputFormat ff_mpegts_demuxer; +extern const AVInputFormat ff_mpegts_demuxer; static struct Program * get_program(MpegTSContext *ts, unsigned int programid) { @@ -3389,7 +3389,7 @@ void avpriv_mpegts_parse_close(MpegTSContext *ts) av_free(ts); } -AVInputFormat ff_mpegts_demuxer = { +const AVInputFormat ff_mpegts_demuxer = { .name = "mpegts", .long_name = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"), .priv_data_size = sizeof(MpegTSContext), @@ -3402,7 +3402,7 @@ AVInputFormat ff_mpegts_demuxer = { .priv_class = &mpegts_class, }; -AVInputFormat ff_mpegtsraw_demuxer = { +const AVInputFormat ff_mpegtsraw_demuxer = { .name = "mpegtsraw", .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-TS (MPEG-2 Transport Stream)"), .priv_data_size = sizeof(MpegTSContext), diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 51da325e90..3fafce0090 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -2134,7 +2134,7 @@ static const AVClass mpegts_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_mpegts_muxer = { +const AVOutputFormat ff_mpegts_muxer = { .name = "mpegts", .long_name = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"), .mime_type = "video/MP2T", diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c index 0404e86d7f..c5e5d1e286 100644 --- a/libavformat/mpjpeg.c +++ b/libavformat/mpjpeg.c @@ -61,7 +61,7 @@ static const AVClass mpjpeg_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_mpjpeg_muxer = { +const AVOutputFormat ff_mpjpeg_muxer = { .name = "mpjpeg", .long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"), .mime_type = "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG, diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c index 5fe00fd162..28a24184a2 100644 --- a/libavformat/mpjpegdec.c +++ b/libavformat/mpjpegdec.c @@ -380,7 +380,7 @@ static const AVClass mpjpeg_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_mpjpeg_demuxer = { +const AVInputFormat ff_mpjpeg_demuxer = { .name = "mpjpeg", .long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"), .mime_type = "multipart/x-mixed-replace", diff --git a/libavformat/mpl2dec.c b/libavformat/mpl2dec.c index 38445c7aad..b99acff157 100644 --- a/libavformat/mpl2dec.c +++ b/libavformat/mpl2dec.c @@ -145,7 +145,7 @@ static int mpl2_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_mpl2_demuxer = { +const AVInputFormat ff_mpl2_demuxer = { .name = "mpl2", .long_name = NULL_IF_CONFIG_SMALL("MPL2 subtitles"), .priv_data_size = sizeof(MPL2Context), diff --git a/libavformat/mpsubdec.c b/libavformat/mpsubdec.c index c113be5eba..ee53be17d6 100644 --- a/libavformat/mpsubdec.c +++ b/libavformat/mpsubdec.c @@ -193,7 +193,7 @@ static int mpsub_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_mpsub_demuxer = { +const AVInputFormat ff_mpsub_demuxer = { .name = "mpsub", .long_name = NULL_IF_CONFIG_SMALL("MPlayer subtitles"), .priv_data_size = sizeof(MPSubContext), diff --git a/libavformat/msf.c b/libavformat/msf.c index 155f488e44..ca2b3a3bf5 100644 --- a/libavformat/msf.c +++ b/libavformat/msf.c @@ -100,7 +100,7 @@ static int msf_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align ? par->block_align : 1024 * par->channels); } -AVInputFormat ff_msf_demuxer = { +const AVInputFormat ff_msf_demuxer = { .name = "msf", .long_name = NULL_IF_CONFIG_SMALL("Sony PS3 MSF"), .read_probe = msf_probe, diff --git a/libavformat/msnwc_tcp.c b/libavformat/msnwc_tcp.c index 650f0d2713..95d4e2bd33 100644 --- a/libavformat/msnwc_tcp.c +++ b/libavformat/msnwc_tcp.c @@ -136,7 +136,7 @@ static int msnwc_tcp_read_packet(AVFormatContext *ctx, AVPacket *pkt) return HEADER_SIZE + size; } -AVInputFormat ff_msnwc_tcp_demuxer = { +const AVInputFormat ff_msnwc_tcp_demuxer = { .name = "msnwctcp", .long_name = NULL_IF_CONFIG_SMALL("MSN TCP Webcam stream"), .read_probe = msnwc_tcp_probe, diff --git a/libavformat/mspdec.c b/libavformat/mspdec.c index 4845eb3729..44854e99c2 100644 --- a/libavformat/mspdec.c +++ b/libavformat/mspdec.c @@ -106,7 +106,7 @@ static int msp_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_msp_demuxer = { +const AVInputFormat ff_msp_demuxer = { .name = "msp", .long_name = NULL_IF_CONFIG_SMALL("Microsoft Paint (MSP))"), .read_probe = msp_probe, diff --git a/libavformat/mtaf.c b/libavformat/mtaf.c index 8764a43a79..5da82e713b 100644 --- a/libavformat/mtaf.c +++ b/libavformat/mtaf.c @@ -71,7 +71,7 @@ static int mtaf_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align); } -AVInputFormat ff_mtaf_demuxer = { +const AVInputFormat ff_mtaf_demuxer = { .name = "mtaf", .long_name = NULL_IF_CONFIG_SMALL("Konami PS2 MTAF"), .read_probe = mtaf_probe, diff --git a/libavformat/mtv.c b/libavformat/mtv.c index e731d91077..26a0fd0ea4 100644 --- a/libavformat/mtv.c +++ b/libavformat/mtv.c @@ -225,7 +225,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_mtv_demuxer = { +const AVInputFormat ff_mtv_demuxer = { .name = "mtv", .long_name = NULL_IF_CONFIG_SMALL("MTV"), .priv_data_size = sizeof(MTVDemuxContext), diff --git a/libavformat/musx.c b/libavformat/musx.c index 9dd721182a..fd5a9297f9 100644 --- a/libavformat/musx.c +++ b/libavformat/musx.c @@ -178,7 +178,7 @@ static int musx_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align); } -AVInputFormat ff_musx_demuxer = { +const AVInputFormat ff_musx_demuxer = { .name = "musx", .long_name = NULL_IF_CONFIG_SMALL("Eurocom MUSX"), .read_probe = musx_probe, diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c index 2aef93a735..2f72f9eb4f 100644 --- a/libavformat/mvdec.c +++ b/libavformat/mvdec.c @@ -498,7 +498,7 @@ static int mv_read_seek(AVFormatContext *avctx, int stream_index, return 0; } -AVInputFormat ff_mv_demuxer = { +const AVInputFormat ff_mv_demuxer = { .name = "mv", .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Movie"), .priv_data_size = sizeof(MvContext), diff --git a/libavformat/mvi.c b/libavformat/mvi.c index d005001f5a..4c67e3569d 100644 --- a/libavformat/mvi.c +++ b/libavformat/mvi.c @@ -143,7 +143,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_mvi_demuxer = { +const AVInputFormat ff_mvi_demuxer = { .name = "mvi", .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels MVI"), .priv_data_size = sizeof(MviDemuxContext), diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 1f372affcb..a9d4944e09 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -3911,7 +3911,7 @@ static const AVClass demuxer_class = { .category = AV_CLASS_CATEGORY_DEMUXER, }; -AVInputFormat ff_mxf_demuxer = { +const AVInputFormat ff_mxf_demuxer = { .name = "mxf", .long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format)"), .flags = AVFMT_SEEK_TO_PTS, diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 7a16bf9155..5ec619675b 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -61,8 +61,8 @@ #include "mxf.h" #include "config.h" -extern AVOutputFormat ff_mxf_d10_muxer; -extern AVOutputFormat ff_mxf_opatom_muxer; +extern const AVOutputFormat ff_mxf_d10_muxer; +extern const AVOutputFormat ff_mxf_opatom_muxer; #define EDIT_UNITS_PER_BODY 250 #define KAG_SIZE 512 @@ -3239,7 +3239,7 @@ static const AVClass mxf_opatom_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_mxf_muxer = { +const AVOutputFormat ff_mxf_muxer = { .name = "mxf", .long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format)"), .mime_type = "application/mxf", @@ -3256,7 +3256,7 @@ AVOutputFormat ff_mxf_muxer = { .priv_class = &mxf_muxer_class, }; -AVOutputFormat ff_mxf_d10_muxer = { +const AVOutputFormat ff_mxf_d10_muxer = { .name = "mxf_d10", .long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format) D-10 Mapping"), .mime_type = "application/mxf", @@ -3272,7 +3272,7 @@ AVOutputFormat ff_mxf_d10_muxer = { .priv_class = &mxf_d10_muxer_class, }; -AVOutputFormat ff_mxf_opatom_muxer = { +const AVOutputFormat ff_mxf_opatom_muxer = { .name = "mxf_opatom", .long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format) Operational Pattern Atom"), .mime_type = "application/mxf", diff --git a/libavformat/mxg.c b/libavformat/mxg.c index fe5879ecf0..d5c1d666fc 100644 --- a/libavformat/mxg.c +++ b/libavformat/mxg.c @@ -249,7 +249,7 @@ static int mxg_close(struct AVFormatContext *s) return 0; } -AVInputFormat ff_mxg_demuxer = { +const AVInputFormat ff_mxg_demuxer = { .name = "mxg", .long_name = NULL_IF_CONFIG_SMALL("MxPEG clip"), .priv_data_size = sizeof(MXGContext), diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c index f2066b485a..ff5eb189bc 100644 --- a/libavformat/ncdec.c +++ b/libavformat/ncdec.c @@ -90,7 +90,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt) return size; } -AVInputFormat ff_nc_demuxer = { +const AVInputFormat ff_nc_demuxer = { .name = "nc", .long_name = NULL_IF_CONFIG_SMALL("NC camera feed"), .read_probe = nc_probe, diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c index 78e938da10..b606ce72aa 100644 --- a/libavformat/nistspheredec.c +++ b/libavformat/nistspheredec.c @@ -132,7 +132,7 @@ static int nist_read_header(AVFormatContext *s) return AVERROR_EOF; } -AVInputFormat ff_nistsphere_demuxer = { +const AVInputFormat ff_nistsphere_demuxer = { .name = "nistsphere", .long_name = NULL_IF_CONFIG_SMALL("NIST SPeech HEader REsources"), .read_probe = nist_probe, diff --git a/libavformat/nspdec.c b/libavformat/nspdec.c index 68f8f99eb3..3aaf887746 100644 --- a/libavformat/nspdec.c +++ b/libavformat/nspdec.c @@ -96,7 +96,7 @@ static int nsp_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_nsp_demuxer = { +const AVInputFormat ff_nsp_demuxer = { .name = "nsp", .long_name = NULL_IF_CONFIG_SMALL("Computerized Speech Lab NSP"), .read_probe = nsp_probe, diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index 4fab52ed36..b79d0dcc62 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -734,7 +734,7 @@ static int nsv_probe(const AVProbeData *p) return score; } -AVInputFormat ff_nsv_demuxer = { +const AVInputFormat ff_nsv_demuxer = { .name = "nsv", .long_name = NULL_IF_CONFIG_SMALL("Nullsoft Streaming Video"), .priv_data_size = sizeof(NSVContext), diff --git a/libavformat/nullenc.c b/libavformat/nullenc.c index fd293d72a6..7354913726 100644 --- a/libavformat/nullenc.c +++ b/libavformat/nullenc.c @@ -26,7 +26,7 @@ static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_null_muxer = { +const AVOutputFormat ff_null_muxer = { .name = "null", .long_name = NULL_IF_CONFIG_SMALL("raw null video"), .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE), diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index d1f3496990..46f21ddd57 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -1292,7 +1292,7 @@ static int read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_nut_demuxer = { +const AVInputFormat ff_nut_demuxer = { .name = "nut", .long_name = NULL_IF_CONFIG_SMALL("NUT"), .flags = AVFMT_SEEK_TO_PTS, diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 1dcb2be1b1..6fb0a810e1 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -1228,7 +1228,7 @@ static const AVClass class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_nut_muxer = { +const AVOutputFormat ff_nut_muxer = { .name = "nut", .long_name = NULL_IF_CONFIG_SMALL("NUT"), .mime_type = "video/x-nut", diff --git a/libavformat/nuv.c b/libavformat/nuv.c index df90df4938..aec87f45fe 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -394,7 +394,7 @@ static int64_t nuv_read_dts(AVFormatContext *s, int stream_index, } -AVInputFormat ff_nuv_demuxer = { +const AVInputFormat ff_nuv_demuxer = { .name = "nuv", .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo"), .priv_data_size = sizeof(NUVContext), diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index a456c3df60..e5ca3272cd 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -966,7 +966,7 @@ static int ogg_probe(const AVProbeData *p) return 0; } -AVInputFormat ff_ogg_demuxer = { +const AVInputFormat ff_ogg_demuxer = { .name = "ogg", .long_name = NULL_IF_CONFIG_SMALL("Ogg"), .priv_data_size = sizeof(struct ogg), diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index f5032759a6..af27957c75 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -745,7 +745,7 @@ static void ogg_free(AVFormatContext *s) #if CONFIG_OGG_MUXER OGG_CLASS(ogg, Ogg) -AVOutputFormat ff_ogg_muxer = { +const AVOutputFormat ff_ogg_muxer = { .name = "ogg", .long_name = NULL_IF_CONFIG_SMALL("Ogg"), .mime_type = "application/ogg", @@ -776,7 +776,7 @@ AVOutputFormat ff_ogg_muxer = { #if CONFIG_OGA_MUXER OGG_CLASS(oga, Ogg audio) -AVOutputFormat ff_oga_muxer = { +const AVOutputFormat ff_oga_muxer = { .name = "oga", .long_name = NULL_IF_CONFIG_SMALL("Ogg Audio"), .mime_type = "audio/ogg", @@ -795,7 +795,7 @@ AVOutputFormat ff_oga_muxer = { #if CONFIG_OGV_MUXER OGG_CLASS(ogv, Ogg video) -AVOutputFormat ff_ogv_muxer = { +const AVOutputFormat ff_ogv_muxer = { .name = "ogv", .long_name = NULL_IF_CONFIG_SMALL("Ogg Video"), .mime_type = "video/ogg", @@ -817,7 +817,7 @@ AVOutputFormat ff_ogv_muxer = { #if CONFIG_SPX_MUXER OGG_CLASS(spx, Ogg Speex) -AVOutputFormat ff_spx_muxer = { +const AVOutputFormat ff_spx_muxer = { .name = "spx", .long_name = NULL_IF_CONFIG_SMALL("Ogg Speex"), .mime_type = "audio/ogg", @@ -836,7 +836,7 @@ AVOutputFormat ff_spx_muxer = { #if CONFIG_OPUS_MUXER OGG_CLASS(opus, Ogg Opus) -AVOutputFormat ff_opus_muxer = { +const AVOutputFormat ff_opus_muxer = { .name = "opus", .long_name = NULL_IF_CONFIG_SMALL("Ogg Opus"), .mime_type = "audio/ogg", diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 74b32db96d..1c2b04212c 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -624,7 +624,7 @@ wipe: return err; } -AVInputFormat ff_oma_demuxer = { +const AVInputFormat ff_oma_demuxer = { .name = "oma", .long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"), .priv_data_size = sizeof(OMAContext), diff --git a/libavformat/omaenc.c b/libavformat/omaenc.c index d3c4f62027..ec71956fbd 100644 --- a/libavformat/omaenc.c +++ b/libavformat/omaenc.c @@ -94,7 +94,7 @@ static av_cold int oma_write_header(AVFormatContext *s) return 0; } -AVOutputFormat ff_oma_muxer = { +const AVOutputFormat ff_oma_muxer = { .name = "oma", .long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"), .mime_type = "audio/x-oma", diff --git a/libavformat/paf.c b/libavformat/paf.c index dbc50100fb..f48b2e60cd 100644 --- a/libavformat/paf.c +++ b/libavformat/paf.c @@ -271,7 +271,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) return pkt->size; } -AVInputFormat ff_paf_demuxer = { +const AVInputFormat ff_paf_demuxer = { .name = "paf", .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File"), .priv_data_size = sizeof(PAFDemuxContext), diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index 9b552936ac..01447c2b7e 100644 --- a/libavformat/pcmdec.c +++ b/libavformat/pcmdec.c @@ -108,7 +108,7 @@ static const AVClass name_ ## _demuxer_class = { \ .option = pcm_options, \ .version = LIBAVUTIL_VERSION_INT, \ }; \ -AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \ +const AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .priv_data_size = sizeof(PCMAudioDemuxerContext), \ @@ -168,7 +168,7 @@ static const AVClass sln_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_sln_demuxer = { +const AVInputFormat ff_sln_demuxer = { .name = "sln", .long_name = NULL_IF_CONFIG_SMALL("Asterisk raw pcm"), .priv_data_size = sizeof(PCMAudioDemuxerContext), diff --git a/libavformat/pcmenc.c b/libavformat/pcmenc.c index 050b9c4aa0..cbfcee7b41 100644 --- a/libavformat/pcmenc.c +++ b/libavformat/pcmenc.c @@ -24,7 +24,7 @@ #define PCMDEF_0(name_, long_name_, ext, codec) #define PCMDEF_1(name_, long_name_, ext, codec) \ -AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \ +const AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .extensions = ext, \ diff --git a/libavformat/pjsdec.c b/libavformat/pjsdec.c index 1f1d51c404..40d820a8d6 100644 --- a/libavformat/pjsdec.c +++ b/libavformat/pjsdec.c @@ -128,7 +128,7 @@ static int pjs_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_pjs_demuxer = { +const AVInputFormat ff_pjs_demuxer = { .name = "pjs", .long_name = NULL_IF_CONFIG_SMALL("PJS (Phoenix Japanimation Society) subtitles"), .priv_data_size = sizeof(PJSContext), diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c index 0c2b6f5a96..ce8e89515a 100644 --- a/libavformat/pmpdec.c +++ b/libavformat/pmpdec.c @@ -183,7 +183,7 @@ static int pmp_close(AVFormatContext *s) return 0; } -AVInputFormat ff_pmp_demuxer = { +const AVInputFormat ff_pmp_demuxer = { .name = "pmp", .long_name = NULL_IF_CONFIG_SMALL("Playstation Portable PMP"), .priv_data_size = sizeof(PMPContext), diff --git a/libavformat/pp_bnk.c b/libavformat/pp_bnk.c index 07eeca3cd5..9455a575b7 100644 --- a/libavformat/pp_bnk.c +++ b/libavformat/pp_bnk.c @@ -332,7 +332,7 @@ static int pp_bnk_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_pp_bnk_demuxer = { +const AVInputFormat ff_pp_bnk_demuxer = { .name = "pp_bnk", .long_name = NULL_IF_CONFIG_SMALL("Pro Pinball Series Soundbank"), .priv_data_size = sizeof(PPBnkCtx), diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c index 678b9f90ac..e649ba3ab4 100644 --- a/libavformat/psxstr.c +++ b/libavformat/psxstr.c @@ -299,7 +299,7 @@ static int str_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_str_demuxer = { +const AVInputFormat ff_str_demuxer = { .name = "psxstr", .long_name = NULL_IF_CONFIG_SMALL("Sony Playstation STR"), .priv_data_size = sizeof(StrDemuxContext), diff --git a/libavformat/pva.c b/libavformat/pva.c index 58ec78750c..8e3013a496 100644 --- a/libavformat/pva.c +++ b/libavformat/pva.c @@ -227,7 +227,7 @@ static int64_t pva_read_timestamp(struct AVFormatContext *s, int stream_index, return res; } -AVInputFormat ff_pva_demuxer = { +const AVInputFormat ff_pva_demuxer = { .name = "pva", .long_name = NULL_IF_CONFIG_SMALL("TechnoTrend PVA"), .priv_data_size = sizeof(PVAContext), diff --git a/libavformat/pvfdec.c b/libavformat/pvfdec.c index 4c919942c0..7205b0b37d 100644 --- a/libavformat/pvfdec.c +++ b/libavformat/pvfdec.c @@ -65,7 +65,7 @@ static int pvf_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_pvf_demuxer = { +const AVInputFormat ff_pvf_demuxer = { .name = "pvf", .long_name = NULL_IF_CONFIG_SMALL("PVF (Portable Voice Format)"), .read_probe = pvf_probe, diff --git a/libavformat/qcp.c b/libavformat/qcp.c index 168030dc16..206ee8bdce 100644 --- a/libavformat/qcp.c +++ b/libavformat/qcp.c @@ -195,7 +195,7 @@ static int qcp_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; } -AVInputFormat ff_qcp_demuxer = { +const AVInputFormat ff_qcp_demuxer = { .name = "qcp", .long_name = NULL_IF_CONFIG_SMALL("QCP"), .priv_data_size = sizeof(QCPContext), diff --git a/libavformat/r3d.c b/libavformat/r3d.c index 9de0fb52c7..004efac355 100644 --- a/libavformat/r3d.c +++ b/libavformat/r3d.c @@ -400,7 +400,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i return 0; } -AVInputFormat ff_r3d_demuxer = { +const AVInputFormat ff_r3d_demuxer = { .name = "r3d", .long_name = NULL_IF_CONFIG_SMALL("REDCODE R3D"), .priv_data_size = sizeof(R3DContext), diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index 122afca1b6..c162b52940 100644 --- a/libavformat/rawdec.c +++ b/libavformat/rawdec.c @@ -133,7 +133,7 @@ const AVOption ff_raw_options[] = { #if CONFIG_DATA_DEMUXER FF_RAW_DEMUXER_CLASS(raw_data) -AVInputFormat ff_data_demuxer = { +const AVInputFormat ff_data_demuxer = { .name = "data", .long_name = NULL_IF_CONFIG_SMALL("raw data"), .read_header = ff_raw_data_read_header, diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h index 34c8adcb19..e64ad8010c 100644 --- a/libavformat/rawdec.h +++ b/libavformat/rawdec.h @@ -70,7 +70,7 @@ static const AVClass name ## _demuxer_class = {\ #define FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, flag)\ FF_RAWVIDEO_DEMUXER_CLASS(shortname)\ -AVInputFormat ff_ ## shortname ## _demuxer = {\ +const AVInputFormat ff_ ## shortname ## _demuxer = {\ .name = #shortname,\ .long_name = NULL_IF_CONFIG_SMALL(longname),\ .read_probe = probe,\ @@ -96,7 +96,7 @@ static const AVClass name ## _demuxer_class = {\ #define FF_DEF_RAWSUB_DEMUXER(shortname, longname, probe, ext, id, flag)\ FF_RAWSUB_DEMUXER_CLASS(shortname)\ -AVInputFormat ff_ ## shortname ## _demuxer = {\ +const AVInputFormat ff_ ## shortname ## _demuxer = {\ .name = #shortname,\ .long_name = NULL_IF_CONFIG_SMALL(longname),\ .read_probe = probe,\ diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c index 9e23545543..088b62f369 100644 --- a/libavformat/rawenc.c +++ b/libavformat/rawenc.c @@ -57,7 +57,7 @@ static int force_one_stream(AVFormatContext *s) /* Note: Do not forget to add new entries to the Makefile as well. */ #if CONFIG_AC3_MUXER -AVOutputFormat ff_ac3_muxer = { +const AVOutputFormat ff_ac3_muxer = { .name = "ac3", .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"), .mime_type = "audio/x-ac3", @@ -90,7 +90,7 @@ static int adx_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_adx_muxer = { +const AVOutputFormat ff_adx_muxer = { .name = "adx", .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"), .extensions = "adx", @@ -104,7 +104,7 @@ AVOutputFormat ff_adx_muxer = { #endif #if CONFIG_APTX_MUXER -AVOutputFormat ff_aptx_muxer = { +const AVOutputFormat ff_aptx_muxer = { .name = "aptx", .long_name = NULL_IF_CONFIG_SMALL("raw aptX (Audio Processing Technology for Bluetooth)"), .extensions = "aptx", @@ -117,7 +117,7 @@ AVOutputFormat ff_aptx_muxer = { #endif #if CONFIG_APTX_HD_MUXER -AVOutputFormat ff_aptx_hd_muxer = { +const AVOutputFormat ff_aptx_hd_muxer = { .name = "aptx_hd", .long_name = NULL_IF_CONFIG_SMALL("raw aptX HD (Audio Processing Technology for Bluetooth)"), .extensions = "aptxhd", @@ -130,7 +130,7 @@ AVOutputFormat ff_aptx_hd_muxer = { #endif #if CONFIG_AVS2_MUXER -AVOutputFormat ff_avs2_muxer = { +const AVOutputFormat ff_avs2_muxer = { .name = "avs2", .long_name = NULL_IF_CONFIG_SMALL("raw AVS2-P2/IEEE1857.4 video"), .extensions = "avs,avs2", @@ -143,7 +143,7 @@ AVOutputFormat ff_avs2_muxer = { #endif #if CONFIG_CAVSVIDEO_MUXER -AVOutputFormat ff_cavsvideo_muxer = { +const AVOutputFormat ff_cavsvideo_muxer = { .name = "cavsvideo", .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"), .extensions = "cavs", @@ -156,7 +156,7 @@ AVOutputFormat ff_cavsvideo_muxer = { #endif #if CONFIG_CODEC2RAW_MUXER -AVOutputFormat ff_codec2raw_muxer = { +const AVOutputFormat ff_codec2raw_muxer = { .name = "codec2raw", .long_name = NULL_IF_CONFIG_SMALL("raw codec2 muxer"), .audio_codec = AV_CODEC_ID_CODEC2, @@ -169,7 +169,7 @@ AVOutputFormat ff_codec2raw_muxer = { #if CONFIG_DATA_MUXER -AVOutputFormat ff_data_muxer = { +const AVOutputFormat ff_data_muxer = { .name = "data", .long_name = NULL_IF_CONFIG_SMALL("raw data"), .init = force_one_stream, @@ -179,7 +179,7 @@ AVOutputFormat ff_data_muxer = { #endif #if CONFIG_DIRAC_MUXER -AVOutputFormat ff_dirac_muxer = { +const AVOutputFormat ff_dirac_muxer = { .name = "dirac", .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"), .extensions = "drc,vc2", @@ -192,7 +192,7 @@ AVOutputFormat ff_dirac_muxer = { #endif #if CONFIG_DNXHD_MUXER -AVOutputFormat ff_dnxhd_muxer = { +const AVOutputFormat ff_dnxhd_muxer = { .name = "dnxhd", .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), .extensions = "dnxhd,dnxhr", @@ -205,7 +205,7 @@ AVOutputFormat ff_dnxhd_muxer = { #endif #if CONFIG_DTS_MUXER -AVOutputFormat ff_dts_muxer = { +const AVOutputFormat ff_dts_muxer = { .name = "dts", .long_name = NULL_IF_CONFIG_SMALL("raw DTS"), .mime_type = "audio/x-dca", @@ -219,7 +219,7 @@ AVOutputFormat ff_dts_muxer = { #endif #if CONFIG_EAC3_MUXER -AVOutputFormat ff_eac3_muxer = { +const AVOutputFormat ff_eac3_muxer = { .name = "eac3", .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"), .mime_type = "audio/x-eac3", @@ -233,7 +233,7 @@ AVOutputFormat ff_eac3_muxer = { #endif #if CONFIG_G722_MUXER -AVOutputFormat ff_g722_muxer = { +const AVOutputFormat ff_g722_muxer = { .name = "g722", .long_name = NULL_IF_CONFIG_SMALL("raw G.722"), .mime_type = "audio/G722", @@ -247,7 +247,7 @@ AVOutputFormat ff_g722_muxer = { #endif #if CONFIG_G723_1_MUXER -AVOutputFormat ff_g723_1_muxer = { +const AVOutputFormat ff_g723_1_muxer = { .name = "g723_1", .long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"), .mime_type = "audio/g723", @@ -261,7 +261,7 @@ AVOutputFormat ff_g723_1_muxer = { #endif #if CONFIG_G726_MUXER -AVOutputFormat ff_g726_muxer = { +const AVOutputFormat ff_g726_muxer = { .name = "g726", .long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left-justified\")"), .audio_codec = AV_CODEC_ID_ADPCM_G726, @@ -273,7 +273,7 @@ AVOutputFormat ff_g726_muxer = { #endif #if CONFIG_G726LE_MUXER -AVOutputFormat ff_g726le_muxer = { +const AVOutputFormat ff_g726le_muxer = { .name = "g726le", .long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right-justified\")"), .audio_codec = AV_CODEC_ID_ADPCM_G726LE, @@ -285,7 +285,7 @@ AVOutputFormat ff_g726le_muxer = { #endif #if CONFIG_GSM_MUXER -AVOutputFormat ff_gsm_muxer = { +const AVOutputFormat ff_gsm_muxer = { .name = "gsm", .long_name = NULL_IF_CONFIG_SMALL("raw GSM"), .mime_type = "audio/x-gsm", @@ -299,7 +299,7 @@ AVOutputFormat ff_gsm_muxer = { #endif #if CONFIG_H261_MUXER -AVOutputFormat ff_h261_muxer = { +const AVOutputFormat ff_h261_muxer = { .name = "h261", .long_name = NULL_IF_CONFIG_SMALL("raw H.261"), .mime_type = "video/x-h261", @@ -313,7 +313,7 @@ AVOutputFormat ff_h261_muxer = { #endif #if CONFIG_H263_MUXER -AVOutputFormat ff_h263_muxer = { +const AVOutputFormat ff_h263_muxer = { .name = "h263", .long_name = NULL_IF_CONFIG_SMALL("raw H.263"), .mime_type = "video/x-h263", @@ -336,7 +336,7 @@ static int h264_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) return 1; } -AVOutputFormat ff_h264_muxer = { +const AVOutputFormat ff_h264_muxer = { .name = "h264", .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"), .extensions = "h264,264", @@ -359,7 +359,7 @@ static int hevc_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) return 1; } -AVOutputFormat ff_hevc_muxer = { +const AVOutputFormat ff_hevc_muxer = { .name = "hevc", .long_name = NULL_IF_CONFIG_SMALL("raw HEVC video"), .extensions = "hevc,h265,265", @@ -373,7 +373,7 @@ AVOutputFormat ff_hevc_muxer = { #endif #if CONFIG_M4V_MUXER -AVOutputFormat ff_m4v_muxer = { +const AVOutputFormat ff_m4v_muxer = { .name = "m4v", .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"), .extensions = "m4v", @@ -386,7 +386,7 @@ AVOutputFormat ff_m4v_muxer = { #endif #if CONFIG_MJPEG_MUXER -AVOutputFormat ff_mjpeg_muxer = { +const AVOutputFormat ff_mjpeg_muxer = { .name = "mjpeg", .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"), .mime_type = "video/x-mjpeg", @@ -400,7 +400,7 @@ AVOutputFormat ff_mjpeg_muxer = { #endif #if CONFIG_MLP_MUXER -AVOutputFormat ff_mlp_muxer = { +const AVOutputFormat ff_mlp_muxer = { .name = "mlp", .long_name = NULL_IF_CONFIG_SMALL("raw MLP"), .extensions = "mlp", @@ -413,7 +413,7 @@ AVOutputFormat ff_mlp_muxer = { #endif #if CONFIG_MP2_MUXER -AVOutputFormat ff_mp2_muxer = { +const AVOutputFormat ff_mp2_muxer = { .name = "mp2", .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), .mime_type = "audio/mpeg", @@ -427,7 +427,7 @@ AVOutputFormat ff_mp2_muxer = { #endif #if CONFIG_MPEG1VIDEO_MUXER -AVOutputFormat ff_mpeg1video_muxer = { +const AVOutputFormat ff_mpeg1video_muxer = { .name = "mpeg1video", .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"), .mime_type = "video/mpeg", @@ -441,7 +441,7 @@ AVOutputFormat ff_mpeg1video_muxer = { #endif #if CONFIG_MPEG2VIDEO_MUXER -AVOutputFormat ff_mpeg2video_muxer = { +const AVOutputFormat ff_mpeg2video_muxer = { .name = "mpeg2video", .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"), .extensions = "m2v", @@ -454,7 +454,7 @@ AVOutputFormat ff_mpeg2video_muxer = { #endif #if CONFIG_RAWVIDEO_MUXER -AVOutputFormat ff_rawvideo_muxer = { +const AVOutputFormat ff_rawvideo_muxer = { .name = "rawvideo", .long_name = NULL_IF_CONFIG_SMALL("raw video"), .extensions = "yuv,rgb", @@ -466,7 +466,7 @@ AVOutputFormat ff_rawvideo_muxer = { #endif #if CONFIG_SBC_MUXER -AVOutputFormat ff_sbc_muxer = { +const AVOutputFormat ff_sbc_muxer = { .name = "sbc", .long_name = NULL_IF_CONFIG_SMALL("raw SBC"), .mime_type = "audio/x-sbc", @@ -479,7 +479,7 @@ AVOutputFormat ff_sbc_muxer = { #endif #if CONFIG_TRUEHD_MUXER -AVOutputFormat ff_truehd_muxer = { +const AVOutputFormat ff_truehd_muxer = { .name = "truehd", .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"), .extensions = "thd", @@ -492,7 +492,7 @@ AVOutputFormat ff_truehd_muxer = { #endif #if CONFIG_VC1_MUXER -AVOutputFormat ff_vc1_muxer = { +const AVOutputFormat ff_vc1_muxer = { .name = "vc1", .long_name = NULL_IF_CONFIG_SMALL("raw VC-1 video"), .extensions = "vc1", diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c index 8bde22c4e9..5049a29b9c 100644 --- a/libavformat/rawvideodec.c +++ b/libavformat/rawvideodec.c @@ -100,7 +100,7 @@ static const AVClass rawvideo_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_rawvideo_demuxer = { +const AVInputFormat ff_rawvideo_demuxer = { .name = "rawvideo", .long_name = NULL_IF_CONFIG_SMALL("raw video"), .priv_data_size = sizeof(RawVideoDemuxerContext), diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c index f534774420..22fc58bc99 100644 --- a/libavformat/realtextdec.c +++ b/libavformat/realtextdec.c @@ -149,7 +149,7 @@ static int realtext_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_realtext_demuxer = { +const AVInputFormat ff_realtext_demuxer = { .name = "realtext", .long_name = NULL_IF_CONFIG_SMALL("RealText subtitle format"), .priv_data_size = sizeof(RealTextContext), diff --git a/libavformat/redspark.c b/libavformat/redspark.c index 0ce8915311..eca182c3a7 100644 --- a/libavformat/redspark.c +++ b/libavformat/redspark.c @@ -150,7 +150,7 @@ static int redspark_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_redspark_demuxer = { +const AVInputFormat ff_redspark_demuxer = { .name = "redspark", .long_name = NULL_IF_CONFIG_SMALL("RedSpark"), .priv_data_size = sizeof(RedSparkContext), diff --git a/libavformat/rl2.c b/libavformat/rl2.c index fa1b38b133..8b6a7f1827 100644 --- a/libavformat/rl2.c +++ b/libavformat/rl2.c @@ -300,7 +300,7 @@ static int rl2_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp return 0; } -AVInputFormat ff_rl2_demuxer = { +const AVInputFormat ff_rl2_demuxer = { .name = "rl2", .long_name = NULL_IF_CONFIG_SMALL("RL2"), .priv_data_size = sizeof(Rl2DemuxContext), diff --git a/libavformat/rm.h b/libavformat/rm.h index 7b080e2a36..8f47559a36 100644 --- a/libavformat/rm.h +++ b/libavformat/rm.h @@ -34,7 +34,7 @@ RMStream *ff_rm_alloc_rmstream (void); void ff_rm_free_rmstream (RMStream *rms); /*< input format for Realmedia-style RTSP streams */ -extern AVInputFormat ff_rdt_demuxer; +extern const AVInputFormat ff_rdt_demuxer; /** * Read the MDPR chunk, which contains stream-specific codec initialization diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index fc3bff4859..538f549495 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -1147,7 +1147,7 @@ static int rm_read_seek(AVFormatContext *s, int stream_index, } -AVInputFormat ff_rm_demuxer = { +const AVInputFormat ff_rm_demuxer = { .name = "rm", .long_name = NULL_IF_CONFIG_SMALL("RealMedia"), .priv_data_size = sizeof(RMDemuxContext), @@ -1159,7 +1159,7 @@ AVInputFormat ff_rm_demuxer = { .read_seek = rm_read_seek, }; -AVInputFormat ff_rdt_demuxer = { +const AVInputFormat ff_rdt_demuxer = { .name = "rdt", .long_name = NULL_IF_CONFIG_SMALL("RDT demuxer"), .priv_data_size = sizeof(RMDemuxContext), @@ -1406,7 +1406,7 @@ static int ivr_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_ivr_demuxer = { +const AVInputFormat ff_ivr_demuxer = { .name = "ivr", .long_name = NULL_IF_CONFIG_SMALL("IVR (Internet Video Recording)"), .priv_data_size = sizeof(RMDemuxContext), diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index e137dbc44f..1b2b0ecf38 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -465,7 +465,7 @@ static int rm_write_trailer(AVFormatContext *s) } -AVOutputFormat ff_rm_muxer = { +const AVOutputFormat ff_rm_muxer = { .name = "rm", .long_name = NULL_IF_CONFIG_SMALL("RealMedia"), .mime_type = "application/vnd.rn-realmedia", diff --git a/libavformat/rpl.c b/libavformat/rpl.c index b98488c7b1..f5d2b8fe59 100644 --- a/libavformat/rpl.c +++ b/libavformat/rpl.c @@ -382,7 +382,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_rpl_demuxer = { +const AVInputFormat ff_rpl_demuxer = { .name = "rpl", .long_name = NULL_IF_CONFIG_SMALL("RPL / ARMovie"), .priv_data_size = sizeof(RPLContext), diff --git a/libavformat/rsd.c b/libavformat/rsd.c index 9785a55726..ba3b3429b9 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -220,7 +220,7 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_rsd_demuxer = { +const AVInputFormat ff_rsd_demuxer = { .name = "rsd", .long_name = NULL_IF_CONFIG_SMALL("GameCube RSD"), .read_probe = rsd_probe, diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c index 91b86bf006..ffd0fdff0d 100644 --- a/libavformat/rsodec.c +++ b/libavformat/rsodec.c @@ -72,7 +72,7 @@ static int rso_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_rso_demuxer = { +const AVInputFormat ff_rso_demuxer = { .name = "rso", .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO"), .extensions = "rso", diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c index 780538a545..fc327d8a2f 100644 --- a/libavformat/rsoenc.c +++ b/libavformat/rsoenc.c @@ -91,7 +91,7 @@ static int rso_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_rso_muxer = { +const AVOutputFormat ff_rso_muxer = { .name = "rso", .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO"), .extensions = "rso", diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 557128ce53..2a1c176066 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -648,7 +648,7 @@ static int rtp_write_trailer(AVFormatContext *s1) return 0; } -AVOutputFormat ff_rtp_muxer = { +const AVOutputFormat ff_rtp_muxer = { .name = "rtp", .long_name = NULL_IF_CONFIG_SMALL("RTP output"), .priv_data_size = sizeof(RTPMuxContext), diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c index 36c0979ca1..fdc759c179 100644 --- a/libavformat/rtpenc_mpegts.c +++ b/libavformat/rtpenc_mpegts.c @@ -187,7 +187,7 @@ static const AVClass rtp_mpegts_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_rtp_mpegts_muxer = { +const AVOutputFormat ff_rtp_mpegts_muxer = { .name = "rtp_mpegts", .long_name = NULL_IF_CONFIG_SMALL("RTP/mpegts output format"), .priv_data_size = sizeof(MuxChain), diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index a8c5a641cb..3899c26fa4 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2464,7 +2464,7 @@ static const AVClass sdp_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_sdp_demuxer = { +const AVInputFormat ff_sdp_demuxer = { .name = "sdp", .long_name = NULL_IF_CONFIG_SMALL("SDP"), .priv_data_size = sizeof(RTSPState), @@ -2623,7 +2623,7 @@ static const AVClass rtp_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_rtp_demuxer = { +const AVInputFormat ff_rtp_demuxer = { .name = "rtp", .long_name = NULL_IF_CONFIG_SMALL("RTP input"), .priv_data_size = sizeof(RTSPState), diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 113da975e1..6e97c23330 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -983,7 +983,7 @@ static const AVClass rtsp_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_rtsp_demuxer = { +const AVInputFormat ff_rtsp_demuxer = { .name = "rtsp", .long_name = NULL_IF_CONFIG_SMALL("RTSP input"), .priv_data_size = sizeof(RTSPState), diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c index c320227438..e0fed1eebe 100644 --- a/libavformat/rtspenc.c +++ b/libavformat/rtspenc.c @@ -240,7 +240,7 @@ static int rtsp_write_close(AVFormatContext *s) return 0; } -AVOutputFormat ff_rtsp_muxer = { +const AVOutputFormat ff_rtsp_muxer = { .name = "rtsp", .long_name = NULL_IF_CONFIG_SMALL("RTSP output"), .priv_data_size = sizeof(RTSPState), diff --git a/libavformat/s337m.c b/libavformat/s337m.c index 9d1b52eb61..37e93db7d5 100644 --- a/libavformat/s337m.c +++ b/libavformat/s337m.c @@ -186,7 +186,7 @@ static int s337m_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_s337m_demuxer = { +const AVInputFormat ff_s337m_demuxer = { .name = "s337m", .long_name = NULL_IF_CONFIG_SMALL("SMPTE 337M"), .read_probe = s337m_probe, diff --git a/libavformat/samidec.c b/libavformat/samidec.c index d84f56ce6f..8f97cb7331 100644 --- a/libavformat/samidec.c +++ b/libavformat/samidec.c @@ -142,7 +142,7 @@ static int sami_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_sami_demuxer = { +const AVInputFormat ff_sami_demuxer = { .name = "sami", .long_name = NULL_IF_CONFIG_SMALL("SAMI subtitle format"), .priv_data_size = sizeof(SAMIContext), diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c index 3014bdaa97..05a6d59086 100644 --- a/libavformat/sapdec.c +++ b/libavformat/sapdec.c @@ -234,7 +234,7 @@ static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_sap_demuxer = { +const AVInputFormat ff_sap_demuxer = { .name = "sap", .long_name = NULL_IF_CONFIG_SMALL("SAP input"), .priv_data_size = sizeof(struct SAPState), diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index dc1c210408..1374a09906 100644 --- a/libavformat/sapenc.c +++ b/libavformat/sapenc.c @@ -267,7 +267,7 @@ static int sap_write_packet(AVFormatContext *s, AVPacket *pkt) return ff_write_chained(rtpctx, 0, pkt, s, 0); } -AVOutputFormat ff_sap_muxer = { +const AVOutputFormat ff_sap_muxer = { .name = "sap", .long_name = NULL_IF_CONFIG_SMALL("SAP output"), .priv_data_size = sizeof(struct SAPState), diff --git a/libavformat/sbcdec.c b/libavformat/sbcdec.c index 7a455ce123..4de29b37c5 100644 --- a/libavformat/sbcdec.c +++ b/libavformat/sbcdec.c @@ -23,7 +23,7 @@ #include "rawdec.h" FF_RAW_DEMUXER_CLASS(sbc) -AVInputFormat ff_sbc_demuxer = { +const AVInputFormat ff_sbc_demuxer = { .name = "sbc", .long_name = NULL_IF_CONFIG_SMALL("raw SBC (low-complexity subband codec)"), .extensions = "sbc,msbc", diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c index 83016d0c13..bc9945dfd4 100644 --- a/libavformat/sbgdec.c +++ b/libavformat/sbgdec.c @@ -1518,7 +1518,7 @@ static const AVClass sbg_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_sbg_demuxer = { +const AVInputFormat ff_sbg_demuxer = { .name = "sbg", .long_name = NULL_IF_CONFIG_SMALL("SBaGen binaural beats script"), .priv_data_size = sizeof(struct sbg_demuxer), diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c index 1786520944..5ad21a1f8b 100644 --- a/libavformat/sccdec.c +++ b/libavformat/sccdec.c @@ -201,7 +201,7 @@ static int scc_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_scc_demuxer = { +const AVInputFormat ff_scc_demuxer = { .name = "scc", .long_name = NULL_IF_CONFIG_SMALL("Scenarist Closed Captions"), .priv_data_size = sizeof(SCCContext), diff --git a/libavformat/sccenc.c b/libavformat/sccenc.c index f3cf3d599c..a40d84cb4e 100644 --- a/libavformat/sccenc.c +++ b/libavformat/sccenc.c @@ -111,7 +111,7 @@ static int scc_write_packet(AVFormatContext *avf, AVPacket *pkt) return 0; } -AVOutputFormat ff_scc_muxer = { +const AVOutputFormat ff_scc_muxer = { .name = "scc", .long_name = NULL_IF_CONFIG_SMALL("Scenarist Closed Captions"), .extensions = "scc", diff --git a/libavformat/sdr2.c b/libavformat/sdr2.c index 3743d59e58..373116a4a6 100644 --- a/libavformat/sdr2.c +++ b/libavformat/sdr2.c @@ -109,7 +109,7 @@ static int sdr2_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_sdr2_demuxer = { +const AVInputFormat ff_sdr2_demuxer = { .name = "sdr2", .long_name = NULL_IF_CONFIG_SMALL("SDR2"), .read_probe = sdr2_probe, diff --git a/libavformat/sdsdec.c b/libavformat/sdsdec.c index c70f5af849..073dadafbb 100644 --- a/libavformat/sdsdec.c +++ b/libavformat/sdsdec.c @@ -153,7 +153,7 @@ static int sds_read_packet(AVFormatContext *ctx, AVPacket *pkt) return ret; } -AVInputFormat ff_sds_demuxer = { +const AVInputFormat ff_sds_demuxer = { .name = "sds", .long_name = NULL_IF_CONFIG_SMALL("MIDI Sample Dump Standard"), .priv_data_size = sizeof(SDSContext), diff --git a/libavformat/sdxdec.c b/libavformat/sdxdec.c index 19651048ad..76fd2caa00 100644 --- a/libavformat/sdxdec.c +++ b/libavformat/sdxdec.c @@ -78,7 +78,7 @@ static int sdx_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_sdx_demuxer = { +const AVInputFormat ff_sdx_demuxer = { .name = "sdx", .long_name = NULL_IF_CONFIG_SMALL("Sample Dump eXchange"), .read_probe = sdx_probe, diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index 675de00ed2..4b4327a179 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -331,7 +331,7 @@ static int film_read_seek(AVFormatContext *s, int stream_index, int64_t timestam return 0; } -AVInputFormat ff_segafilm_demuxer = { +const AVInputFormat ff_segafilm_demuxer = { .name = "film_cpk", .long_name = NULL_IF_CONFIG_SMALL("Sega FILM / CPK"), .priv_data_size = sizeof(FilmDemuxContext), diff --git a/libavformat/segafilmenc.c b/libavformat/segafilmenc.c index 42249d4eff..ff8cb66aca 100644 --- a/libavformat/segafilmenc.c +++ b/libavformat/segafilmenc.c @@ -321,7 +321,7 @@ static void film_deinit(AVFormatContext *format_context) ffio_free_dyn_buf(&film->header); } -AVOutputFormat ff_segafilm_muxer = { +const AVOutputFormat ff_segafilm_muxer = { .name = "film_cpk", .long_name = NULL_IF_CONFIG_SMALL("Sega FILM / CPK"), .extensions = "cpk", diff --git a/libavformat/segment.c b/libavformat/segment.c index 74106445e6..24490f1280 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -1053,7 +1053,7 @@ static const AVClass seg_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_segment_muxer = { +const AVOutputFormat ff_segment_muxer = { .name = "segment", .long_name = NULL_IF_CONFIG_SMALL("segment"), .priv_data_size = sizeof(SegmentContext), @@ -1076,7 +1076,7 @@ static const AVClass sseg_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_stream_segment_muxer = { +const AVOutputFormat ff_stream_segment_muxer = { .name = "stream_segment,ssegment", .long_name = NULL_IF_CONFIG_SMALL("streaming segment muxer"), .priv_data_size = sizeof(SegmentContext), diff --git a/libavformat/serdec.c b/libavformat/serdec.c index 5745ae1430..fa2de32fd5 100644 --- a/libavformat/serdec.c +++ b/libavformat/serdec.c @@ -132,7 +132,7 @@ static const AVClass ser_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_ser_demuxer = { +const AVInputFormat ff_ser_demuxer = { .name = "ser", .long_name = NULL_IF_CONFIG_SMALL("SER (Simple uncompressed video format for astronomical capturing)"), .priv_data_size = sizeof(SERDemuxerContext), diff --git a/libavformat/sga.c b/libavformat/sga.c index e7a41e91ea..3dc62317a1 100644 --- a/libavformat/sga.c +++ b/libavformat/sga.c @@ -466,7 +466,7 @@ static int sga_seek(AVFormatContext *s, int stream_index, return -1; } -AVInputFormat ff_sga_demuxer = { +const AVInputFormat ff_sga_demuxer = { .name = "sga", .long_name = NULL_IF_CONFIG_SMALL("Digital Pictures SGA"), .priv_data_size = sizeof(SGADemuxContext), diff --git a/libavformat/shortendec.c b/libavformat/shortendec.c index f7390b2e62..9209de4388 100644 --- a/libavformat/shortendec.c +++ b/libavformat/shortendec.c @@ -66,7 +66,7 @@ static int shn_probe(const AVProbeData *p) } FF_RAW_DEMUXER_CLASS(shorten) -AVInputFormat ff_shorten_demuxer = { +const AVInputFormat ff_shorten_demuxer = { .name = "shn", .long_name = NULL_IF_CONFIG_SMALL("raw Shorten"), .read_probe = shn_probe, diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c index cfbf1843d4..13304b0596 100644 --- a/libavformat/sierravmd.c +++ b/libavformat/sierravmd.c @@ -317,7 +317,7 @@ static int vmd_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_vmd_demuxer = { +const AVInputFormat ff_vmd_demuxer = { .name = "vmd", .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD"), .priv_data_size = sizeof(VmdDemuxContext), diff --git a/libavformat/siff.c b/libavformat/siff.c index 60a867df14..a34de24ec8 100644 --- a/libavformat/siff.c +++ b/libavformat/siff.c @@ -249,7 +249,7 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) return pkt->size; } -AVInputFormat ff_siff_demuxer = { +const AVInputFormat ff_siff_demuxer = { .name = "siff", .long_name = NULL_IF_CONFIG_SMALL("Beam Software SIFF"), .priv_data_size = sizeof(SIFFContext), diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 61209e7038..a96093b191 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -386,7 +386,7 @@ static int smacker_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_smacker_demuxer = { +const AVInputFormat ff_smacker_demuxer = { .name = "smk", .long_name = NULL_IF_CONFIG_SMALL("Smacker"), .priv_data_size = sizeof(SmackerContext), diff --git a/libavformat/smjpegdec.c b/libavformat/smjpegdec.c index a4e1f957ed..dc95a822c5 100644 --- a/libavformat/smjpegdec.c +++ b/libavformat/smjpegdec.c @@ -180,7 +180,7 @@ static int smjpeg_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_smjpeg_demuxer = { +const AVInputFormat ff_smjpeg_demuxer = { .name = "smjpeg", .long_name = NULL_IF_CONFIG_SMALL("Loki SDL MJPEG"), .priv_data_size = sizeof(SMJPEGContext), diff --git a/libavformat/smjpegenc.c b/libavformat/smjpegenc.c index c3c1a6346c..ac5576fa76 100644 --- a/libavformat/smjpegenc.c +++ b/libavformat/smjpegenc.c @@ -132,7 +132,7 @@ static int smjpeg_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_smjpeg_muxer = { +const AVOutputFormat ff_smjpeg_muxer = { .name = "smjpeg", .long_name = NULL_IF_CONFIG_SMALL("Loki SDL MJPEG"), .priv_data_size = sizeof(SMJPEGMuxContext), diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index 941f03f0b1..a18fbd07d9 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -637,7 +637,7 @@ static const AVClass ism_class = { }; -AVOutputFormat ff_smoothstreaming_muxer = { +const AVOutputFormat ff_smoothstreaming_muxer = { .name = "smoothstreaming", .long_name = NULL_IF_CONFIG_SMALL("Smooth Streaming Muxer"), .priv_data_size = sizeof(SmoothStreamingContext), diff --git a/libavformat/smush.c b/libavformat/smush.c index 962eb57ab2..59807ab963 100644 --- a/libavformat/smush.c +++ b/libavformat/smush.c @@ -242,7 +242,7 @@ static int smush_read_packet(AVFormatContext *ctx, AVPacket *pkt) return 0; } -AVInputFormat ff_smush_demuxer = { +const AVInputFormat ff_smush_demuxer = { .name = "smush", .long_name = NULL_IF_CONFIG_SMALL("LucasArts Smush"), .priv_data_size = sizeof(SMUSHContext), diff --git a/libavformat/sol.c b/libavformat/sol.c index 19905e84fa..42498492b6 100644 --- a/libavformat/sol.c +++ b/libavformat/sol.c @@ -138,7 +138,7 @@ static int sol_read_packet(AVFormatContext *s, return 0; } -AVInputFormat ff_sol_demuxer = { +const AVInputFormat ff_sol_demuxer = { .name = "sol", .long_name = NULL_IF_CONFIG_SMALL("Sierra SOL"), .read_probe = sol_probe, diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c index 35e11feec6..83fb5e3758 100644 --- a/libavformat/soxdec.c +++ b/libavformat/soxdec.c @@ -124,7 +124,7 @@ static int sox_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_sox_demuxer = { +const AVInputFormat ff_sox_demuxer = { .name = "sox", .long_name = NULL_IF_CONFIG_SMALL("SoX native"), .read_probe = sox_probe, diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c index ce276f88b5..e24501bacd 100644 --- a/libavformat/soxenc.c +++ b/libavformat/soxenc.c @@ -104,7 +104,7 @@ static int sox_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_sox_muxer = { +const AVOutputFormat ff_sox_muxer = { .name = "sox", .long_name = NULL_IF_CONFIG_SMALL("SoX native"), .extensions = "sox", diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c index 1808fa9d65..e39a304247 100644 --- a/libavformat/spdifdec.c +++ b/libavformat/spdifdec.c @@ -231,7 +231,7 @@ int ff_spdif_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_spdif_demuxer = { +const AVInputFormat ff_spdif_demuxer = { .name = "spdif", .long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (compressed data in S/PDIF)"), .read_probe = spdif_probe, diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c index c3ba3a1a19..e8f54bff4b 100644 --- a/libavformat/spdifenc.c +++ b/libavformat/spdifenc.c @@ -673,7 +673,7 @@ static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt) return 0; } -AVOutputFormat ff_spdif_muxer = { +const AVOutputFormat ff_spdif_muxer = { .name = "spdif", .long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"), .extensions = "spdif", diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c index d6ff00ba6d..fa52b85566 100644 --- a/libavformat/srtdec.c +++ b/libavformat/srtdec.c @@ -234,7 +234,7 @@ static int srt_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_srt_demuxer = { +const AVInputFormat ff_srt_demuxer = { .name = "srt", .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), .priv_data_size = sizeof(SRTContext), diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index 93d5ed7ac8..7f6171edd3 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -96,7 +96,7 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt) return 0; } -AVOutputFormat ff_srt_muxer = { +const AVOutputFormat ff_srt_muxer = { .name = "srt", .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), .mime_type = "application/x-subrip", diff --git a/libavformat/stldec.c b/libavformat/stldec.c index fb67407ac5..7b7c98577d 100644 --- a/libavformat/stldec.c +++ b/libavformat/stldec.c @@ -130,7 +130,7 @@ static int stl_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_stl_demuxer = { +const AVInputFormat ff_stl_demuxer = { .name = "stl", .long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"), .priv_data_size = sizeof(STLContext), diff --git a/libavformat/subviewer1dec.c b/libavformat/subviewer1dec.c index f2eee294a1..d1ba99f984 100644 --- a/libavformat/subviewer1dec.c +++ b/libavformat/subviewer1dec.c @@ -113,7 +113,7 @@ static int subviewer1_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_subviewer1_demuxer = { +const AVInputFormat ff_subviewer1_demuxer = { .name = "subviewer1", .long_name = NULL_IF_CONFIG_SMALL("SubViewer v1 subtitle format"), .priv_data_size = sizeof(SubViewer1Context), diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c index 5c2fe676f1..9bb7728407 100644 --- a/libavformat/subviewerdec.c +++ b/libavformat/subviewerdec.c @@ -203,7 +203,7 @@ static int subviewer_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_subviewer_demuxer = { +const AVInputFormat ff_subviewer_demuxer = { .name = "subviewer", .long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle format"), .priv_data_size = sizeof(SubViewerContext), diff --git a/libavformat/supdec.c b/libavformat/supdec.c index d3fb2510c5..fbcc744bb4 100644 --- a/libavformat/supdec.c +++ b/libavformat/supdec.c @@ -97,7 +97,7 @@ static int sup_probe(const AVProbeData *p) return AVPROBE_SCORE_MAX; } -AVInputFormat ff_sup_demuxer = { +const AVInputFormat ff_sup_demuxer = { .name = "sup", .long_name = NULL_IF_CONFIG_SMALL("raw HDMV Presentation Graphic Stream subtitles"), .extensions = "sup", diff --git a/libavformat/supenc.c b/libavformat/supenc.c index 643dda5ffc..1ca19fa161 100644 --- a/libavformat/supenc.c +++ b/libavformat/supenc.c @@ -84,7 +84,7 @@ static int sup_write_header(AVFormatContext *s) return 0; } -AVOutputFormat ff_sup_muxer = { +const AVOutputFormat ff_sup_muxer = { .name = "sup", .long_name = NULL_IF_CONFIG_SMALL("raw HDMV Presentation Graphic Stream subtitles"), .extensions = "sup", diff --git a/libavformat/svag.c b/libavformat/svag.c index 83e033b106..0774eae112 100644 --- a/libavformat/svag.c +++ b/libavformat/svag.c @@ -68,7 +68,7 @@ static int svag_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align); } -AVInputFormat ff_svag_demuxer = { +const AVInputFormat ff_svag_demuxer = { .name = "svag", .long_name = NULL_IF_CONFIG_SMALL("Konami PS2 SVAG"), .read_probe = svag_probe, diff --git a/libavformat/svs.c b/libavformat/svs.c index 8be26c5bc3..da63c8e370 100644 --- a/libavformat/svs.c +++ b/libavformat/svs.c @@ -86,7 +86,7 @@ static int svs_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_svs_demuxer = { +const AVInputFormat ff_svs_demuxer = { .name = "svs", .long_name = NULL_IF_CONFIG_SMALL("Square SVS"), .read_probe = svs_probe, diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 48c5af9a0b..f5a98e8b53 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -567,7 +567,7 @@ static av_cold int swf_read_close(AVFormatContext *avctx) } #endif -AVInputFormat ff_swf_demuxer = { +const AVInputFormat ff_swf_demuxer = { .name = "swf", .long_name = NULL_IF_CONFIG_SMALL("SWF (ShockWave Flash)"), .priv_data_size = sizeof(SWFDecContext), diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c index 7e4e214014..1fd2ad81a3 100644 --- a/libavformat/swfenc.c +++ b/libavformat/swfenc.c @@ -539,7 +539,7 @@ static void swf_deinit(AVFormatContext *s) } #if CONFIG_SWF_MUXER -AVOutputFormat ff_swf_muxer = { +const AVOutputFormat ff_swf_muxer = { .name = "swf", .long_name = NULL_IF_CONFIG_SMALL("SWF (ShockWave Flash)"), .mime_type = "application/x-shockwave-flash", @@ -555,7 +555,7 @@ AVOutputFormat ff_swf_muxer = { }; #endif #if CONFIG_AVM2_MUXER -AVOutputFormat ff_avm2_muxer = { +const AVOutputFormat ff_avm2_muxer = { .name = "avm2", .long_name = NULL_IF_CONFIG_SMALL("SWF (ShockWave Flash) (AVM2)"), .mime_type = "application/x-shockwave-flash", diff --git a/libavformat/takdec.c b/libavformat/takdec.c index 6d18b6af21..46c500efef 100644 --- a/libavformat/takdec.c +++ b/libavformat/takdec.c @@ -214,7 +214,7 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) } FF_RAW_DEMUXER_CLASS(tak) -AVInputFormat ff_tak_demuxer = { +const AVInputFormat ff_tak_demuxer = { .name = "tak", .long_name = NULL_IF_CONFIG_SMALL("raw TAK"), .priv_data_size = sizeof(TAKDemuxContext), diff --git a/libavformat/tedcaptionsdec.c b/libavformat/tedcaptionsdec.c index 9a882c4d79..94e8432c53 100644 --- a/libavformat/tedcaptionsdec.c +++ b/libavformat/tedcaptionsdec.c @@ -354,7 +354,7 @@ static int tedcaptions_read_seek(AVFormatContext *avf, int stream_index, min_ts, ts, max_ts, flags); } -AVInputFormat ff_tedcaptions_demuxer = { +const AVInputFormat ff_tedcaptions_demuxer = { .name = "tedcaptions", .long_name = NULL_IF_CONFIG_SMALL("TED Talks captions"), .priv_data_size = sizeof(TEDCaptionsDemuxer), diff --git a/libavformat/tee.c b/libavformat/tee.c index c0b69a386c..f33cbea98c 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -606,7 +606,7 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt) return ret_all; } -AVOutputFormat ff_tee_muxer = { +const AVOutputFormat ff_tee_muxer = { .name = "tee", .long_name = NULL_IF_CONFIG_SMALL("Multiple muxer tee"), .priv_data_size = sizeof(TeeContext), diff --git a/libavformat/thp.c b/libavformat/thp.c index bcc3febaa1..7aad24221b 100644 --- a/libavformat/thp.c +++ b/libavformat/thp.c @@ -212,7 +212,7 @@ static int thp_read_packet(AVFormatContext *s, return 0; } -AVInputFormat ff_thp_demuxer = { +const AVInputFormat ff_thp_demuxer = { .name = "thp", .long_name = NULL_IF_CONFIG_SMALL("THP"), .priv_data_size = sizeof(ThpDemuxContext), diff --git a/libavformat/tiertexseq.c b/libavformat/tiertexseq.c index d7719e5acb..164a75bd53 100644 --- a/libavformat/tiertexseq.c +++ b/libavformat/tiertexseq.c @@ -316,7 +316,7 @@ static int seq_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_tiertexseq_demuxer = { +const AVInputFormat ff_tiertexseq_demuxer = { .name = "tiertexseq", .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ"), .priv_data_size = sizeof(SeqDemuxContext), diff --git a/libavformat/tmv.c b/libavformat/tmv.c index b74af547c5..507f6cd032 100644 --- a/libavformat/tmv.c +++ b/libavformat/tmv.c @@ -187,7 +187,7 @@ static int tmv_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_tmv_demuxer = { +const AVInputFormat ff_tmv_demuxer = { .name = "tmv", .long_name = NULL_IF_CONFIG_SMALL("8088flex TMV"), .priv_data_size = sizeof(TMVContext), diff --git a/libavformat/tta.c b/libavformat/tta.c index 46c2508bce..7a95675794 100644 --- a/libavformat/tta.c +++ b/libavformat/tta.c @@ -184,7 +184,7 @@ static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp return 0; } -AVInputFormat ff_tta_demuxer = { +const AVInputFormat ff_tta_demuxer = { .name = "tta", .long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"), .priv_data_size = sizeof(TTAContext), diff --git a/libavformat/ttaenc.c b/libavformat/ttaenc.c index 32eb269040..5f66695a9a 100644 --- a/libavformat/ttaenc.c +++ b/libavformat/ttaenc.c @@ -165,7 +165,7 @@ static void tta_deinit(AVFormatContext *s) avpriv_packet_list_free(&tta->queue, &tta->queue_end); } -AVOutputFormat ff_tta_muxer = { +const AVOutputFormat ff_tta_muxer = { .name = "tta", .long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"), .mime_type = "audio/x-tta", diff --git a/libavformat/ttmlenc.c b/libavformat/ttmlenc.c index 940f8bbd4e..dfa44f0836 100644 --- a/libavformat/ttmlenc.c +++ b/libavformat/ttmlenc.c @@ -159,7 +159,7 @@ static int ttml_write_trailer(AVFormatContext *ctx) return 0; } -AVOutputFormat ff_ttml_muxer = { +const AVOutputFormat ff_ttml_muxer = { .name = "ttml", .long_name = NULL_IF_CONFIG_SMALL("TTML subtitle"), .extensions = "ttml", diff --git a/libavformat/tty.c b/libavformat/tty.c index aed5c888c3..fbea3196fa 100644 --- a/libavformat/tty.c +++ b/libavformat/tty.c @@ -178,7 +178,7 @@ static const AVClass tty_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_tty_demuxer = { +const AVInputFormat ff_tty_demuxer = { .name = "tty", .long_name = NULL_IF_CONFIG_SMALL("Tele-typewriter"), .priv_data_size = sizeof(TtyDemuxContext), diff --git a/libavformat/txd.c b/libavformat/txd.c index 072cd04f57..93db883087 100644 --- a/libavformat/txd.c +++ b/libavformat/txd.c @@ -92,7 +92,7 @@ next_chunk: return 0; } -AVInputFormat ff_txd_demuxer = { +const AVInputFormat ff_txd_demuxer = { .name = "txd", .long_name = NULL_IF_CONFIG_SMALL("Renderware TeXture Dictionary"), .read_probe = txd_probe, diff --git a/libavformat/ty.c b/libavformat/ty.c index c8e1067c0e..8830467f99 100644 --- a/libavformat/ty.c +++ b/libavformat/ty.c @@ -710,7 +710,7 @@ static int ty_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_ty_demuxer = { +const AVInputFormat ff_ty_demuxer = { .name = "ty", .long_name = NULL_IF_CONFIG_SMALL("TiVo TY Stream"), .priv_data_size = sizeof(TYDemuxContext), diff --git a/libavformat/uncodedframecrcenc.c b/libavformat/uncodedframecrcenc.c index 2f1a14ca97..e30fe4ddb9 100644 --- a/libavformat/uncodedframecrcenc.c +++ b/libavformat/uncodedframecrcenc.c @@ -164,7 +164,7 @@ static int write_packet(struct AVFormatContext *s, AVPacket *pkt) return AVERROR(ENOSYS); } -AVOutputFormat ff_uncodedframecrc_muxer = { +const AVOutputFormat ff_uncodedframecrc_muxer = { .name = "uncodedframecrc", .long_name = NULL_IF_CONFIG_SMALL("uncoded framecrc testing"), .audio_codec = AV_CODEC_ID_PCM_S16LE, diff --git a/libavformat/v210.c b/libavformat/v210.c index a90bd367c1..361fd2a625 100644 --- a/libavformat/v210.c +++ b/libavformat/v210.c @@ -95,7 +95,7 @@ static const AVClass v210_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_v210_demuxer = { +const AVInputFormat ff_v210_demuxer = { .name = "v210", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), .priv_data_size = sizeof(V210DemuxerContext), @@ -116,7 +116,7 @@ static const AVClass v210x_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_v210x_demuxer = { +const AVInputFormat ff_v210x_demuxer = { .name = "v210x", .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), .priv_data_size = sizeof(V210DemuxerContext), diff --git a/libavformat/vag.c b/libavformat/vag.c index 51045e6fe2..9ef5466e39 100644 --- a/libavformat/vag.c +++ b/libavformat/vag.c @@ -73,7 +73,7 @@ static int vag_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align); } -AVInputFormat ff_vag_demuxer = { +const AVInputFormat ff_vag_demuxer = { .name = "vag", .long_name = NULL_IF_CONFIG_SMALL("Sony PS2 VAG"), .read_probe = vag_probe, diff --git a/libavformat/vapoursynth.c b/libavformat/vapoursynth.c index 46e08ee0f5..4ec4e77b59 100644 --- a/libavformat/vapoursynth.c +++ b/libavformat/vapoursynth.c @@ -483,7 +483,7 @@ static const AVClass class_vs = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_vapoursynth_demuxer = { +const AVInputFormat ff_vapoursynth_demuxer = { .name = "vapoursynth", .long_name = NULL_IF_CONFIG_SMALL("VapourSynth demuxer"), .priv_data_size = sizeof(VSContext), diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c index ff57f44b14..90ea729e0b 100644 --- a/libavformat/vc1test.c +++ b/libavformat/vc1test.c @@ -116,7 +116,7 @@ static int vc1t_read_packet(AVFormatContext *s, return pkt->size; } -AVInputFormat ff_vc1t_demuxer = { +const AVInputFormat ff_vc1t_demuxer = { .name = "vc1test", .long_name = NULL_IF_CONFIG_SMALL("VC-1 test bitstream"), .read_probe = vc1t_probe, diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c index 1365bdd660..4bc95026f5 100644 --- a/libavformat/vc1testenc.c +++ b/libavformat/vc1testenc.c @@ -80,7 +80,7 @@ static int vc1test_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_vc1t_muxer = { +const AVOutputFormat ff_vc1t_muxer = { .name = "vc1test", .long_name = NULL_IF_CONFIG_SMALL("VC-1 test bitstream"), .extensions = "rcv", diff --git a/libavformat/vividas.c b/libavformat/vividas.c index d35a646bde..a7deab0e51 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -781,7 +781,7 @@ static int viv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp return 0; } -AVInputFormat ff_vividas_demuxer = { +const AVInputFormat ff_vividas_demuxer = { .name = "vividas", .long_name = NULL_IF_CONFIG_SMALL("Vividas VIV"), .priv_data_size = sizeof(VividasDemuxContext), diff --git a/libavformat/vivo.c b/libavformat/vivo.c index fb58aa6178..b2904cd25a 100644 --- a/libavformat/vivo.c +++ b/libavformat/vivo.c @@ -309,7 +309,7 @@ restart: return ret; } -AVInputFormat ff_vivo_demuxer = { +const AVInputFormat ff_vivo_demuxer = { .name = "vivo", .long_name = NULL_IF_CONFIG_SMALL("Vivo"), .priv_data_size = sizeof(VivoContext), diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c index 6cdc720ee7..0bb2bc4fb1 100644 --- a/libavformat/vocdec.c +++ b/libavformat/vocdec.c @@ -98,7 +98,7 @@ static int voc_read_seek(AVFormatContext *s, int stream_index, return -1; } -AVInputFormat ff_voc_demuxer = { +const AVInputFormat ff_voc_demuxer = { .name = "voc", .long_name = NULL_IF_CONFIG_SMALL("Creative Voice"), .priv_data_size = sizeof(VocDecContext), diff --git a/libavformat/vocenc.c b/libavformat/vocenc.c index bdc63843c4..798b463a82 100644 --- a/libavformat/vocenc.c +++ b/libavformat/vocenc.c @@ -95,7 +95,7 @@ static int voc_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_voc_muxer = { +const AVOutputFormat ff_voc_muxer = { .name = "voc", .long_name = NULL_IF_CONFIG_SMALL("Creative Voice"), .mime_type = "audio/x-voc", diff --git a/libavformat/vpk.c b/libavformat/vpk.c index f7f20548dc..9eb3eb5362 100644 --- a/libavformat/vpk.c +++ b/libavformat/vpk.c @@ -134,7 +134,7 @@ static int vpk_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_vpk_demuxer = { +const AVInputFormat ff_vpk_demuxer = { .name = "vpk", .long_name = NULL_IF_CONFIG_SMALL("Sony PS2 VPK"), .priv_data_size = sizeof(VPKDemuxContext), diff --git a/libavformat/vplayerdec.c b/libavformat/vplayerdec.c index ca23ec76ac..f6c2b35ea7 100644 --- a/libavformat/vplayerdec.c +++ b/libavformat/vplayerdec.c @@ -118,7 +118,7 @@ static int vplayer_read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_vplayer_demuxer = { +const AVInputFormat ff_vplayer_demuxer = { .name = "vplayer", .long_name = NULL_IF_CONFIG_SMALL("VPlayer subtitles"), .priv_data_size = sizeof(VPlayerContext), diff --git a/libavformat/vqf.c b/libavformat/vqf.c index 449f4061f7..431ba1a0c9 100644 --- a/libavformat/vqf.c +++ b/libavformat/vqf.c @@ -287,7 +287,7 @@ static int vqf_read_seek(AVFormatContext *s, return 0; } -AVInputFormat ff_vqf_demuxer = { +const AVInputFormat ff_vqf_demuxer = { .name = "vqf", .long_name = NULL_IF_CONFIG_SMALL("Nippon Telegraph and Telephone Corporation (NTT) TwinVQ"), .priv_data_size = sizeof(VqfContext), diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index e11535b6ae..0c8b8bf85d 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -816,7 +816,7 @@ static const AVClass wav_demuxer_class = { .option = demux_options, .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_wav_demuxer = { +const AVInputFormat ff_wav_demuxer = { .name = "wav", .long_name = NULL_IF_CONFIG_SMALL("WAV / WAVE (Waveform Audio)"), .priv_data_size = sizeof(WAVDemuxContext), @@ -966,7 +966,7 @@ static const AVClass w64_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_w64_demuxer = { +const AVInputFormat ff_w64_demuxer = { .name = "w64", .long_name = NULL_IF_CONFIG_SMALL("Sony Wave64"), .priv_data_size = sizeof(WAVDemuxContext), diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index 563a30d005..06e6047032 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -504,7 +504,7 @@ static const AVClass wav_muxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_wav_muxer = { +const AVOutputFormat ff_wav_muxer = { .name = "wav", .long_name = NULL_IF_CONFIG_SMALL("WAV / WAVE (Waveform Audio)"), .mime_type = "audio/x-wav", @@ -603,7 +603,7 @@ static int w64_write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_w64_muxer = { +const AVOutputFormat ff_w64_muxer = { .name = "w64", .long_name = NULL_IF_CONFIG_SMALL("Sony Wave64"), .extensions = "w64", diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c index cd69931a42..dfb2462072 100644 --- a/libavformat/wc3movie.c +++ b/libavformat/wc3movie.c @@ -309,7 +309,7 @@ static int wc3_read_packet(AVFormatContext *s, return ret; } -AVInputFormat ff_wc3_demuxer = { +const AVInputFormat ff_wc3_demuxer = { .name = "wc3movie", .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III movie"), .priv_data_size = sizeof(Wc3DemuxContext), diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index fefab982cb..f4d0db83a4 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -289,7 +289,7 @@ static const AVClass webm_chunk_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_webm_chunk_muxer = { +const AVOutputFormat ff_webm_chunk_muxer = { .name = "webm_chunk", .long_name = NULL_IF_CONFIG_SMALL("WebM Chunk Muxer"), .mime_type = "video/webm", diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c index 1304c1a8c3..6f9622af5f 100644 --- a/libavformat/webmdashenc.c +++ b/libavformat/webmdashenc.c @@ -537,7 +537,7 @@ static const AVClass webm_dash_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVOutputFormat ff_webm_dash_manifest_muxer = { +const AVOutputFormat ff_webm_dash_manifest_muxer = { .name = "webm_dash_manifest", .long_name = NULL_IF_CONFIG_SMALL("WebM DASH Manifest"), .mime_type = "application/xml", diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c index ca4ffc4e2d..9599fe7b85 100644 --- a/libavformat/webpenc.c +++ b/libavformat/webpenc.c @@ -212,7 +212,7 @@ static const AVClass webp_muxer_class = { .version = LIBAVUTIL_VERSION_INT, .option = options, }; -AVOutputFormat ff_webp_muxer = { +const AVOutputFormat ff_webp_muxer = { .name = "webp", .long_name = NULL_IF_CONFIG_SMALL("WebP"), .extensions = "webp", diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c index cf060bd011..a4654034ac 100644 --- a/libavformat/webvttdec.c +++ b/libavformat/webvttdec.c @@ -210,7 +210,7 @@ static const AVClass webvtt_demuxer_class = { .version = LIBAVUTIL_VERSION_INT, }; -AVInputFormat ff_webvtt_demuxer = { +const AVInputFormat ff_webvtt_demuxer = { .name = "webvtt", .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), .priv_data_size = sizeof(WebVTTContext), diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c index 95f58e2942..fcff80c4bf 100644 --- a/libavformat/webvttenc.c +++ b/libavformat/webvttenc.c @@ -102,7 +102,7 @@ static int webvtt_write_packet(AVFormatContext *ctx, AVPacket *pkt) return 0; } -AVOutputFormat ff_webvtt_muxer = { +const AVOutputFormat ff_webvtt_muxer = { .name = "webvtt", .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), .extensions = "vtt", diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c index 9e3d80752b..ff51e8bd36 100644 --- a/libavformat/westwood_aud.c +++ b/libavformat/westwood_aud.c @@ -178,7 +178,7 @@ static int wsaud_read_packet(AVFormatContext *s, return ret; } -AVInputFormat ff_wsaud_demuxer = { +const AVInputFormat ff_wsaud_demuxer = { .name = "wsaud", .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios audio"), .read_probe = wsaud_probe, diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c index a0db854b1c..77df007c11 100644 --- a/libavformat/westwood_vqa.c +++ b/libavformat/westwood_vqa.c @@ -260,7 +260,7 @@ static int wsvqa_read_packet(AVFormatContext *s, return ret; } -AVInputFormat ff_wsvqa_demuxer = { +const AVInputFormat ff_wsvqa_demuxer = { .name = "wsvqa", .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA"), .priv_data_size = sizeof(WsVqaDemuxContext), diff --git a/libavformat/wsddec.c b/libavformat/wsddec.c index 74db6acdab..169a96c71f 100644 --- a/libavformat/wsddec.c +++ b/libavformat/wsddec.c @@ -162,7 +162,7 @@ static int wsd_read_header(AVFormatContext *s) } FF_RAW_DEMUXER_CLASS(wsd) -AVInputFormat ff_wsd_demuxer = { +const AVInputFormat ff_wsd_demuxer = { .name = "wsd", .long_name = NULL_IF_CONFIG_SMALL("Wideband Single-bit Data (WSD)"), .read_probe = wsd_probe, diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 44ca86d517..1d021dfda7 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -1124,7 +1124,7 @@ static int read_close(AVFormatContext *s) return 0; } -AVInputFormat ff_wtv_demuxer = { +const AVInputFormat ff_wtv_demuxer = { .name = "wtv", .long_name = NULL_IF_CONFIG_SMALL("Windows Television (WTV)"), .priv_data_size = sizeof(WtvContext), diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c index 24fdbe1099..9c67a6d3e8 100644 --- a/libavformat/wtvenc.c +++ b/libavformat/wtvenc.c @@ -829,7 +829,7 @@ static int write_trailer(AVFormatContext *s) return 0; } -AVOutputFormat ff_wtv_muxer = { +const AVOutputFormat ff_wtv_muxer = { .name = "wtv", .long_name = NULL_IF_CONFIG_SMALL("Windows Television (WTV)"), .extensions = "wtv", diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c index 7a5997c1ee..0d5a86953d 100644 --- a/libavformat/wvdec.c +++ b/libavformat/wvdec.c @@ -329,7 +329,7 @@ static int wv_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -AVInputFormat ff_wv_demuxer = { +const AVInputFormat ff_wv_demuxer = { .name = "wv", .long_name = NULL_IF_CONFIG_SMALL("WavPack"), .priv_data_size = sizeof(WVContext), diff --git a/libavformat/wvedec.c b/libavformat/wvedec.c index 4d9d3e5209..f133da3c87 100644 --- a/libavformat/wvedec.c +++ b/libavformat/wvedec.c @@ -52,7 +52,7 @@ static int wve_read_header(AVFormatContext *s) return 0; } -AVInputFormat ff_wve_demuxer = { +const AVInputFormat ff_wve_demuxer = { .name = "wve", .long_name = NULL_IF_CONFIG_SMALL("Psion 3 audio"), .read_probe = wve_probe, diff --git a/libavformat/wvenc.c b/libavformat/wvenc.c index 8743739e8d..9a42f71440 100644 --- a/libavformat/wvenc.c +++ b/libavformat/wvenc.c @@ -76,7 +76,7 @@ static av_cold int wv_write_trailer(AVFormatContext *ctx) return 0; } -AVOutputFormat ff_wv_muxer = { +const AVOutputFormat ff_wv_muxer = { .name = "wv", .long_name = NULL_IF_CONFIG_SMALL("raw WavPack"), .mime_type = "audio/x-wavpack", diff --git a/libavformat/xa.c b/libavformat/xa.c index a07271b313..762e90246a 100644 --- a/libavformat/xa.c +++ b/libavformat/xa.c @@ -121,7 +121,7 @@ static int xa_read_packet(AVFormatContext *s, return ret; } -AVInputFormat ff_xa_demuxer = { +const AVInputFormat ff_xa_demuxer = { .name = "xa", .long_name = NULL_IF_CONFIG_SMALL("Maxis XA"), .priv_data_size = sizeof(MaxisXADemuxContext), diff --git a/libavformat/xmv.c b/libavformat/xmv.c index 0c69d267de..36816ec005 100644 --- a/libavformat/xmv.c +++ b/libavformat/xmv.c @@ -583,7 +583,7 @@ static int xmv_read_packet(AVFormatContext *s, return 0; } -AVInputFormat ff_xmv_demuxer = { +const AVInputFormat ff_xmv_demuxer = { .name = "xmv", .long_name = NULL_IF_CONFIG_SMALL("Microsoft XMV"), .extensions = "xmv", diff --git a/libavformat/xvag.c b/libavformat/xvag.c index e95d84aa3f..55bc25227e 100644 --- a/libavformat/xvag.c +++ b/libavformat/xvag.c @@ -103,7 +103,7 @@ static int xvag_read_packet(AVFormatContext *s, AVPacket *pkt) return av_get_packet(s->pb, pkt, par->block_align); } -AVInputFormat ff_xvag_demuxer = { +const AVInputFormat ff_xvag_demuxer = { .name = "xvag", .long_name = NULL_IF_CONFIG_SMALL("Sony PS3 XVAG"), .read_probe = xvag_probe, diff --git a/libavformat/xwma.c b/libavformat/xwma.c index aedadcf140..9c9b02e515 100644 --- a/libavformat/xwma.c +++ b/libavformat/xwma.c @@ -313,7 +313,7 @@ static int xwma_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } -AVInputFormat ff_xwma_demuxer = { +const AVInputFormat ff_xwma_demuxer = { .name = "xwma", .long_name = NULL_IF_CONFIG_SMALL("Microsoft xWMA"), .priv_data_size = sizeof(XWMAContext), diff --git a/libavformat/yop.c b/libavformat/yop.c index 0d8d9f2ff7..8ecdc654a9 100644 --- a/libavformat/yop.c +++ b/libavformat/yop.c @@ -204,7 +204,7 @@ static int yop_read_seek(AVFormatContext *s, int stream_index, return 0; } -AVInputFormat ff_yop_demuxer = { +const AVInputFormat ff_yop_demuxer = { .name = "yop", .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP"), .priv_data_size = sizeof(YopDecContext), diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c index 980de7d145..146533c4cc 100644 --- a/libavformat/yuv4mpegdec.c +++ b/libavformat/yuv4mpegdec.c @@ -345,7 +345,7 @@ static int yuv4_probe(const AVProbeData *pd) return 0; } -AVInputFormat ff_yuv4mpegpipe_demuxer = { +const AVInputFormat ff_yuv4mpegpipe_demuxer = { .name = "yuv4mpegpipe", .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe"), .read_probe = yuv4_probe, diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c index f21f2dce92..aff066f1c5 100644 --- a/libavformat/yuv4mpegenc.c +++ b/libavformat/yuv4mpegenc.c @@ -328,7 +328,7 @@ static int yuv4_init(AVFormatContext *s) return 0; } -AVOutputFormat ff_yuv4mpegpipe_muxer = { +const AVOutputFormat ff_yuv4mpegpipe_muxer = { .name = "yuv4mpegpipe", .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe"), .extensions = "y4m",