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 ESMTPS id 10A894C599 for ; Sun, 9 Mar 2025 18:08:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2799668E657; Sun, 9 Mar 2025 20:08:21 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EDC5568E3EB for ; Sun, 9 Mar 2025 20:08:14 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3773B442B5 for ; Sun, 9 Mar 2025 18:08:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1741543694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wLV7XQ/4aye1TfpnO+wf6neu80nDAo/nwymeY3sytgo=; b=AR8Lmr4iXzw7bu9xliIeLlcOvzae5OHNNEgWTJhevPgh62gOhLdJShm8uTfj2vrH39CVWB h1YOo16UX+bILiv2bvxgsgevdXM5bZYKxocbZV5uZ1VQY4rohFXWdVaa278eVNl6wX/faH F6Vn8I+zm+F9PhjH2Nyp0QLodAgTbGsOtX+A8N2BqgrPyilDJxnwBdpViBFIp9y2YHn/ZG jh2o7l2jxXAi2+sNXIOc1jUlDqy1AiaQ40vHZ1tfvNdLYwNlSduidiUR3/tWVHpanUsXuJ +ep5Z/DhZp/HLdZIFuW5DdrozuxbRUonwy+CMl4TYUPLUcmD2k4nNiJmOu2PFg== Date: Sun, 9 Mar 2025 19:08:13 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250309180813.GI4991@pb2> References: <20250308210034.9842-1-anders@onemimir.com> MIME-Version: 1.0 In-Reply-To: <20250308210034.9842-1-anders@onemimir.com> X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduudejudefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdeftddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] Include field_mode information in NUT stream info 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 Content-Type: multipart/mixed; boundary="===============6848454514182935629==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6848454514182935629== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pL1gND6hF67Oy1jJ" Content-Disposition: inline --pL1gND6hF67Oy1jJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Anders On Sat, Mar 08, 2025 at 10:00:34PM +0100, Anders Rein wrote: > This will make it possible to transmit raw video over NUT without losing > the field order information. > --- > libavformat/nutdec.c | 4 ++++ > libavformat/nutenc.c | 3 +++ > 2 files changed, 7 insertions(+) >=20 > diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c > index 34b7e3cb9a..07eff23134 100644 > --- a/libavformat/nutdec.c > +++ b/libavformat/nutdec.c > @@ -607,6 +607,10 @@ static int decode_info_header(NUTContext *nut) > continue; > } > =20 > + if (stream_id_plus1 && !strcmp(name, "field_order")) { > + sscanf(str_value, "%d", &st->codecpar->field_order); > + } > + indention is inconsistant, data is not checkecked for validity > if (metadata && av_strcasecmp(name, "Uses") && > av_strcasecmp(name, "Depends") && av_strcasecmp(name, "R= eplaces")) { > if (event_flags) > diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c > index 55efb114c3..0853fecf5c 100644 > --- a/libavformat/nutenc.c > +++ b/libavformat/nutenc.c > @@ -566,6 +566,9 @@ static int write_streaminfo(NUTContext *nut, AVIOCont= ext *bc, int stream_id) { > else > snprintf(buf, sizeof(buf), "%d/%d", st->avg_frame_rate.num, = st->avg_frame_rate.den); > count +=3D add_info(dyn_bc, "r_frame_rate", buf); > + > + snprintf(buf, sizeof(buf), "%d", st->codecpar->field_order); > + count +=3D add_info(dyn_bc, "field_order", buf); a numeric field order is not well defined. Also if you place this in streaminfo. Please explain what shall be done if it changes and it would need an update to fate tests (which break) --- ./tests/ref/fate/ffmpeg-loopback-decoding 2025-03-03 01:18:34.299595988= +0100 +++ tests/data/fate/ffmpeg-loopback-decoding 2025-03-09 18:59:36.248837197 = +0100 @@ -1,5 +1,5 @@ -e4e0e27eb8ed99eedc2458d92401c5e4 *tests/data/fate/ffmpeg-loopback-decoding= =2Enut -7435259 tests/data/fate/ffmpeg-loopback-decoding.nut +460c64b2deef77f80c3afe6135c0a464 *tests/data/fate/ffmpeg-loopback-decoding= =2Enut +7435274 tests/data/fate/ffmpeg-loopback-decoding.nut #tb 0: 1/25 #media_type 0: video #codec_id 0: rawvideo and update to nut.txt (which lists no field_order IIRC) thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates --pL1gND6hF67Oy1jJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ83ZCQAKCRBhHseHBAsP qxrsAJ9KIVUAWuqdPNuSgea2I6vTOW/gawCdGaueLjhGC3iTsrfXyFvBjfZvJhE= =LuG9 -----END PGP SIGNATURE----- --pL1gND6hF67Oy1jJ-- --===============6848454514182935629== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============6848454514182935629==--