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 3373848A6A for ; Fri, 26 Jul 2024 21:29:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6494168D6BD; Sat, 27 Jul 2024 00:29:18 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4AD9E68D097 for ; Sat, 27 Jul 2024 00:29:12 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9EC50240002 for ; Fri, 26 Jul 2024 21:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1722029351; 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=yVqHp5maE99CwecdP5QgxESCJPksmxHRuz9cGUl14vc=; b=asoS4TIlqUw9M0nzZ0mHqq6hRv+6pbvO0ytiybzTZkT/IWGosaiU/7iZfCVX4MfFjhyMQy 2bpBYd8NG9wgolhY6fZ7AiLuEgws2GoHMK1SZcKZYKQXKnFB4LStWjks+peAGIYwn3NH69 5lY05vnTX900+J2KToNiKWrQLGgOAV3egaV+yi8zPNMWjNThgYlbAeCTMJihcOcU9o6W5a VO/etCIKPH7BPn0iJ8Hmpm24PyQXaeBe1JqvPtvQ7gzg2ljz35z400LvuJl/EE0v2+WAyo /baBAkUVIzQOsq83Q9ZkauRQySBrdES3kPDjN+dTm+du9dCKjj3hTxBfowijSQ== Date: Fri, 26 Jul 2024 23:29:11 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240726212911.GI4991@pb2> References: <20240624133734.3032409-1-owatanab@es.takushoku-u.ac.jp> <48919b7f5cd52dbcdbe0a18469c9d2202eee5bfd.camel@haerdin.se> <0f1b1d3b02959fc433bcc7e7be103193d0334b40.camel@haerdin.se> <11253e56e46ef9a19aeae96dab092a1b235e3e69.camel@haerdin.se> 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="===============2955166244420748151==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2955166244420748151== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bYrG818GTFYOcDzy" Content-Disposition: inline --bYrG818GTFYOcDzy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > > > > s=C3=B6n 2024-07-21 klockan 14:07 +0900 skrev Pierre-Anthony Lemieux: > > > On Sat, Jul 20, 2024 at 5:12=E2=80=AFPM Tomas H=C3=A4rdin wrote: > > > > > > > > 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: > > > > > > > > > > > > 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: > > > > > > > > > > > > > > > > > + if (s->in_tile_headers =3D=3D 1 && s->isHT && > > > > > > > > > (!s- > > > > > > > > > > Ccap15_b11)) > > > > > > > > > + av_log(s->avctx, AV_LOG_WARNING, "COD > > > > > > > > > marker > > > > > > > > > is > > > > > > > > > found in HOMOGENEOUS HT set\n"); > > > > > > > > > > > > > > > > How bad is this and the other markers being present in this > > > > > > > > case? > > > > > > > > > > > > > > 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., COD, = COC, > > > > > > > RGN, > > > > > > > QCD, > > > > > > > QCC, and POC, are present in any > > > > > > > tile-part header; and > > > > > > > =E2=80=A2 no PPT marker segment is present. > > > > > > > """ > > > > > > > > > > > > > > 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. > > > > > > > > > > > > > > Since, AFAIK, FFMPEG does not rely on the HOMOGENEOUS to > > > > > > > short- > > > > > > > circuit > > > > > > > configuration, incorrect HOMOGENEOUS signalling will likely > > > > > > > not > > > > > > > impact > > > > > > > FFMPEG. > > > > > > > > > > > > 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. > > > > > > > > > > Per the spec, the decoder uses the COD information in tile-parts > > > > > over > > > > > the COD information in the header. > > > > > > > > > > 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. > > > > > > > > So it is actually perfectly legal? Then it seems this patch is > > > > wrong > > > > > > What is not "illegal": the HOMOGENEOUS flag being equal to true *and* > > > having COD marker segments in tile-parts. > > > > > > This is what the patch detects. > > > > > > FFMPEG can decode such illegal codestream. Other decoders might not. > > > > > > The question is: what should FFMPEG do? Should FFMPEG exit or warn > > > and continue. > > > > 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 conf= usion.) >=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 co= ntinue. Does such a codestream actually exist ? I mean is this just a hypothetical = case or something existing ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart than the original author, trying to rewrite it will not make it better. --bYrG818GTFYOcDzy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZqQVIAAKCRBhHseHBAsP q/FwAKCJu3PCzSp7BRTMsg9uqVWEg3w9/QCeOaZNB588gv0AW5T2k27PjbFaCBo= =HYum -----END PGP SIGNATURE----- --bYrG818GTFYOcDzy-- --===============2955166244420748151== 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". --===============2955166244420748151==--