From patchwork Fri Feb 26 13:18:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26009 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7AF6544A6E6 for ; Fri, 26 Feb 2021 15:18:19 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5619568AA24; Fri, 26 Feb 2021 15:18:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B91DB68A6EA for ; Fri, 26 Feb 2021 15:18:13 +0200 (EET) Received: by mail-ej1-f45.google.com with SMTP id u20so14786283ejb.7 for ; Fri, 26 Feb 2021 05:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; bh=ceXLnxDMEOSjf6+7qtue07QTK+3FTkoFLvDWm6acyzc=; b=HFl+Wjrnl8hbVmG85ZEm29G5QQN79kIfFxgrXjPxYxPG19H4oo6aUPAtEvAOLqhtK1 xORN1b12272XoPpmM2UGvcRSiOMu6hMAdPlAm3/Sco5iYfObBXr2Pqm9kE82BX3yiGuG Gqgoi0y5hopzau62XCg2YvtRGdjiq8EuDNmj3gGdTlTmkgPyZtJASVN8NkOQhqQjJvo8 WLcMoZqj68DXO5E91V5RCpnOmA9MdMkubf0jOgHUmiY4qrtUuTdMgm+bzRB9MxaPFRHQ lmFc4EXVcHaf4WHgr/akLh002ezKMLXAEe4ehRmov0nT//IqANyjpZt9Iqz50jHiYUje 7Byg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=ceXLnxDMEOSjf6+7qtue07QTK+3FTkoFLvDWm6acyzc=; b=kODRiCzzB/QDalSC9aeN7CBkE1b6wSUL0dAK03EG2x6wAxyFusKoMiyImMoiwyUbpJ zLH3w2sn2J6xQbzEzaryQpOMmUIVEKjuKSllVqH2enDFWnlRDRlYUzYCch1mo2DwKQ62 4/Zy/xc4sF/7RPOM0BU0GmxtL45mWKopHL88XnIKme5zzTHOgHLjCRChxVdLjtOMIAK7 jDrYE75xHOfozhlhxfASnZYPuqwfffRzcjLISrMbi05eqaQLP1j0sz2KUsh8XHJjfcH4 ncHjIAcK7SzchA09ud5JI7vAMmwz8A0pThx4Ebe1sX6Zqwpei6C0TREiutl0eX+25H43 YbyA== X-Gm-Message-State: AOAM531zb8/KoSUVtil4HvAx1Yo+zfDba0malvczR6gkHET3Ubf9HVgk TeQM4MsjmkD5YLqFVAnA7bAd8pUmaOA= X-Google-Smtp-Source: ABdhPJzVuGecgNBAgj1s5R8FA2enikgG8CbrXiAvkGVDvMwjpJ1EUbW9XfqDcmfdT1nXaH5G1u3rJg== X-Received: by 2002:a17:906:2e91:: with SMTP id o17mr3277097eji.488.1614345493003; Fri, 26 Feb 2021 05:18:13 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id ca26sm5867480edb.4.2021.02.26.05.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 05:18:12 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Feb 2021 14:18:02 +0100 Message-Id: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] fftools/ffmpeg_filter: Don't use deprecated function X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" avcodec_find_best_pix_fmt_of_2 has been moved to libavutil in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 9218394f4a..4ab769c07b 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -74,7 +74,7 @@ static enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx p = get_compliance_unofficial_pix_fmts(enc_ctx->codec_id, p); } for (; *p != AV_PIX_FMT_NONE; p++) { - best= avcodec_find_best_pix_fmt_of_2(best, *p, target, has_alpha, NULL); + best = av_find_best_pix_fmt_of_2(best, *p, target, has_alpha, NULL); if (*p == target) break; } From patchwork Fri Feb 26 13:18:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26010 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id AFCA044A6E6 for ; Fri, 26 Feb 2021 15:18:37 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 93FA368AA64; Fri, 26 Feb 2021 15:18:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8AB8A68AA53 for ; Fri, 26 Feb 2021 15:18:31 +0200 (EET) Received: by mail-ej1-f54.google.com with SMTP id w1so14777548ejf.11 for ; Fri, 26 Feb 2021 05:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=JI1EnQYiqAukO9y32saRvDkRsrrjRNJFnqf8stM84fM=; b=GLf4LP09Y/vDbjtNU5INvHAxJSGmMzrEhyDsNA3qHhUfgRGiiEOvYspavTYlKQHYRz pJCAqJHtao4sPLl9GMp11IC0LrTsRvVGCNv4Qh95JUZ95cbHftp05Qu1+gUhH1ja/ryt keAWJpg+sIYBoFEeEQAPqEEpEhh7qTA6+DpyrzJhsFG6MD4yl/TYE/bZQQNluNvkXHiz RqvgDTGQkz6r6qt1WPELodTRyL40LUzfVOJedRCKRuj8L7a5izANm9+6Xfb0WPjPS1kl y9mequyipwCo9Yb4tiPZS3AiaW6n/+yHQs2/bJlbp/vEw2S+j50ZVSUsWbDnFGfNgrxc bHZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=JI1EnQYiqAukO9y32saRvDkRsrrjRNJFnqf8stM84fM=; b=MMa8JctfsC+XZ+NAXxE/1Me+q3Z3Vg5F1FaNNTzUtDGMUHteTPIULfre5Esn2aEA3I oNfQGzcWHS6Y3928NoXVrB47aZybrADnW/Uyga0AhbNGA+yJFrqN2OZ3lo4EUwQQiC5b RbWnqJTIzj8bU386kY2iB1suITkgKJ6BK83R3izAlyP0X6wLVGCdX9qQb43OpnSM9UID LQzimliuZ/nuTMyzXJnlmQHgyr78MIY5sVzkXfbhItX1VZ9a5oyh/PzbeJKEkQTD+ABX lXhvrhoaRHe8dwY0/wVP+XmBylY1Zm/FHSifK07YuNQWPf3BuYzG2J2cJP3hxrIG70wL xzLA== X-Gm-Message-State: AOAM53051+N3KEweMCH99DFFWM0MEuH4u4ObY5bJ4UijoY49pSyS+6SB tLj8G97PzA4BvWAaFztFIkAZDLBcOIs= X-Google-Smtp-Source: ABdhPJwAurzlpAyEl7VuIZhZQsOca4BL3sXisQwI7lAUlGVl5hATbzpzZXx787MmD3z7pdzWLtHaqg== X-Received: by 2002:a17:906:1457:: with SMTP id q23mr3350190ejc.43.1614345510874; Fri, 26 Feb 2021 05:18:30 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id ca26sm5867480edb.4.2021.02.26.05.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 05:18:30 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Feb 2021 14:18:03 +0100 Message-Id: <20210226131806.1990485-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> References: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/5] avcodec: Add missing FF_API define for libavcodec pix fmt API X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" avcodec_find_best_pix_fmt2 has been deprecated and replaced by avcodec_find_best_pix_fmt_of_2 in 2a54ae9df8cbc1717b3929222ac75f384e2ff240. avcodec_find_best_pix_fmt_of_2 and avcodec_get_pix_fmt_loss meanwhile were deprecated in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54 when these functions were de facto moved to libavutil; this has been mentioned in APIchanges in f7a1c5e4d2294a8970ede7f6deb2fe0a64e202a5. Yet the attribute_deprecated was never set for the latter two functions and they were not wrapped in an FF_API define. This commit does this. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 15 +++++++++------ libavcodec/imgconvert.c | 6 ++++-- libavcodec/version.h | 3 +++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3d77d2f6fd..3178c163b9 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3786,12 +3786,6 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int */ unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt); -/** - * @deprecated see av_get_pix_fmt_loss() - */ -int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, - int has_alpha); - /** * Find the best pixel format to convert to given a certain source pixel * format. When converting from one pixel format to another, information loss @@ -3813,15 +3807,24 @@ 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 1fd636c83d..8de1563404 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -44,6 +44,7 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int } #endif +#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) @@ -60,9 +61,10 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt 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 avcodec_find_best_pix_fmt_of_2(dst_pix_fmt1, dst_pix_fmt2, src_pix_fmt, has_alpha, 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){ @@ -73,7 +75,7 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *p for (i=0; pix_fmt_list[i] != AV_PIX_FMT_NONE; i++) { loss = loss_ptr ? *loss_ptr : 0; - best = avcodec_find_best_pix_fmt_of_2(best, pix_fmt_list[i], src_pix_fmt, has_alpha, &loss); + best = av_find_best_pix_fmt_of_2(best, pix_fmt_list[i], src_pix_fmt, has_alpha, &loss); } if (loss_ptr) diff --git a/libavcodec/version.h b/libavcodec/version.h index e5a5ec8abc..516411b4b2 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -144,6 +144,9 @@ #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_THREAD_SAFE_CALLBACKS #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) #endif From patchwork Fri Feb 26 13:18: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: 26013 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C6EF944B1FF for ; Fri, 26 Feb 2021 15:27:02 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 87B9368AA82; Fri, 26 Feb 2021 15:27:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A28D68A9FC for ; Fri, 26 Feb 2021 15:26:56 +0200 (EET) Received: by mail-wr1-f51.google.com with SMTP id d11so8574884wrj.7 for ; Fri, 26 Feb 2021 05:26:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=Q7xw2VgwqFiGrNctlZA5f0qphnJUtd+8Sh4iaNVj/Ps=; b=DZm5nnx0joiMAudf/lLsiZDoe/+l/Usfc0IC4lVpFPjiZHuCnKSZ1I6JRrSI2DZM8w q5d2O8Dqq5I0wqxA7R2ua67OAXUXiDQW4kb4jmFixtdEB/oX7TJYt7+A77eKx+SNbz18 hC9wK9ESWcu3+RMn0C1YSWv8vtQuCuEldp5lMI+axbDlIR7sRUGz+JEPJEVtJFumA3T9 Ze38qrTDgn4qF+TKJttuGkXX3/nO5Rd7P4KRnOjqVn2z06b/zs4lpj8GwRq5eb7CBi/j WEWnD9tDMfOs+WoeNzVrI6QcHPJzK4FrVgoaSAy8zWs/+3b+/98xYrPk6/EPXD9CGwcq EXuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=Q7xw2VgwqFiGrNctlZA5f0qphnJUtd+8Sh4iaNVj/Ps=; b=QhegWyuliKLNFwvox8+2jXpg1cUVF2AIOyJZ5eplvooBjtTuFfC/p/FCGhYyWvpu8t wt4zUcZ6IbH5CDwPV+ld5FZ7/sc5n/TMhJbgnUEYoDm26KQpbB1j+eBHua4SCqFvjdhg Z/r7qOdpwC1njAml8CcIE7vAC/t2kVvirI752fPoMYNz73DWPWTFa9uEqf/dMQLiMeH8 4kuLtxZGIx1Pxu5k5le2ukKtZCFCtUiXSyMme6vFCFowv62KCP/oD/AUPFF8ma5Hz0IZ qKdebTLln/Fn5DXCs0XkYKFsAnl5tFdsfHKFT2sGoG9nBNEKQ5tA0/41QsEViynp5TGj A0/A== X-Gm-Message-State: AOAM532BmVrI4NWP9+8ePG0JlB4x3XIsqTppjPeB3lDfXvBLQaA8IXGC 8+nANB3ZkbjWt3VyEgidBnmMhkli8BY= X-Google-Smtp-Source: ABdhPJx9dbmUOPo/4AC+o2xG+vl+9GE8fvf0jy0BosgF0S7d/CobtcuhdwcCCZZrGy2/Rzusnp8N0g== X-Received: by 2002:a05:6402:50ce:: with SMTP id h14mr3285656edb.283.1614345511555; Fri, 26 Feb 2021 05:18:31 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id ca26sm5867480edb.4.2021.02.26.05.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 05:18:31 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Feb 2021 14:18:04 +0100 Message-Id: <20210226131806.1990485-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> References: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/5] avcodec/mpegvideo: Schedule unused, deprecated rc_strategy for removal X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Deprecated in d05c3b9ceeb9d00d4500c376448230e45f6ab108. Signed-off-by: Andreas Rheinhardt --- Here is my current WIP branch for the bump for anyone who is interested: https://github.com/mkver/FFmpeg/commits/bump libavcodec/mpegvideo.h | 14 +++++++++++--- libavcodec/version.h | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 5f6e1da133..5a99c19656 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -369,7 +369,9 @@ 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 @@ -615,6 +617,14 @@ 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, \ @@ -648,9 +658,6 @@ FF_MPV_OPT_CMP_FUNC, \ {"lmax", "maximum Lagrange factor (VBR)", FF_MPV_OFFSET(lmax), AV_OPT_TYPE_INT, {.i64 = 31*FF_QP2LAMBDA }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, \ {"ibias", "intra quant bias", FF_MPV_OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ {"pbias", "inter quant bias", FF_MPV_OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ -{"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" }, \ {"motion_est", "motion estimation algorithm", FF_MPV_OFFSET(motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_XONE, FF_MPV_OPT_FLAGS, "motion_est" }, \ { "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \ { "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \ @@ -671,6 +678,7 @@ FF_MPV_OPT_CMP_FUNC, \ {"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 }, \ {"a53cc", "Use A53 Closed Captions (if available)", FF_MPV_OFFSET(a53_cc), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FF_MPV_OPT_FLAGS }, \ +FF_MPV_RC_STRATEGY_OPTS extern const AVOption ff_mpv_generic_options[]; diff --git a/libavcodec/version.h b/libavcodec/version.h index 516411b4b2..488def4c23 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -147,6 +147,9 @@ #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 #ifndef FF_API_THREAD_SAFE_CALLBACKS #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) #endif From patchwork Fri Feb 26 13:18: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: 26011 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C395144A6E6 for ; Fri, 26 Feb 2021 15:18:39 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AF50268AA8E; Fri, 26 Feb 2021 15:18:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1913968AA83 for ; Fri, 26 Feb 2021 15:18:33 +0200 (EET) Received: by mail-ej1-f50.google.com with SMTP id jt13so14821267ejb.0 for ; Fri, 26 Feb 2021 05:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=98pCxjJC3PcDlfnpvOmX2SZ6ybP4Wf4B77SO4SComDw=; b=YsbweaLZRqhwiOEM4gOrNQcS5RcGSdl/O+UumSEUhRfITZtFOWbWZ0fvhWhz/7vCGE YM2+TCDFWxE1Bj77tg8Pbnld6zDHhihYr0RpGqVavRR3emZN42oYOX0iF1Netx0w2tQl oN5zCMMeOVz4DEvZr+AYI8gKxffTuPEL4aL0SlIUEyfGD4TvOceq3FHkoXdqaAUzor+B S3x8Z9u0bZVc1dLNUNSzTD2MUA1bABish9nFTx0NdgTIFiE88bTH9bGZTOAIEGp2ajJN 3RLYys7NuaC57GybViKriJPBdyC3jnpir1drKvaXWfAazpS/eFIjPpZqTu+hbWzzUSYc ohAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=98pCxjJC3PcDlfnpvOmX2SZ6ybP4Wf4B77SO4SComDw=; b=VBox8fYEAE+1p1EV0BVjnEN7+aqjnb9olCYAPstic0F0he+umAxyqz662mC4ps8R8u s0imR0OHft19nd/sFAhK9NtATZtm5JE8cqZK0TW0gOnLrYvBDvXj/yXuXibna0OltUQc ELIq5pHTBDEJc1SRF9GKViYHIjclFSQE6lEGkoD94xyazLxG5Y8Orxe7035tTm0OPI0Q 1BRWQ2cosfNNI8ghO6YKSRHImdUPWAY2cUewIzYMThMR+b5M/Tax4+wbnLUh9DdnY8gH 8J0vqefci9Xgfng9CTy+wHY1oEqKD+/gqR/1Y65+AW+f7nADSMMoj21nNX/dW5Q31QzZ 2iqQ== X-Gm-Message-State: AOAM531s4HfV8YFWHzdhYRC0k0YG1DKBGU7I4jhaer2GcWdlZyyWVGep +VcjY9BC1M4cwRwPfFRjir6llygnPHg= X-Google-Smtp-Source: ABdhPJypqbxtGJ7xBYmGGcjcqlU/37Tr46QxdISeEUL/uPHygS/aABJ0JgijY9XJHXNOAoWAhrBWAA== X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr3284965ejw.47.1614345512328; Fri, 26 Feb 2021 05:18:32 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id ca26sm5867480edb.4.2021.02.26.05.18.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 05:18:32 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Feb 2021 14:18:05 +0100 Message-Id: <20210226131806.1990485-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> References: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/5] avcodec/parser: Schedule av_parser_change for removal X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Originally deprecated in 748c2fca7e4d99357c234936aa71212a6282be36, publically deprecated in 9a07c1332cfe092b57b5758f22b686ca58806c60 (merged into FFmpeg in 1885ffb03d0af28e6bac2bcc8725fa15b93f6ac9). Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 6 +++++- libavcodec/parser.c | 3 ++- libavcodec/version.h | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3178c163b9..a8741df04b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3576,14 +3576,18 @@ 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 AVBitStreamFilter + * @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 a63f532c48..f4bc00da7d 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -186,6 +186,7 @@ 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) @@ -220,7 +221,7 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, return 0; } - +#endif void av_parser_close(AVCodecParserContext *s) { if (s) { diff --git a/libavcodec/version.h b/libavcodec/version.h index 488def4c23..815df15628 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -150,6 +150,9 @@ #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 #ifndef FF_API_THREAD_SAFE_CALLBACKS #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) #endif From patchwork Fri Feb 26 13:18: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: 26012 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id B717044A6E6 for ; Fri, 26 Feb 2021 15:18:41 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A054D68AA4D; Fri, 26 Feb 2021 15:18:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 052D268AA4A for ; Fri, 26 Feb 2021 15:18:34 +0200 (EET) Received: by mail-ej1-f50.google.com with SMTP id g5so14784915ejt.2 for ; Fri, 26 Feb 2021 05:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=5qW3uG002OlgpF8+eHBfG5I5ke6Jn72SVtT0FYhlY9I=; b=T5LaY4wBUX63F65ftjrZeGURkC2ZPfqwBiVF9+U4c7QCaFQfQXlnstOZNYM/SC6/GU 8vF95fD+kQ149ybBVaqyQhODCl2Qhhxq8nb9k9/LlEYqDaxoSiO6312zVgsqpUXil9tV SelAVSKCaDJSuaUgz3pfngeecvgVqyPZvoU5+R6ilyJlPM05+p9qvdBahBgFEE+4IE6c HTN1PbF1FZL72Tku48IRulKggAG2yEpWBp9x24qOkTMBgw52aDdeWi7U+tBprlGpU9ZI 8CI37aWFigiDq2MdJj3jRxxc/6DNrf+7z7JASYWi/isiJ9HtwSiFpXLBN/G4hpRy03xJ Kq5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=5qW3uG002OlgpF8+eHBfG5I5ke6Jn72SVtT0FYhlY9I=; b=aKm4zAd1Mc2oM4DXep+Slc7VoCjDZUFXQHSuRHI85OQ9fBkRaEABZCNgFqLMEoN5CF 22zxbiG2uaBxq8tKhXAmNYmg+OZs8DAgXyl6hU9vu+mpE56o0msaMRw5lmWqmKBjyOqn c2QYjV4UgHqpjBktoHWWDtv98olYlyAOvfjWCAg9ELQnpX2jwULrK8sbD2Y9pboJEFGd KqdllxiXqd+sW3lNVXd7aL55KRxwBJT7lt7gPHMnfqUVoOIbx9iGXHb4sTyyZBrg0h0y ndpdL6/Q6nbEIDrXr8w54/yWj5nPaXGi7SVREl+UcHyKmVrimOWwnWRe0yBwHcxf6gD8 a80A== X-Gm-Message-State: AOAM533WGlBzJ8dfhZWonm2U5/LQ71crV0BnSqtmRdvRhbLFXy+WVb9Y lbqsjVXqieO24jxFsWoqeDLxUsGLiLw= X-Google-Smtp-Source: ABdhPJweiHz0L5AkSDYXuGqSgx6YDZnJFN/9tvi6AVD6+0ABqPB9efK8PN2kgwpFRWzR8PBLDmPvIw== X-Received: by 2002:a17:906:4f8a:: with SMTP id o10mr3355151eju.484.1614345513215; Fri, 26 Feb 2021 05:18:33 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id ca26sm5867480edb.4.2021.02.26.05.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 05:18:32 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Feb 2021 14:18:06 +0100 Message-Id: <20210226131806.1990485-5-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> References: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/5] doc/codecs.texi: Remove removed or ineffective options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Signed-off-by: Andreas Rheinhardt --- Is it possible that Libav didn't use codecs.texi and that the committers forgot to update it when Libav merges removed some of these options? doc/codecs.texi | 122 +----------------------------------------------- 1 file changed, 1 insertion(+), 121 deletions(-) diff --git a/doc/codecs.texi b/doc/codecs.texi index 073fb4ece2..9add7629cf 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -50,8 +50,6 @@ Use internal 2pass ratecontrol in first pass mode. Use internal 2pass ratecontrol in second pass mode. @item gray Only decode/encode grayscale. -@item emu_edge -Do not draw edges. @item psnr Set error[?] variables during encoding. @item truncated @@ -72,10 +70,6 @@ This ensures that file and data checksums are reproducible and match between platforms. Its primary use is for regression testing. @item aic Apply H263 advanced intra coding / mpeg4 ac prediction. -@item cbp -Deprecated, use mpegvideo private options instead. -@item qprd -Deprecated, use mpegvideo private options instead. @item ilme Apply interlaced motion estimation. @item cgop @@ -84,40 +78,6 @@ Use closed gop. Output even potentially corrupted frames. @end table -@item me_method @var{integer} (@emph{encoding,video}) -Set motion estimation method. - -Possible values: -@table @samp -@item zero -zero motion estimation (fastest) -@item full -full motion estimation (slowest) -@item epzs -EPZS motion estimation (default) -@item esa -esa motion estimation (alias for full) -@item tesa -tesa motion estimation -@item dia -dia motion estimation (alias for epzs) -@item log -log motion estimation -@item phods -phods motion estimation -@item x1 -X1 motion estimation -@item hex -hex motion estimation -@item umh -umh motion estimation -@item iter -iter motion estimation -@end table - -@item extradata_size @var{integer} -Set extradata size. - @item time_base @var{rational number} Set codec time base. @@ -184,9 +144,6 @@ Default value is 0. @item b_qfactor @var{float} (@emph{encoding,video}) Set qp factor between P and B frames. -@item rc_strategy @var{integer} (@emph{encoding,video}) -Set ratecontrol method. - @item b_strategy @var{integer} (@emph{encoding,video}) Set strategy to choose between I/P/B-frames. @@ -210,8 +167,6 @@ Possible values: @table @samp @item autodetect -@item old_msmpeg4 -some old lavc generated msmpeg4v3 files (no autodetection) @item xvid_ilace Xvid interlacing bug (autodetected if fourcc==XVIX) @item ump4 @@ -220,8 +175,6 @@ Xvid interlacing bug (autodetected if fourcc==XVIX) padding bug (autodetected) @item amv -@item ac_vlc -illegal vlc bug (autodetected per fourcc) @item qpel_chroma @item std_qpel @@ -242,14 +195,6 @@ Workaround various bugs in microsoft broken decoders. trancated frames @end table -@item lelim @var{integer} (@emph{encoding,video}) -Set single coefficient elimination threshold for luminance (negative -values also consider DC coefficient). - -@item celim @var{integer} (@emph{encoding,video}) -Set single coefficient elimination threshold for chrominance (negative -values also consider dc coefficient) - @item strict @var{integer} (@emph{decoding/encoding,audio,video}) Specify how strictly to follow the standards. @@ -306,26 +251,8 @@ consider things that a sane encoder should not do as an error @item mpeg_quant @var{integer} (@emph{encoding,video}) Use MPEG quantizers instead of H.263. -@item qsquish @var{float} (@emph{encoding,video}) -How to keep quantizer between qmin and qmax (0 = clip, 1 = use -differentiable function). - -@item rc_qmod_amp @var{float} (@emph{encoding,video}) -Set experimental quantizer modulation. - -@item rc_qmod_freq @var{integer} (@emph{encoding,video}) -Set experimental quantizer modulation. - @item rc_override_count @var{integer} -@item rc_eq @var{string} (@emph{encoding,video}) -Set rate control equation. When computing the expression, besides the -standard functions defined in the section 'Expression Evaluation', the -following functions are available: bits2qp(bits), qp2bits(qp). Also -the following constants are available: iTex pTex tex mv fCode iCount -mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex -avgTex. - @item maxrate @var{integer} (@emph{encoding,audio,video}) Set max bitrate tolerance (in bits/s). Requires bufsize to be set. @@ -336,18 +263,12 @@ encode. It is of little use elsewise. @item bufsize @var{integer} (@emph{encoding,audio,video}) Set ratecontrol buffer size (in bits). -@item rc_buf_aggressivity @var{float} (@emph{encoding,video}) -Currently useless. - @item i_qfactor @var{float} (@emph{encoding,video}) Set QP factor between P and I frames. @item i_qoffset @var{float} (@emph{encoding,video}) Set QP offset between P and I frames. -@item rc_init_cplx @var{float} (@emph{encoding,video}) -Set initial complexity for 1-pass encoding. - @item dct @var{integer} (@emph{encoding,video}) Set DCT algorithm. @@ -412,11 +333,7 @@ Automatically pick a IDCT compatible with the simple one @item simpleneon -@item simplealpha - -@item ipp - -@item xvidmmx +@item xvid @item faani floating point AAN IDCT @@ -714,19 +631,9 @@ Set diamond type & size for motion estimation pre-pass. @item subq @var{integer} (@emph{encoding,video}) Set sub pel motion estimation quality. -@item dtg_active_format @var{integer} - @item me_range @var{integer} (@emph{encoding,video}) Set limit motion vectors range (1023 for DivX player). -@item ibias @var{integer} (@emph{encoding,video}) -Set intra quant bias. - -@item pbias @var{integer} (@emph{encoding,video}) -Set inter quant bias. - -@item color_table_id @var{integer} - @item global_quality @var{integer} (@emph{encoding,audio,video}) @item coder @var{integer} (@emph{encoding,video}) @@ -741,8 +648,6 @@ arithmetic coder raw (no encoding) @item rle run-length coder -@item deflate -deflate-based coder @end table @item context @var{integer} (@emph{encoding,video}) @@ -763,17 +668,9 @@ use fewest bits use best rate distortion @end table -@item stream_codec_tag @var{integer} - @item sc_threshold @var{integer} (@emph{encoding,video}) Set scene change threshold. -@item lmin @var{integer} (@emph{encoding,video}) -Set min lagrange factor (VBR). - -@item lmax @var{integer} (@emph{encoding,video}) -Set max lagrange factor (VBR). - @item nr @var{integer} (@emph{encoding,video}) Set noise reduction. @@ -824,11 +721,6 @@ Export film grain parameters through frame side data (see @code{AV_FRAME_DATA_FI Supported at present by AV1 decoders. @end table -@item error @var{integer} (@emph{encoding,video}) - -@item qns @var{integer} (@emph{encoding,video}) -Deprecated, use mpegvideo private options instead. - @item threads @var{integer} (@emph{decoding/encoding,video}) Set the number of threads to be used, in case the selected codec implementation supports multi-threading. @@ -841,12 +733,6 @@ automatically select the number of threads to set Default value is @samp{auto}. -@item me_threshold @var{integer} (@emph{encoding,video}) -Set motion estimation threshold. - -@item mb_threshold @var{integer} (@emph{encoding,video}) -Set macroblock threshold. - @item dc @var{integer} (@emph{encoding,video}) Set intra_dc_precision. @@ -924,9 +810,6 @@ noise preserving sum of squared differences @end table -@item border_mask @var{float} (@emph{encoding,video}) -Increase the quantizer for macroblocks close to borders. - @item mblmin @var{integer} (@emph{encoding,video}) Set min macroblock lagrange factor (VBR). @@ -1000,9 +883,6 @@ Adjust sensitivity of b_frame_strategy 1. @item timecode_frame_start @var{integer} (@emph{encoding,video}) Set GOP timecode frame start number, in non drop frame format. -@item request_channels @var{integer} (@emph{decoding,audio}) -Set desired number of audio channels. - @item bits_per_raw_sample @var{integer} @item channel_layout @var{integer} (@emph{decoding/encoding,audio}) From patchwork Fri Feb 26 17:18:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26014 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 51CE344B899 for ; Fri, 26 Feb 2021 19:18:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0C83B68AA53; Fri, 26 Feb 2021 19:18:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C6282680901 for ; Fri, 26 Feb 2021 19:18:15 +0200 (EET) Received: by mail-wm1-f41.google.com with SMTP id u187so6089349wmg.4 for ; Fri, 26 Feb 2021 09:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=t23AE0KyNBSHELQHy+a2shxrn1ogUEEgZRsr7xkziaU=; b=k9i2zEFBztS+li7SlO8XQG1KIa214fw3sbh3JIOvgPdd9B37hqhdLzdkZ83AZy5pyN PIQ28qfTtN6h0t1jIBjd4Kg9+x7xOURbJDJuaKES99Kvp0zTow2rk0CMo8tOj705M5z+ FQmc5RvGcIBFwMMZx3DHjIi8JOo37ytWsnJPNKFVjdIj0dEfvNAjVPxhXfHtOwNEGAv1 KaBI4pFn7Ob3tk7KY+uvldw/LOV/sz2Kyi2tH9MDWGwGl01zyUhIpFte/N4+pLWab/2e Ks8/Se3gAX3EjiSEU10iWTVeqb7Mm8kZdigz1qqJVv7dtAXenGgdv/zkxfoaG7eJrgxj Zbtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=t23AE0KyNBSHELQHy+a2shxrn1ogUEEgZRsr7xkziaU=; b=mNXHqBkeo+zHlTy8XLAyfc5g9MZ7Wdb1WJm7QDqxsLRK7DT0HrloGW9EZiIyVpezN9 mPm7loQXJMSDnIARheTq1yQyOQhocun1eSOMGGREpqAyXz/rFFIGSd8KbSOWlQL8d4rm g3sDdweAWTYwni0162BVXymdsWbasc6Bd0llxhi5ETyU3IVYErv9pWEmZO7sgDvbl+/y vGTXJcT9eBCngqAA7nGamZg5JtTAXvK5O7LzvZvQypXM1WDmSt9s9xYF+5lR+wR6J1KJ kpELLWIg55l9TnQL9bwWWx4ag/lPcgKUM8e4GPP61YwTRR7s3NP5NkTCkU6Kc0lnUf5v yVKg== X-Gm-Message-State: AOAM530vIHDVa/FUIVipuiRrdrfTZFkEY4NKSGomMTtzSt3QKhp0dr5i tbkaUNk45vBjGsJimfYU11LuZqarVNA= X-Google-Smtp-Source: ABdhPJwYVBBfuH4/7kLzZOLUNpdGyyyirsrS79APSjVO509v5O6L+EAu9bw5p7z+gTn1AirefPzPqQ== X-Received: by 2002:a7b:c242:: with SMTP id b2mr1505460wmj.119.1614359894832; Fri, 26 Feb 2021 09:18:14 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id a6sm13819545wmj.23.2021.02.26.09.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 09:18:14 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Feb 2021 18:18:08 +0100 Message-Id: <20210226171808.2297158-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> References: <20210226131806.1990485-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/6] avformat: Deprecate AVFMT_FLAG_PRIV_OPT, remove av_demuxer_open on bump X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" This flag was added in 492026209b9b58eaf6d2ea56423f6b1e1a8a76a5 in conjunction with av_demuxer_open() to allow to pass private options to demuxers. It worked as follows: av_open_input_stream() (the predecessor of avformat_open_input()) would not call the read_header function if this flag is set. Instead the user could set private options of the demuxer via the format's private class after avformat_open_input() and then call av_demuxer_open() which called the format's read_header function. This approach was abandoned in e37f161e66e042d6c2c7470c4d9881df9427fc4a and av_demuxer_open() deprecated; instead the AVDictionary based way of passing private options to the demuxer was choosen. Yet AVFMT_FLAG_PRIV_OPT has never been deprecated and av_demuxer_open() never removed. This commit implements the deprecation of the flag and schedules av_demuxer_open for removal on the next major bump. Given that av_demuxer_open() has been deprecated in 2012 and that this flag is useless without it, the flag will be ignored after the next major version bump. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 4 ++++ libavformat/avformat.h | 9 ++++++++- libavformat/utils.c | 12 ++++++++++-- libavformat/version.h | 8 +++++++- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 33be750af2..baa2b24daf 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,10 @@ libavutil: 2017-10-21 API changes, most recent first: +2021-02-26 - xxxxxxxxxx - lavf 58.69.100 - avformat.h + Deprecate AVFMT_FLAG_PRIV_OPT. It will do nothing + as soon as av_demuxer_open() is removed. + 2021-02-21 - xxxxxxxxxx - lavu 56.66.100 - tx.h Add enum AVTXFlags and AVTXFlags.AV_TX_INPLACE diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 41482328f6..7da2f3d98e 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1379,7 +1379,9 @@ typedef struct AVFormatContext { #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) -#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted) +#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 @@ -2210,8 +2212,13 @@ int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, */ int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 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 diff --git a/libavformat/utils.c b/libavformat/utils.c index 6e92bd777a..36164e0f0d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -392,6 +392,7 @@ FF_ENABLE_DEPRECATION_WARNINGS /************************************************************/ /* input media file */ +#if FF_API_DEMUXER_OPEN int av_demuxer_open(AVFormatContext *ic) { int err; @@ -411,7 +412,7 @@ int av_demuxer_open(AVFormatContext *ic) { return 0; } - +#endif /* Open input file and probe the format if necessary. */ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options) @@ -594,8 +595,11 @@ FF_ENABLE_DEPRECATION_WARNINGS 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; @@ -624,7 +628,11 @@ FF_ENABLE_DEPRECATION_WARNINGS 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 c11d885b83..7d16c4d6a5 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ // 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 68 +#define LIBAVFORMAT_VERSION_MINOR 69 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -106,6 +106,12 @@ #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 +#ifndef FF_API_LAVF_PRIV_OPT +#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) +#endif #ifndef FF_API_R_FRAME_RATE