From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 7AA584AE83 for ; Fri, 18 Jul 2025 21:45:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C6EFA68DEAE; Sat, 19 Jul 2025 00:45:24 +0300 (EEST) Received: from relay15.mail.gandi.net (relay15.mail.gandi.net [217.70.178.235]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id DC30F68CCDD for ; Sat, 19 Jul 2025 00:45:16 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0EFFD43142; Fri, 18 Jul 2025 21:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1752875116; 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=G3i5wz7n0gCRGO6XCoxSj3the3Eu/nv7prWn2FaLMgE=; b=Hgm2E+eQmhGzjTnfAlqeE/VMzWXNJKxWlQaSBv8umZenMAKW3BfvsYxn9XJmNzWXSMf9JS 0YEBePZypJS2gU319AXLt1VMa6tE6E04zV8kPIVQEXEeeTzkuiHmwHFLDFEuhDuYoe+LhZ 1Wgt6UwugamaZo7mNKRIGYobFWvCiximUBmiHmqFXjv0hJYDFcpoj1SSjAb74cseyPYwG/ L/O/au/Vm5PEpL9hqCfJIhj7Uf/qyHsmuTohCCzA8gc2xKNwVTw7fX5M/Eu4NgFBbNohan udyCnSEK/ZzUEkCoiryt2G6C9JF0Fp/rOZozhKBpAgZ9y7ccU8WPipZtECfMyQ== Date: Fri, 18 Jul 2025 23:45:15 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250718214515.GM29660@pb2> References: <20250715174216.1072891-1-bernat.arlandis@gmail.com> MIME-Version: 1.0 In-Reply-To: <20250715174216.1072891-1-bernat.arlandis@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeigeehjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeltdeihedthfeutdfhgeejtdelvefgudffuddvudffgfdthedtudegudeihfejtdenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepvddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhgpdhrtghpthhtohepsggvrhgrrhhmrgeshhhothhmrghilhdrtghomh Subject: Re: [FFmpeg-devel] [PATCH] libtheoraenc: Set encoding speed level from compression_level 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: Bernat Arlandis Content-Type: multipart/mixed; boundary="===============7087485982448582966==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7087485982448582966== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PfnjSQX0xBMWim/8" Content-Disposition: inline --PfnjSQX0xBMWim/8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Bernat On Tue, Jul 15, 2025 at 07:42:16PM +0200, bernat.arlandis@gmail.com wrote: > From: Bernat Arlandis >=20 > --- > libavcodec/libtheoraenc.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c > index eb94458639..ac6653fac8 100644 > --- a/libavcodec/libtheoraenc.c > +++ b/libavcodec/libtheoraenc.c > @@ -244,6 +244,17 @@ static av_cold int encode_init(AVCodecContext* avc_c= ontext) > return AVERROR_EXTERNAL; > } > =20 > + // Set encoding speed > + if (avc_context->compression_level !=3D FF_COMPRESSION_DEFAULT) { > + int max_speed_level; > + int speed_level =3D avc_context->compression_level; > + th_encode_ctl(h->t_state, TH_ENCCTL_GET_SPLEVEL_MAX, &max_speed_= level, sizeof(max_speed_level)); > + if (speed_level > max_speed_level) { > + speed_level =3D max_speed_level; > + } > + th_encode_ctl(h->t_state, TH_ENCCTL_SET_SPLEVEL, &speed_level, s= izeof(speed_level)); > + } If you want to, you can add a AVOption table with options matching the names of libtheoraenc See any other encoder that uses AVOptions If the intend is to use compression_level instead, thats ok too and ill apply the patch as is then thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 2 "100% positive feedback" - "All either got their money back or didnt compla= in" "Best seller ever, very honest" - "Seller refunded buyer after failed scam" --PfnjSQX0xBMWim/8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaHrAZwAKCRBhHseHBAsP q2f+AJ9VKnZy5iBMWYgsXEtbJG6X/cLCdQCeJtuvzlRobpQCtBBt/a0CPu+JxUk= =PcdV -----END PGP SIGNATURE----- --PfnjSQX0xBMWim/8-- --===============7087485982448582966== 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". --===============7087485982448582966==--