From patchwork Sat Feb 13 16:32: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: 25609 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 E8387448EC7 for ; Sat, 13 Feb 2021 18:32:52 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B3E5E689FFE; Sat, 13 Feb 2021 18:32:52 +0200 (EET) 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 9B065689FFE for ; Sat, 13 Feb 2021 18:32:45 +0200 (EET) Received: by mail-qk1-f172.google.com with SMTP id w19so2617962qki.13 for ; Sat, 13 Feb 2021 08:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KLaolNbVu4auGkT3qj+1gVs922iEs6ezCKL/4almEvE=; b=FnuGNeiZB1kQ6STwBZsafuItmw72+sRK1iTEXpSWd4052su7uu1YYlzYcFiOVCsK3V ZwFUgCgXhLYALpeozKwBXjk5h5mJl0DKm1VpyNESscWqhIJK7VGqTCsBIu1BZjXUCG/O 8gPSvo+4rbucVZXHpv159NCE/f123n4tzO3SmYlzQJxm3N1W7Na5OXMcQs3vFfWyHQX8 1leGu2zJv86Aa2e4ru1vdjvcyY/Oxyg+wiMCKzrwu3V0EVl3Zet0EEsJP81m5DzOTm5U T/oww7wr/nYl9Drn/t85NgNz4KxHvxK4t0Zs7vH84aE1krQUjvCnEv/0YA1RHy0/y3Wu Vpvw== 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:mime-version :content-transfer-encoding; bh=KLaolNbVu4auGkT3qj+1gVs922iEs6ezCKL/4almEvE=; b=gvYR9TS/l4uoiC5aj9+stx/Ra7tHEnsc4J5oojSXIvyIRrZG7iiE6Rp1zZBTB276ce 4oK1dnRoDx6EgwrDctsGO1MWjxeILVDn2cn7XeTBksp7/W+whJMi3BjeDbZzdrv01mzr M5IRrK/fLdzBwBEST+2KxBgANyWydCjzijPp8wB6UTxeGrwR25IUF8rtxve9Fwc81FNW e0URDk549L5nGu2LlP18gLMkjJgg2lcPvykCx1+3vju82xA7h4B324WBDKm7sTYi8ST+ Kq4YJv0G93l7LJzSxnLvyhF1acMJ/5ueBsLITe9mHonb++uiysOZsoF8a5AZ+IdLr+22 DKiQ== X-Gm-Message-State: AOAM532kCF2zCrIxWcOsZtQAweCVld1ktzzlV5f74K3ywps6DZmFoHea xwFJ6nRgxElgugTi7lIqdMIGmhcptV4= X-Google-Smtp-Source: ABdhPJyZxxwchTlXWXwOx47GXszN50CGd7hf9Qk+DhIPQhLe+3QHeD+457wPLp8Fy5ehJfXwRL37xg== X-Received: by 2002:a37:59c5:: with SMTP id n188mr7776864qkb.394.1613233964110; Sat, 13 Feb 2021 08:32:44 -0800 (PST) Received: from localhost.localdomain ([181.23.76.251]) by smtp.gmail.com with ESMTPSA id k4sm5602357qth.40.2021.02.13.08.32.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Feb 2021 08:32:43 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 13 Feb 2021 13:32:23 -0300 Message-Id: <20210213163223.2618-1-jamrial@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec: remove pointless lowres deprecation wrappers 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Neither the feature, public fields, or AVOptions were ever truly deprecated, and will also not be removed if this FF_API_ define was left in place, so remove it as it's misleading. Signed-off-by: James Almer --- libavcodec/avcodec.h | 13 ------------- libavcodec/version.h | 3 --- libavformat/utils.c | 2 -- 3 files changed, 18 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 7dbf083a24..5df6a8aedc 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1741,14 +1741,12 @@ typedef struct AVCodecContext { */ int bits_per_raw_sample; -#if FF_API_LOWRES /** * low resolution decoding, 1-> 1/2 size, 2->1/4 size * - encoding: unused * - decoding: Set by user. */ int lowres; -#endif #if FF_API_CODED_FRAME /** @@ -2084,15 +2082,6 @@ typedef struct AVCodecContext { */ const AVCodecDescriptor *codec_descriptor; -#if !FF_API_LOWRES - /** - * low resolution decoding, 1-> 1/2 size, 2->1/4 size - * - encoding: unused - * - decoding: Set by user. - */ - int lowres; -#endif - /** * Current statistics for PTS correction. * - decoding: maintained and used by libavcodec, not intended to be used by user apps @@ -2366,12 +2355,10 @@ void av_codec_set_codec_descriptor(AVCodecContext *avctx, co attribute_deprecated unsigned av_codec_get_codec_properties(const AVCodecContext *avctx); -#if FF_API_LOWRES attribute_deprecated int av_codec_get_lowres(const AVCodecContext *avctx); attribute_deprecated void av_codec_set_lowres(AVCodecContext *avctx, int val); -#endif attribute_deprecated int av_codec_get_seek_preroll(const AVCodecContext *avctx); diff --git a/libavcodec/version.h b/libavcodec/version.h index 83dbd1ad63..1eb140a6c9 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_LOWRES -#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59) -#endif #ifndef FF_API_AVCTX_TIMEBASE #define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59) #endif diff --git a/libavformat/utils.c b/libavformat/utils.c index 3e955b85bc..5d40678325 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4130,7 +4130,6 @@ FF_DISABLE_DEPRECATION_WARNINGS if (ret < 0) goto find_stream_info_err; -#if FF_API_LOWRES // The old API (AVStream.codec) "requires" the resolution to be adjusted // by the lowres factor. if (st->internal->avctx->lowres && st->internal->avctx->width) { @@ -4138,7 +4137,6 @@ FF_DISABLE_DEPRECATION_WARNINGS st->codec->width = st->internal->avctx->width; st->codec->height = st->internal->avctx->height; } -#endif if (st->codec->codec_tag != MKTAG('t','m','c','d')) { st->codec->time_base = st->internal->avctx->time_base;