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