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 56F4C4C63B for ; Tue, 30 Jul 2024 21:39:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2719C68D827; Wed, 31 Jul 2024 00:39:28 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 78D8468D744 for ; Wed, 31 Jul 2024 00:39:21 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id CF3F5FF802 for ; Tue, 30 Jul 2024 21:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1722375561; 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=qjKcYNFiyL0XLf+GwmQRBadf/nawTJP9pngxS6hMFT0=; b=hycrl2qQW7Hw28HPiWgOO7y0t0+rQA+b5zyqQl43tOHD4+iZDbFoU/foR81XRR12jjtugE dp/H/ct2qPE7hij+59VeuQQeV3LLLuw2L02+/TYMzj9A0xDvrXJe32o9chJivnA4JO7bUL aCya60RmI3SC5udwp89z+YiNvT9oGnxB5zJxf94NsZb2V5EWCLmlb0feQ8kD9UsWt1Baeh 06F2Jg5UXit61MmLKM2RBSOquvK+gKnZebDFLyYOyYGxF5D4OhVn+Az5Mdh6JoWV9yQuCF KlLegZJZaHwf2HyqANehlpTkZbDP6/H/lo4WK9d2D63ZIrNVcGQcYPTvHSJ5wQ== Date: Tue, 30 Jul 2024 23:39:20 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240730213920.GR4991@pb2> References: <48919b7f5cd52dbcdbe0a18469c9d2202eee5bfd.camel@haerdin.se> <0f1b1d3b02959fc433bcc7e7be103193d0334b40.camel@haerdin.se> <11253e56e46ef9a19aeae96dab092a1b235e3e69.camel@haerdin.se> <20240726212911.GI4991@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers 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="===============8863004882732453032==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8863004882732453032== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bri7I4a0+3PvYu+W" Content-Disposition: inline --bri7I4a0+3PvYu+W Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2024 at 10:22:37PM +0200, Tomas H=C3=A4rdin wrote: > fre 2024-07-26 klockan 23:29 +0200 skrev Michael Niedermayer: > > On Thu, Jul 25, 2024 at 05:06:04PM -0700, Pierre-Anthony Lemieux > > wrote: > > > On Thu, Jul 25, 2024 at 2:17=E2=80=AFAM Tomas H=C3=A4rdin > > > wrote: > > > >=20 > > > > s=C3=B6n 2024-07-21 klockan 14:07 +0900 skrev Pierre-Anthony Lemieu= x: > > > > > On Sat, Jul 20, 2024 at 5:12=E2=80=AFPM Tomas H=C3=A4rdin > > > > > wrote: > > > > > >=20 > > > > > > tor 2024-07-18 klockan 23:10 +0900 skrev Pierre-Anthony > > > > > > Lemieux: > > > > > > > On Mon, Jul 15, 2024 at 10:33=E2=80=AFPM Tomas H=C3=A4rdin > > > > > > > > > > > > > > wrote: > > > > > > > >=20 > > > > > > > > fre 2024-07-12 klockan 12:51 -0700 skrev Pierre-Anthony > > > > > > > > Lemieux: > > > > > > > > > On Thu, Jul 11, 2024 at 10:28=E2=80=AFPM Tomas H=C3=A4rdin > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > >=20 > > > > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 if (s->in_tile_headers =3D=3D 1 && s->isHT > > > > > > > > > > > && > > > > > > > > > > > (!s- > > > > > > > > > > > > Ccap15_b11)) > > > > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 av_log(s->avctx, AV_LOG_WARNING, > > > > > > > > > > > "COD > > > > > > > > > > > marker > > > > > > > > > > > is > > > > > > > > > > > found in HOMOGENEOUS HT set\n"); > > > > > > > > > >=20 > > > > > > > > > > How bad is this and the other markers being present > > > > > > > > > > in this > > > > > > > > > > case? > > > > > > > > >=20 > > > > > > > > > At the very least, it means that signaling is > > > > > > > > > inconsistent > > > > > > > > > within > > > > > > > > > the > > > > > > > > > codestream since the standard states that: > > > > > > > > > """ > > > > > > > > > The HOMOGENEOUS set is the set of HTJ2K codestreams > > > > > > > > > where: > > > > > > > > > =E2=80=A2 none of the functional marker segments, e.g., C= OD, > > > > > > > > > COC, > > > > > > > > > RGN, > > > > > > > > > QCD, > > > > > > > > > QCC, and POC, are present in any > > > > > > > > > tile-part header; and > > > > > > > > > =E2=80=A2 no PPT marker segment is present. > > > > > > > > > """ > > > > > > > > >=20 > > > > > > > > > The point of signalling that a codestream is > > > > > > > > > "HOMOGENEOUS" is > > > > > > > > > to > > > > > > > > > allow > > > > > > > > > decoders to configure themselves solely based on > > > > > > > > > information > > > > > > > > > retrieved > > > > > > > > > entirely from the main header. > > > > > > > > >=20 > > > > > > > > > Since, AFAIK, FFMPEG does not rely on the HOMOGENEOUS > > > > > > > > > to > > > > > > > > > short- > > > > > > > > > circuit > > > > > > > > > configuration, incorrect HOMOGENEOUS signalling will > > > > > > > > > likely > > > > > > > > > not > > > > > > > > > impact > > > > > > > > > FFMPEG. > > > > > > > >=20 > > > > > > > > It could happen that information in tile headers > > > > > > > > contradict > > > > > > > > information > > > > > > > > in the main header, right? In such a case it sounds like > > > > > > > > we > > > > > > > > can't > > > > > > > > be > > > > > > > > sure which decode is the correct one. > > > > > > >=20 > > > > > > > Per the spec, the decoder uses the COD information in tile- > > > > > > > parts > > > > > > > over > > > > > > > the COD information in the header. > > > > > > >=20 > > > > > > > The issue here is that a decoder, upon seeing HOMOGENEOUS, > > > > > > > simply > > > > > > > does > > > > > > > not bother with looking for COD information in tile-parts, > > > > > > > thereby > > > > > > > missing critical information. > > > > > >=20 > > > > > > So it is actually perfectly legal? Then it seems this patch > > > > > > is > > > > > > wrong > > > > >=20 > > > > > What is not "illegal": the HOMOGENEOUS flag being equal to true > > > > > *and* > > > > > having COD marker segments in tile-parts. > > > > >=20 > > > > > This is what the patch detects. > > > > >=20 > > > > > FFMPEG can decode such illegal codestream. Other decoders might > > > > > not. > > > > >=20 > > > > > The question is: what should FFMPEG do? Should FFMPEG exit or > > > > > warn > > > > > and continue. > > > >=20 > > > > If the spec allows it but it's perhaps unadviced then warning > > > > about it > > > > seems reasonable > > >=20 > > > (I totally messed up my double negative. Repeat below. Sorry for > > > the confusion.) > > >=20 > > > What is "illegal": the HOMOGENEOUS flag being equal to true *and* > > > having COD marker segments in tile-parts. > > >=20 > > > This is what the patch detects. > > >=20 > > > FFMPEG can decode such illegal codestream. Other decoders might > > > not. > > >=20 > > > The question is: what should FFMPEG do? Should FFMPEG exit or warn > > > and continue. > >=20 > > Does such a codestream actually exist ? I mean is this just a > > hypothetical case > > or something existing ? >=20 > This is more to stem the stream before anything happens because we were > lax with parsing If such files dont exist then being picky makes sense thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. --bri7I4a0+3PvYu+W Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZqldiAAKCRBhHseHBAsP q/2EAJ4p7D1AoS90r0OWcD/mWZUn3pUtlQCffDW3qr9YxD6TTASX31pr6HqprHU= =P/Q5 -----END PGP SIGNATURE----- --bri7I4a0+3PvYu+W-- --===============8863004882732453032== 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". --===============8863004882732453032==--