From patchwork Mon Dec 25 17:53:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rostislav Pehlivanov X-Patchwork-Id: 6959 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.79.195 with SMTP id r64csp5997481jad; Mon, 25 Dec 2017 10:00:14 -0800 (PST) X-Google-Smtp-Source: ACJfBovah6f8oDmlaDcORI7FZD1HCOJ5ZwbKCEG1O4mZucYK28HXWNb//7obfJ/GWc1v6qvTfAvs X-Received: by 10.28.111.218 with SMTP id c87mr19740487wmi.91.1514224814759; Mon, 25 Dec 2017 10:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514224814; cv=none; d=google.com; s=arc-20160816; b=u3EPQ0pleaIjS+KpKBUdL9WkvykplNc/YADPx2W/kyuHx8ndYT41XDu7n5DKOOEgot fl0Nkb2WJv0TiOeFA9EzTFB+5U11hZAD0DRkbat91J4hLdpj9kdhNZ1u2jGUSiCeThMQ 53Fm0/gAeyBplqY9QhXVuTkeOLBh2vJehxFBOZzixWv5otT1FYwtvHyWgbMlu6cnKOOJ osG2iBiJvmhKDsjF0WgphAWTl3/gSo/dSAERXi+P8zEVlwTtqnm2FrNzNmrm8p4PxhAh lHe1/lC5oIw+J9TVt1h28+WvaurM4UHcUgPdyWzhVQgqoCixStKnIOd0Zyp6O22SaLvy X2TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=+012KvW7DaFP3yTyUKr1iTInoH/HcXVYM+AuKQFgpKs=; b=B1IoI08aQLD5G4HmX1nGx8SsbscrPba3g7WMb8FtIprY1ZG153auWaAmUSEvlZ5j4V Rh/g+kUPgSscgEoqYCxL404T+tO/Fu1yPrjHsSSKJhMPX0t5yZgUl0R86Tz2Lx20FFXw cJghGE9vY+mexc37uyoEQjwIIVyJ+kqk8qxYmYDWa0Mc/aYPJgdka9QuSgQja0Sjcat9 dlBMdlxiq+TOyJbDDrrmVZ98KINYDRqM+h3JausMTpPDE6JKI1nUOlykM4uLulBaizPx YPIOqckDKWLcZgL29uBer/BBU5V1RYxVwOcWVAzsVMjy4FDjLWzPwr9R/Tu91wWjiGGw acPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=QUkQTvgb; 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=NONE 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 h196si11727798wma.211.2017.12.25.10.00.14; Mon, 25 Dec 2017 10:00:14 -0800 (PST) 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=QUkQTvgb; 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=NONE 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 B0ACC6882CF; Mon, 25 Dec 2017 20:00:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E30C868829B for ; Mon, 25 Dec 2017 19:59:53 +0200 (EET) Received: by mail-wm0-f67.google.com with SMTP id y82so33627466wmg.1 for ; Mon, 25 Dec 2017 10:00:07 -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; bh=TZ6dxt2VWP05S7Vr0DhC58klmjOdiQdezCJ1MCYgPYI=; b=QUkQTvgb4ExpKzEnYrhisZ2QnmKp68u6zr3rg+kIE1eb9QINYEjYXxWaxI92OyXwt7 e2nAmabt+xP5vlQSrnzwP36iexAZeMRUrRPuCbB3SFaPcD9AScZWDq2JlWBMv80TCA7g 4ve+PjPJzesxn8cG7uOqGWloc8A0gTWM0i+CR9NxzV4aIP8VXYyJ5PBbyh4IVhzjDZpW N3UBH7v4txM8M/1tZL7i+aVNV76VxtaCURt7ZytjLJIuOBTwYUN223uVnUwXLP0YARNs P4FsVrmO98Y7vPPUhTKSR7rx0QWFT3ccncsGScgjs2NJRJFf7p2an4ZYWQe24lbviE2f 3kMg== 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; bh=TZ6dxt2VWP05S7Vr0DhC58klmjOdiQdezCJ1MCYgPYI=; b=FNRP7Q9gUMlYo4+84h1+oZssoXzfXyTqN5H+FwQbKc3LUpVaZlkCcGenMpLCsfb3Ji nmwCftd4CNB3cSAkfOeanrHamBRbyYoIPYRbcg1zkZA2V3/eFsjSaW96Ob5yzFBAsAOQ 2xXSKaY0P1gg5TAm8mjLHJ34zksepgLZiPEvvRcKKjLc3ly09Vcs9EY1HFDMogq1TWFA Xjhhn+l1c1B4uls6SKlN7Fr6yquQ+6vvf2YVtV+dln2I+eLmpk1WR01JYezGh4bX0h2j rDoJWVC4aCUyr0CMW4rZkIprkRI6ZJeA2O2dm64aGga7d9zoRVWVckI7QQrKevjHbrs7 0XtA== X-Gm-Message-State: AKGB3mKz8PXFrRN/NOrrhm8e1miwP4nKa6jqwTQKryAStw/547qH/KX/ Al76PvWh2tFl7RzyM1OYkwITvs9Q X-Received: by 10.28.5.198 with SMTP id 189mr19054273wmf.29.1514224419122; Mon, 25 Dec 2017 09:53:39 -0800 (PST) Received: from skyhide.pars.ee ([2a00:23c4:7c83:f700:c41e:81a6:2466:d2d6]) by smtp.gmail.com with ESMTPSA id i33sm24137307wri.90.2017.12.25.09.53.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Dec 2017 09:53:38 -0800 (PST) From: Rostislav Pehlivanov To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Dec 2017 17:53:35 +0000 Message-Id: <20171225175335.18183-1-atomnuker@gmail.com> X-Mailer: git-send-email 2.15.1.620.gb9897f4670 In-Reply-To: <20171225125951.GC24581@golem.pkh.me> References: <20171225125951.GC24581@golem.pkh.me> Subject: [FFmpeg-devel] [PATCH] lavr: deprecate the entire library 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: Rostislav Pehlivanov MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Deprecate the entire library. Merged years ago to provide compatibility with Libav, it remained unmaintained by the FFmpeg project and duplicated functionality provided by libswresample. In order to improve consistency and reduce attack surface, as well as to ease burden on maintainers, it has been deprecated. Users of this library are asked to migrate to libswresample, which, as well as providing more functionality, is faster and has higher accuracy. Signed-off-by: Rostislav Pehlivanov --- configure | 4 ++-- doc/APIchanges | 10 ++++++++++ libavresample/avresample.h | 30 +++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/configure b/configure index d3187d71ed..33afedfb77 100755 --- a/configure +++ b/configure @@ -133,7 +133,7 @@ Component options: --disable-swscale disable libswscale build --disable-postproc disable libpostproc build --disable-avfilter disable libavfilter build - --enable-avresample enable libavresample build [no] + --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] @@ -6516,7 +6516,7 @@ 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" if test $target_os = "haiku"; then disable memalign diff --git a/doc/APIchanges b/doc/APIchanges index df79758e86..5232bbca7f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,16 @@ libavutil: 2017-10-21 API changes, most recent first: +2017-xx-xx - xxxxxxx - lavr 4.0.0 - avresample.h + Deprecate the entire library. Merged years ago to provide compatibility + with Libav, it remained unmaintained by the FFmpeg project and duplicated + functionality provided by libswresample. + + In order to improve consistency and reduce attack surface, as well as to ease + burden on maintainers, it has been deprecated. Users of this library are asked + to migrate to libswresample, which, as well as providing more functionality, + is faster and has higher accuracy. + 2017-12-xx - xxxxxxx - lavu 56.7.100 - cpu.h AVX-512 flags added. diff --git a/libavresample/avresample.h b/libavresample/avresample.h index 193443e2a6..57889c572c 100644 --- a/libavresample/avresample.h +++ b/libavresample/avresample.h @@ -103,10 +103,10 @@ #define AVRESAMPLE_MAX_CHANNELS 32 -typedef struct AVAudioResampleContext AVAudioResampleContext; +typedef attribute_deprecated struct AVAudioResampleContext AVAudioResampleContext; /** Mixing Coefficient Types */ -enum AVMixCoeffType { +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 */ @@ -114,13 +114,13 @@ enum AVMixCoeffType { }; /** Resampling Filter Types */ -enum AVResampleFilterType { +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 */ }; -enum AVResampleDitherMethod { +enum attribute_deprecated AVResampleDitherMethod { AV_RESAMPLE_DITHER_NONE, /**< Do not use dithering */ AV_RESAMPLE_DITHER_RECTANGULAR, /**< Rectangular Dither */ AV_RESAMPLE_DITHER_TRIANGULAR, /**< Triangular Dither*/ @@ -132,17 +132,20 @@ enum AVResampleDitherMethod { /** * Return the LIBAVRESAMPLE_VERSION_INT constant. */ +attribute_deprecated unsigned avresample_version(void); /** * Return the libavresample build-time configuration. * @return configure string */ +attribute_deprecated const char *avresample_configuration(void); /** * Return the libavresample license. */ +attribute_deprecated const char *avresample_license(void); /** @@ -155,6 +158,7 @@ const char *avresample_license(void); * * @return AVClass for AVAudioResampleContext */ +attribute_deprecated const AVClass *avresample_get_class(void); /** @@ -162,6 +166,7 @@ const AVClass *avresample_get_class(void); * * @return allocated audio resample context, or NULL on failure */ +attribute_deprecated AVAudioResampleContext *avresample_alloc_context(void); /** @@ -178,6 +183,7 @@ AVAudioResampleContext *avresample_alloc_context(void); * @param avr audio resample context * @return 0 on success, negative AVERROR code on failure */ +attribute_deprecated int avresample_open(AVAudioResampleContext *avr); /** @@ -186,6 +192,7 @@ int avresample_open(AVAudioResampleContext *avr); * @param avr AVAudioResampleContext to check * @return 1 if avr is open, 0 if avr is closed. */ +attribute_deprecated int avresample_is_open(AVAudioResampleContext *avr); /** @@ -201,6 +208,7 @@ int avresample_is_open(AVAudioResampleContext *avr); * * @param avr audio resample context */ +attribute_deprecated void avresample_close(AVAudioResampleContext *avr); /** @@ -210,6 +218,7 @@ void avresample_close(AVAudioResampleContext *avr); * * @param avr audio resample context */ +attribute_deprecated void avresample_free(AVAudioResampleContext **avr); /** @@ -234,6 +243,7 @@ void avresample_free(AVAudioResampleContext **avr); * @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, @@ -251,6 +261,7 @@ int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout, * @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); @@ -272,6 +283,7 @@ int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix, * @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); @@ -302,6 +314,7 @@ int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix, * @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); @@ -318,6 +331,7 @@ int avresample_set_channel_mapping(AVAudioResampleContext *avr, * @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); @@ -331,7 +345,7 @@ int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta, * @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); /** @@ -376,6 +390,7 @@ int avresample_get_out_samples(AVAudioResampleContext *avr, int in_nb_samples); * 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, @@ -394,6 +409,7 @@ int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, * @param avr audio resample context * @return number of samples currently in the resampling delay buffer */ +attribute_deprecated int avresample_get_delay(AVAudioResampleContext *avr); /** @@ -411,6 +427,7 @@ int avresample_get_delay(AVAudioResampleContext *avr); * @param avr audio resample context * @return number of samples available for reading */ +attribute_deprecated int avresample_available(AVAudioResampleContext *avr); /** @@ -430,6 +447,7 @@ int avresample_available(AVAudioResampleContext *avr); * @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); /** @@ -476,6 +494,7 @@ int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_sample * @return 0 on success, AVERROR on failure or nonmatching * configuration. */ +attribute_deprecated int avresample_convert_frame(AVAudioResampleContext *avr, AVFrame *output, AVFrame *input); @@ -494,6 +513,7 @@ int avresample_convert_frame(AVAudioResampleContext *avr, * @param in input AVFrame * @return 0 on success, AVERROR on failure. */ +attribute_deprecated int avresample_config(AVAudioResampleContext *avr, AVFrame *out, AVFrame *in); /**