From patchwork Tue Nov 14 17:20:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 44660 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:92a5:b0:181:818d:5e7f with SMTP id q37csp2134425pzg; Tue, 14 Nov 2023 09:21:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGV8gOivzR564uwpnAkqR/idgOGTN0oUodoRXStjltu0nq/Ed5SXe/rRChO5+yNp2QevQ2/ X-Received: by 2002:a05:6402:10cf:b0:53f:2671:e0f4 with SMTP id p15-20020a05640210cf00b0053f2671e0f4mr7439566edu.38.1699982482174; Tue, 14 Nov 2023 09:21:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699982482; cv=none; d=google.com; s=arc-20160816; b=pvJ8aoo+oseRPeEdyeOzSrMSkgmkdZnKwN4n/kdUd1rL9xw9zr6qz8cfOzZyiLJ+i3 /9GMwJfSRvGRbOx1FEnoSY5o3B8JMZhJmnk0jJ0aYGD2NfWSMANn1ISpxmHLR0DsjqWp xy9m9tq1hYCYQDk68RIsNGvtc5RPy4diWykBHeWAoTwovllFXLR6vLv5istCB50S3nCA PIZdgRcUtjHPJtEp3mwnXPiLqCuT35wPwcl3XVQvZOUILKCo2w+ZJtoQDvoxq/YP5IKv nfL79GMiwrhyrOeIONkeArsOZ4vZVB14geFeslaFOE5x6ZPLsWvDohAnEOBMvjW2/T1m eR4Q== 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: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:delivered-to; bh=aDHnMhK6vcGMsfYikeRL6830M3ngGwD6zqkvje2VtHQ=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=IJg0lUjUDjHCM+j5STP5DFyBeJULTjmlmgiCZklcjDJ8OBXUUJYIm+Zgh+Bu499fZB nhtci2e65YrAzw1Bsthdq0VTQmPYTspjOYiMjPHe7YO3HayhACdEP7t2AUADidCiorPE 5b3aupnYh+S3/PW/JnS8Do/pCX+2YGuqut7uu5fzyH0DcvUFYOS4448Yy60PWyfWF3Vm KzFJaV13lth5L0aailufn5M9qXBoGoUdQ7FI5jlE9L5D7b5S5r2Akz84cKWZTsJkhmF4 4VU5Mewh3XQVGMQ7DjuDjXLPUZvAG+1RhPKHRrGbd7tZ/kVfxu7YZHz3plfbCPsa/61I whSA== ARC-Authentication-Results: i=1; mx.google.com; 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 dm11-20020a05640222cb00b0054550d6e9b1si4086785edb.497.2023.11.14.09.21.20; Tue, 14 Nov 2023 09:21:22 -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; 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 A7E6868CD67; Tue, 14 Nov 2023 19:21:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C9AF668CD41 for ; Tue, 14 Nov 2023 19:20:54 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 303C160002 for ; Tue, 14 Nov 2023 17:20:53 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 14 Nov 2023 18:20:48 +0100 Message-Id: <20231114172051.13872-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231114172051.13872-1-michael@niedermayer.cc> References: <20231114172051.13872-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/6] avcodec/h264dec: More elaborate documentation for frame_recovered 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vR75fayNv35h Signed-off-by: Michael Niedermayer --- libavcodec/h264dec.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index b0c54ad82fb..ede51951727 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -524,7 +524,17 @@ typedef struct H264Context { */ #define FRAME_RECOVERED_HEURISTIC (1 << 2) - int frame_recovered; ///< Initial frame has been completely recovered + /** + * Initial frame has been completely recovered. + * + * Once this is set, all following decoded as well as displayed frames will be marked as recovered + * If a frame is marked as recovered frame_recovered will be set once this frame is output and thus + * all subsequently output fraames are also marked as recovered + * + * In effect, if you want all subsequent DECODED frames marked as recovered, set frame_recovered + * If you want all subsequent DISPAYED frames marked as recovered, set the frame->recovered + */ + int frame_recovered; int has_recovery_point;