From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 5FE184E6E6
	for <ffmpegdev@gitmailbox.com>; Fri, 14 Mar 2025 00:37:35 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2581768BE99;
	Fri, 14 Mar 2025 02:37:31 +0200 (EET)
Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net
 [217.70.183.194])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 41A67680347
 for <ffmpeg-devel@ffmpeg.org>; Fri, 14 Mar 2025 02:37:24 +0200 (EET)
Received: by mail.gandi.net (Postfix) with ESMTPSA id 7400D4414E
 for <ffmpeg-devel@ffmpeg.org>; Fri, 14 Mar 2025 00:37:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc;
 s=gm1; t=1741912643;
 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=vownsru2lvb3HeLxfcAsX4Q/CL1Ye8w5SUw41rqr2NE=;
 b=liLh9sjPaGQXVd3IaswmmSVrcPo0aM7OChaCZItmqAAuBCdp7/xJyLs5roU64uOMWlr9VR
 9X2nCElGEj4fVWC7LxvRGeq4lFKGCyt8vz75h6iLIJn2Fydu6ueZCiaGgYyjH8j22BMwLL
 eMg9ubVGV9qWK5kA/IIE3byjBvdfr7IoeUmleN2RVNlET2p7zR2OKx0VNUoZGFsApMf5sh
 96Uui4st3ThVTebTKi+kkp2q3ILZs56JdWLPiPiyR6lehGmdLAoSNllgDu6aALno3kFfwB
 DiSr8V8wVD8Tm+NnkFyLlRaEfNR+0nNP+92b5D9uc+hk9p6PhPDmQcpAXbjUcw==
Date: Fri, 14 Mar 2025 01:37:22 +0100
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <20250314003722.GH4991@pb2>
References: <20250309225806.1849854-1-michael@niedermayer.cc>
MIME-Version: 1.0
In-Reply-To: <20250309225806.1849854-1-michael@niedermayer.cc>
X-GND-State: clean
X-GND-Score: -70
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdelgeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdeftddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg
X-GND-Sasl: michael@niedermayer.cc
Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/ffv1enc: add space for the
 remap table to max_size
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: multipart/mixed; boundary="===============6812902841956994951=="
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250314003722.GH4991@pb2/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>


--===============6812902841956994951==
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="oFpnxODLjRhXBEXQ"
Content-Disposition: inline


--oFpnxODLjRhXBEXQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 09, 2025 at 11:58:03PM +0100, Michael Niedermayer wrote:
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/ffv1enc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>=20
> diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
> index b4080f29002..7c73ff12c2f 100644
> --- a/libavcodec/ffv1enc.c
> +++ b/libavcodec/ffv1enc.c
> @@ -1211,7 +1211,8 @@ size_t ff_ffv1_encode_buffer_size(AVCodecContext *a=
vctx)
>      size_t maxsize =3D avctx->width*avctx->height * (1 + f->transparency=
);
>      if (f->chroma_planes)
>          maxsize +=3D AV_CEIL_RSHIFT(avctx->width, f->chroma_h_shift) * A=
V_CEIL_RSHIFT(f->height, f->chroma_v_shift) * 2;
> -    maxsize +=3D f->slice_count * 800; //for slice header
> +    maxsize +=3D f->slice_count * 800; //for slice header and
> +    maxsize +=3D f->slice_count * 9000 * !!f->flt; //remap table
>      if (f->version > 3) {
>          maxsize *=3D f->bits_per_raw_sample + 1;
>      } else {

will apply this without the typo and with a more correct estimation

[...]
--=20
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin

--oFpnxODLjRhXBEXQ
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ9N6QgAKCRBhHseHBAsP
q1zmAJsFj+MsfQ6WFfx2eKvaEg1XYgQu9gCglyWTSa1enw8sOD3PNCwUjQ6w8F0=
=egez
-----END PGP SIGNATURE-----

--oFpnxODLjRhXBEXQ--

--===============6812902841956994951==
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".

--===============6812902841956994951==--