From patchwork Sat Apr 18 10:14:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 19043 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 8836844BB72 for ; Sat, 18 Apr 2020 13:15:10 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7397C68BF40; Sat, 18 Apr 2020 13:15:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.red.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C796468BD8C for ; Sat, 18 Apr 2020 13:15:03 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail.red.khirnov.net (Postfix) with ESMTP id D1B95288A8A for ; Sat, 18 Apr 2020 12:15:02 +0200 (CEST) Received: from mail.red.khirnov.net ([IPv6:::1]) by localhost (mail.red.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id E6IW5b4xIxyD for ; Sat, 18 Apr 2020 12:15:00 +0200 (CEST) Received: from quelana.khirnov.net (unknown [IPv6:2a00:c500:61:23b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "quelana.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail.red.khirnov.net (Postfix) with ESMTPS id 43860288A78 for ; Sat, 18 Apr 2020 12:15:00 +0200 (CEST) Received: from localhost (quelana.khirnov.net [IPv6:::1]) by quelana.khirnov.net (Postfix) with ESMTP id C14762184C for ; Sat, 18 Apr 2020 12:14:57 +0200 (CEST) Received: from quelana.khirnov.net ([IPv6:::1]) by localhost (quelana.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Q8msP7mDMekH for ; Sat, 18 Apr 2020 12:14:55 +0200 (CEST) Received: from libav.daenerys.khirnov.net (libav.daenerys.khirnov.net [IPv6:2a00:c500:561:201::7]) by quelana.khirnov.net (Postfix) with ESMTP id 117AF21842 for ; Sat, 18 Apr 2020 12:14:55 +0200 (CEST) Received: by libav.daenerys.khirnov.net (Postfix, from userid 1000) id ED3A820E0087; Sat, 18 Apr 2020 12:14:48 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 18 Apr 2020 12:14:09 +0200 Message-Id: <20200418101415.26409-4-anton@khirnov.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200418101415.26409-1-anton@khirnov.net> References: <20200418101415.26409-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/9] lavc: add a flag for exporting AVVideoEncParams from decoders 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" --- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 5 +++++ libavcodec/options_table.h | 1 + libavcodec/version.h | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 2fc9428827..c5f56edde6 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -16,8 +16,11 @@ libavutil: 2017-10-21 API changes, most recent first: 2020-xx-xx - xxxxxxxxxx - lavu 56.43.100 - video_enc_params.h + lavc 58.81.100 - avcodec.h Add a new API for exporting video encoding information. Replaces the deprecated API for exporting QP tables from decoders. + Add AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS to request this information from + decoders. 2020-04-15 - xxxxxxxxxx - lavc 58.79.100 - avcodec.h Add formal support for calling avcodec_flush_buffers() on encoders. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index b79b025e53..5d800dae75 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -531,6 +531,11 @@ typedef struct RcOverride{ * Export encoder Producer Reference Time through packet side data */ #define AV_CODEC_EXPORT_DATA_PRFT (1 << 1) +/** + * Decoding only. + * Export the AVVideoEncParams structure through frame side data. + */ +#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2) /** * Pan Scan area. diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 54366747ca..695fa5c211 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -81,6 +81,7 @@ static const AVOption avcodec_options[] = { {"export_side_data", "Export metadata as side data", OFFSET(export_side_data), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, A|V|S|D|E, "export_side_data"}, {"mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_MVS}, INT_MIN, INT_MAX, V|D, "export_side_data"}, {"prft", "export Producer Reference Time through packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_PRFT}, INT_MIN, INT_MAX, A|V|S|E, "export_side_data"}, +{"venc_params", "export video encoding parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS}, INT_MIN, INT_MAX, A|V|S|E, "export_side_data"}, {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX}, {"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, diff --git a/libavcodec/version.h b/libavcodec/version.h index 8cff2e855b..ad85fb15e5 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,7 +28,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 58 -#define LIBAVCODEC_VERSION_MINOR 80 +#define LIBAVCODEC_VERSION_MINOR 81 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \