From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 81D3149B9C for ; Wed, 3 Apr 2024 15:44:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 538B568D1AE; Wed, 3 Apr 2024 18:43:43 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F272E68CE36 for ; Wed, 3 Apr 2024 18:43:34 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1712159014; bh=7d78h44qfomf2wASovFHqpGHzlu1LfrAEiKMdkrspj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vqi20H6DXmtGYsKFGUTk3AbtISIxOXmxEF4SleNj3bS2V8vFF2R0gNL4s2+cU628X +K6ErJiRYcpmx9/L5rRfzz762T/1NjmMEz9gL7Hote3MVuM7m3PfVB7ObXrWqKgmKN pcTKuFZBoiiRM9KTxE8HCVOrAKLFR2ou5hOCq9U8= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id A82EE42835; Wed, 3 Apr 2024 17:43:34 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Apr 2024 17:43:24 +0200 Message-ID: <20240403154330.71585-4-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240403154330.71585-1-ffmpeg@haasn.xyz> References: <20240403154330.71585-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/10] avcodec/dovi_rpu: clarify error on missing RPU VDR 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 Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas The code was written under the misguided assumption that these fields would only be present when the value changes, however this does not match the actual patent specification, which says that streams are required to either always signal this metadata, or never signal it. That said, the specification does not really clarify what the defaults of these fields should be in the event that this metadata is missing, so without any sample file or other reference I don't wish to hazard a guess at how to interpret these fields. Fix the current behavior by making sure we always throw this error, even for files that have the vdr sequence info in one frame but are missing it in the next frame. --- libavcodec/dovi_rpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index bfb7b9fe661..267e52ceb66 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -499,11 +499,11 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, hdr->el_spatial_resampling_filter_flag = get_bits1(gb); hdr->disable_residual_flag = get_bits1(gb); } - } - - if (!hdr->bl_bit_depth) { - av_log(s->logctx, AV_LOG_ERROR, "Missing RPU VDR sequence info?\n"); - goto fail; + } else { + /* lack of documentation/samples */ + avpriv_request_sample(s->logctx, "Missing RPU VDR sequence info\n"); + ff_dovi_ctx_unref(s); + return AVERROR_PATCHWELCOME; } vdr_dm_metadata_present = get_bits1(gb); -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".