From patchwork Fri Jul 21 13:37:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Dekker" X-Patchwork-Id: 42883 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:be1d:b0:130:ccc6:6c4b with SMTP id ge29csp228330pzb; Fri, 21 Jul 2023 06:38:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4gbsC0SU0w7AoIeO3G3jZ1HB9Aj2SxjzCvn0wgdm00bxVtOyqIHo/1RD1nz6LAR9rFn7C X-Received: by 2002:a17:906:8451:b0:994:1fd2:cf96 with SMTP id e17-20020a170906845100b009941fd2cf96mr1741646ejy.0.1689946684033; Fri, 21 Jul 2023 06:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689946684; cv=none; d=google.com; s=arc-20160816; b=tP7efKxUoX/Zc9AJVaZyE9DEpnb1Y3q+lzzHYYRjLJSZJdQIoovfdT0IvlUHcdKFLs KXqEpSRlbSLg0/vGX5HyjHx7B7VMX4E6WahMcoj4so5WQmIa9xSp5ebRTreB+0mTd8Nl DLBjisAZDfsTW6fOor4dFxC+epKo0pc+izihMX+KPJKABjU33TgpCiwTngWgJbwPl0XS qw0BDOeaMoRxqVZngto99V6K30IK4V6INRlq5OeTB8zqq+BANwsQmcB9pVKhZUH4SGAB 22TmVMut0ixGjdjzqgqqix+n++k2/NT2iM90SBuOSu//F/cyG+b4olwFukJPDdn7eCQI QomA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:feedback-id:dkim-signature:dkim-signature:delivered-to; bh=/nnXBrrl2IZ4kEvM5dlPj9Olb5w+th54QDHuoXEjZTs=; fh=RX379NAUHdZIU7CQlxbXTMt5HBBB5CUKf4o4OtPlQjY=; b=X4ZqDO8ZLdtP5zxGxQvR/TXHKEC2tyvyZwosJgktTUcpm7CJXuSmxEOtpCVqw9dj26 kA35H/hFlDDmhoNfZX/02BeE8ObEI3cobQHuQhK4qVtG7MSR2PXUca71PePgw+DPdhlo OEqhFdHhbnb/ev3+rx+Xmv+FBjq7nGI5bC9OXlM1YoLjed05dsmGVqmF/pnhM+/4bbxV LOb+rC2Pz48CaoCken5KEEityaAl6USpcFl9wX0M8T8lzqfgF1lkY4skrsNImHBidXFy NomwlptfGoWU934YNCw7ZR3PxZcQriDWpYSwgwNarciIw4SKRUBRt17UOPKjYmpB62wq gXAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li header.s=fm1 header.b=lP4IWKGO; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm3 header.b=0tmzTskH; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a12-20020a1709066d4c00b00992bf74c316si2191289ejt.974.2023.07.21.06.38.03; Fri, 21 Jul 2023 06:38:04 -0700 (PDT) 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=@itanimul.li header.s=fm1 header.b=lP4IWKGO; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm3 header.b=0tmzTskH; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AD50268C5C7; Fri, 21 Jul 2023 16:37:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2FF0F68C1B8 for ; Fri, 21 Jul 2023 16:37:52 +0300 (EEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7BFED5C00E4 for ; Fri, 21 Jul 2023 09:37:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 21 Jul 2023 09:37:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itanimul.li; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1689946670; x= 1690033070; bh=W0BBqZM48XwTr14WH7K12GYo3LyKZA9FVY1J+BPBmo4=; b=l P4IWKGOby54OYts2efLrXpXpxvIejgcq9kCxA6N/TcHTNc12qpO3eXkHgQDKefMJ wOGgnSncDyPv6kLJq7YM3BMSXi7i/jvq1W69TahsMndNptIltTALBjPjtdgBFg2n 9RTB3ijpLByy/oVkXMfliKE3ARwAnQsVfXHfWHVRGkOU/1JmvFCDCOay9PVvNhRd H7D7CZPzXU4eAabpDuMOisoe12IpwOoHV0Waj3UXUwjXqhMjCxktnfqFsqqQrEmQ a8m/pO4sp2GdWVLW6tgRHmZxWmJ+stNQS/AU2S81SaM5QHNoPFdkQEMhn4HH4Sxq GtSA2GZDqScaZVDlFUP4w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1689946670; x=1690033070; bh=W 0BBqZM48XwTr14WH7K12GYo3LyKZA9FVY1J+BPBmo4=; b=0tmzTskHuHxrknaSu dFvQofNCE/y4tdNKA1FOvD+Qe690ArJQUe6QxirFZXEBesLm/TB2wxZ1C9yzayzI 3oaBrWoA0At+Nz7/BXWedoU/+8/LhJjFd4gW6u+pLd9E+JXSETqhn10Bi4aM5OVj BVH/OQmDroTqCwQ9hRfiXa9461Pv1O7LsW/HcPHvTEiTx3sztNcISoCAB0Me2Jp6 o71RR8epCw9KDg+cCj9V6JdMP9MHCFBKQzRMeQjXJpuJW4ykcHNvWhI3t0K9fxjq 5ewXL1tgTxkNdmJMQsYNRYXMYeRlkFaTV4En4xMGPumhhcZeAcuKetp5nUVzfKpF T6O/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrhedvgdeivdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpedflfdrucffvghkkhgvrhdfuceojhguvghksehithgrnhhimhhu lhdrlhhiqeenucggtffrrghtthgvrhhnpeegvdfhffduudegheevieekieeffefgveffke dtheekieefhfevueetueefhfetteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehjuggvkhesihhtrghnihhmuhhlrdhlih X-ME-Proxy: Feedback-ID: i84994747:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 21 Jul 2023 09:37:49 -0400 (EDT) From: "J. Dekker" To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Jul 2023 15:37:41 +0200 Message-ID: <20230721133746.33335-2-jdek@itanimul.li> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721133746.33335-1-jdek@itanimul.li> References: <20230721133746.33335-1-jdek@itanimul.li> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] lavc: add AV_CODEC_EXPORT_DATA_ERROR X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: Tgv3HD838MRN Add an option to avcodec to allow supported decoders to optionally output information about error resilience as sidedata. Co-Authored-By: Thomas Guillem Signed-off-by: J. Dekker --- libavcodec/avcodec.h | 5 +++++ libavcodec/options_table.h | 1 + libavcodec/version.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index fe41ecc3c9..7400604fc5 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -410,6 +410,11 @@ typedef struct RcOverride{ * Do not apply film grain, export it instead. */ #define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3) +/** + * Decoding only. + * Export the AVECInfo structure through frame side data. + */ +#define AV_CODEC_EXPORT_DATA_ERROR (1 << 4) /** * The decoder will keep a reference to the frame and may reuse it later. diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index bb4b894b06..0a1dc4b062 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -91,6 +91,7 @@ static const AVOption avcodec_options[] = { {"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, V|D, "export_side_data"}, {"film_grain", "export film grain parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_FILM_GRAIN}, INT_MIN, INT_MAX, V|D, "export_side_data"}, +{"error_info", "export error info through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_ERROR}, INT_MIN, INT_MAX, V|D, "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 9411511e04..728ab8839d 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 22 +#define LIBAVCODEC_VERSION_MINOR 23 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \