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 8C2FF468E7 for ; Sun, 21 Jul 2024 12:34:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F12EF68D681; Sun, 21 Jul 2024 15:34:08 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 10F8868D65E for ; Sun, 21 Jul 2024 15:34:02 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B356D1C0002; Sun, 21 Jul 2024 12:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1721565240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=H/We2k46BYhW7U0afbWT3QJ1fQCCGEOFpqpkRT271tM=; b=c3jSnSQY+jIJ6XBLNkTUItVmi8Wi+oXE8eof0e585FaL6qEi7ggsGaTecQCo3x6O3CH261 KQTuEgpjth/79/IWG/Mlg3joP/3nRHVYVCnSnP2BY8hdWurmPzK/VYfNqN8h31L/jqQRk+ 7DHnAvkc2QNR9Nd2Bk3W8ELE1i0kNaEoUT2vBAJPFsloPaiSE4VOoH3CdYZEvLdWGxt18K HHYx+zDlvcA+o7StsXBHzSdWArvYGV3FTrlE0F52ONEaz+pX1BcvbdseIhceUBmqK/ZeRr lo+NKLSFjaIclYW4ckb929z1NiO2Wqknn2r6VtvD734be8BF0fc+lhnPSa+cTA== Date: Sun, 21 Jul 2024 14:34:00 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240721123400.GM4991@pb2> References: <259cfc93-3e34-4081-8640-82890edbf76a@jkqxz.net> <20231225235042.GQ6420@pb2> MIME-Version: 1.0 In-Reply-To: <20231225235042.GQ6420@pb2> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] cbs_av1: Reject thirty-two zero bits in uvlc code 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: Mark Thompson Content-Type: multipart/mixed; boundary="===============8870621444874315490==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8870621444874315490== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="A5jN/zRxu3Z2JiN/" Content-Disposition: inline --A5jN/zRxu3Z2JiN/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 26, 2023 at 12:50:42AM +0100, Michael Niedermayer wrote: > Hi >=20 > On Sun, Oct 22, 2023 at 07:35:52PM +0100, Mark Thompson wrote: > > The spec allows at least thirty-two zero bits followed by a one to mean > > 2^32-1, with no constraint on the number of zeroes. The libaom > > reference decoder does not match this, instead reading thirty-two zeroes > > but not the following one to mean 2^32-1. These two interpretations are > > incompatible and other implementations may follow one or the other. > > Therefore reject thirty-two zeroes because the intended behaviour is not > > clear. > > --- > > libaom, dav1d and SVT-AV1 all have the same nonstandard behaviour of st= opping at thirty-two zeroes and not reading the one. gav1 just rejects thi= rty-two zeroes. > >=20 > > This is also a source of arbitrarily large single syntax elements to hi= t . > >=20 > > libavcodec/cbs_av1.c | 18 +++++++++++++----- > > 1 file changed, 13 insertions(+), 5 deletions(-) > >=20 > > diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c > > index 1d9ac5ab44..13c749a25b 100644 > > --- a/libavcodec/cbs_av1.c > > +++ b/libavcodec/cbs_av1.c > > @@ -36,7 +36,7 @@ static int cbs_av1_read_uvlc(CodedBitstreamContext *c= tx, GetBitContext *gbc, > > CBS_TRACE_READ_START(); > >=20 > > zeroes =3D 0; > > - while (1) { > > + while (zeroes < 32) { >=20 > what happened with this patch ? > the git master code still aborts timeout (many times in fact) will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato --A5jN/zRxu3Z2JiN/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZp0ANAAKCRBhHseHBAsP q4TQAJ0aYhxe3FmO2U0IXRpbE75qcN9oiQCfUNcNkQ0ySX9GCAkkAVlqG/ljfh4= =xSag -----END PGP SIGNATURE----- --A5jN/zRxu3Z2JiN/-- --===============8870621444874315490== 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". --===============8870621444874315490==--