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 A9B3B4C9F8 for <ffmpegdev@gitmailbox.com>; Sat, 12 Apr 2025 00:05:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D43AB68C360; Sat, 12 Apr 2025 03:05:23 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A7FB468C1EB for <ffmpeg-devel@ffmpeg.org>; Sat, 12 Apr 2025 03:05:17 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D55BE431BA for <ffmpeg-devel@ffmpeg.org>; Sat, 12 Apr 2025 00:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1744416317; 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=MgABKs+YURjPJaZfWBXFJOtr9U35vh/+GDX8eeBFKyE=; b=JFIhIDooo7McXUDo4mcd8U8Gly+pQ4gJCxMZ8+j8AU5ftdEu713RZG+te9yF7+vAGlDHvy o2RU8EHWUyK+tIjhl2MNfxri93VjNhtC6rI1p3ReRslnxxUoYRYTiP99AoNLqrpDOqKCUX jgq5V9nqVWqFgkspDnXxGyLxCYIQjuWgBO/ucrbhmMqkjera4HodyMTqVDTG6CpnahukdQ 5jTyhKNruVzCA9hpT31Rqn3DOs83aBMoT68ZnhygbjIHt4hd2fSS9FggIapYlP6AMpMPrN 7R/u5bC22sGZCSKwkA6DyfTq1xizJWETwSGfpDaQ9zqmmAHFNdi3gLhWaY9dAQ== Date: Sat, 12 Apr 2025 02:05:15 +0200 From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Message-ID: <20250412000515.GE4991@pb2> References: <GV1P250MB0737BE52BE6C5EC55132C3D58FB62@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> MIME-Version: 1.0 In-Reply-To: <GV1P250MB0737BE52BE6C5EC55132C3D58FB62@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvudefvdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/asvenc: Don't use FF_INPUT_BUFFER_MIN_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="===============5044276482906255326==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250412000515.GE4991@pb2/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> --===============5044276482906255326== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IPApkKApejXV3Qay" Content-Disposition: inline --IPApkKApejXV3Qay Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 11, 2025 at 08:57:09PM +0200, Andreas Rheinhardt wrote: > Patches attached. >=20 > - Andreas > asvenc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > f02ccdc5e7ec0835b2af195734590d1e3f294d33 0001-avcodec-asvenc-Don-t-use-F= F_INPUT_BUFFER_MIN_SIZE.patch > From e2ca8a7268f0d6071d170b1d99e5a264392e1b2e Mon Sep 17 00:00:00 2001 > From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > Date: Fri, 11 Apr 2025 00:36:59 +0200 > Subject: [PATCH 1/2] avcodec/asvenc: Don't use FF_INPUT_BUFFER_MIN_SIZE >=20 > ASV-1/2 does not really have a header and so using > FF_INPUT_BUFFER_MIN_SIZE is wasteful as well as ugly ok > (such bounds should be codec-specific). If the time this costs cannot be used for more valuable work [...] > asvenc.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > 32d062bcc89be62b21c93f9d4e9005b195206aa8 0002-avcodec-asvenc-Use-tighter= -MAX_MB_SIZE-constant.patch > From 653e8d3da311b56914fb8888e80b56507ee5fe38 Mon Sep 17 00:00:00 2001 > From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > Date: Fri, 11 Apr 2025 00:38:59 +0200 > Subject: [PATCH 2/2] avcodec/asvenc: Use tighter MAX_MB_SIZE constant >=20 > Also document the constant. >=20 > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavcodec/asvenc.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c > index e7d931cca9..52666ee547 100644 > --- a/libavcodec/asvenc.c > +++ b/libavcodec/asvenc.c > @@ -50,6 +50,14 @@ typedef struct ASVEncContext { > int q_intra_matrix[64]; > } ASVEncContext; > =20 > +enum { > + ASV1_MAX_BLOCK_SIZE =3D 8 + 10 * FFMAX(2 /* skip */, 5 /* ccp */ + 4= * 11 /* level */) + 5, > + ASV1_MAX_MB_SIZE =3D 6 * ASV1_MAX_BLOCK_SIZE, > + ASV2_MAX_BLOCK_SIZE =3D 4 + 8 + 16 * (6 /* ccp */ + 4 * 13 /* level = */), > + ASV2_MAX_MB_SIZE =3D 6 * ASV2_MAX_BLOCK_SIZE, > + MAX_MB_SIZE =3D (FFMAX(ASV1_MAX_MB_SIZE, ASV2_MAX_MB_SIZE) += 7) / 8 > +}; beautifull thx [...] --=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 --IPApkKApejXV3Qay Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ/muNAAKCRBhHseHBAsP q9s2AJ0boK7GP5qu76JYoKSr1cM8pqLt6wCgmMzwMbF/6DT2PWZ+ZGUYDn1iZLg= =uvqj -----END PGP SIGNATURE----- --IPApkKApejXV3Qay-- --===============5044276482906255326== 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". --===============5044276482906255326==--