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 0D7FC4ABCE
	for <ffmpegdev@gitmailbox.com>; Thu, 27 Mar 2025 17:56:04 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 57D59687C6F;
	Thu, 27 Mar 2025 19:56:00 +0200 (EET)
Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net
 [217.70.183.198])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DFBDB687BA3
 for <ffmpeg-devel@ffmpeg.org>; Thu, 27 Mar 2025 19:55:53 +0200 (EET)
Received: by mail.gandi.net (Postfix) with ESMTPSA id 146FC4426B
 for <ffmpeg-devel@ffmpeg.org>; Thu, 27 Mar 2025 17:55:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc;
 s=gm1; t=1743098153;
 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=qJKVcSdlkLcLj14PSHSVX+HBytR+GrRtJH/IsuCG1XM=;
 b=OfA4+0lqgxLwbQzF6RFCaPFdlJCPp1mpfHAlL7X009DZrPHMNpsirkQKBhW6Exs5MhvXkn
 kGmH1d+AWjwX7qIjuzEHxb5qfCeWVPKmFhH3Qzonx08G5B0LYdwPe1DssEaGZyBNgcH0mz
 k3A8AKSjREpLt0gbYmv19+Xlp4I9I5idbtSIZ06JVJBPpKFlxtwMBKpm8imi9PrXvZBIYz
 YLvmBnIupi1dvRUwsgPQ5yz3GA2dsqXYJFzWSYp7Ndfc37ygPTxca5G0bc3cn7LHsaqfA/
 JVEamBmtTX9M4vg64z9x5AsCc6DZvMy7Iqqx6TCU1o7/7IoO6Ddbem+5eVfhEQ==
Date: Thu, 27 Mar 2025 18:55:52 +0100
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <20250327175552.GD4991@pb2>
References: <20250326040856.71D62412944@natalya.videolan.org>
 <20250327011637.GC2448403@pb2>
 <GV1SPRMB00366620CF8F282D3BBF97638FA12@GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM>
MIME-Version: 1.0
In-Reply-To: <GV1SPRMB00366620CF8F282D3BBF97638FA12@GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM>
X-GND-State: clean
X-GND-Score: -90
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeltdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculddutddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegvddujeffkeehffetgfdthfefudffheejheetgffghefflefgteffueehhfevheenucffohhmrghinhepvhhiuggvohhlrghnrdhorhhgnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh
X-GND-Sasl: michael@niedermayer.cc
Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/mjpegenc: Simplify
 allocating huffman table
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="===============5364863208222969789=="
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250327175552.GD4991@pb2/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>


--===============5364863208222969789==
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="irPdIx+ijqX1VHyr"
Content-Disposition: inline


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

On Thu, Mar 27, 2025 at 03:12:57AM +0100, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > On Wed, Mar 26, 2025 at 04:08:55AM +0000, Andreas Rheinhardt wrote:
> >> ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt@outlo=
ok.com> | Mon Mar  3 02:36:55 2025 +0100| [24dbc4c2e82481f89d6fcacee1949e50=
38c5c2fc] | committer: Andreas Rheinhardt
> >>
> >> avcodec/mjpegenc: Simplify allocating huffman table
> >>
> >> Reuse the already computed value of macroblocks; use an array
> >> instead of a switch, evaluate 64 * sizeof(MJpegHuffmanCode)
> >> at compile-time.
> >>
> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> >>
> >>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=3Dcommit;h=3D24dbc4c=
2e82481f89d6fcacee1949e5038c5c2fc
> >> ---
> >>
> >>  libavcodec/mjpegenc.c | 24 ++++++++++--------------
> >>  1 file changed, 10 insertions(+), 14 deletions(-)
> >=20
> > Breaks: (did not investigate why)
> >=20
> > ./ffmpeg  -i lena.pnm -strict -1 -s 4096x2048 -bitexact -y /tmp/file-40=
96x2048.m2v && ./ffmpeg -i /tmp/file-4096x2048.m2v -y -bitexact /tmp/file-4=
096x2048-dec.jpg
> >=20
> > [vost#0:0/mjpeg @ 0x5576d6b7ab00] [enc:mjpeg @ 0x5576d6b79580] Error wh=
ile opening encoder - maybe incorrect parameters such as bit_rate, rate, wi=
dth or height.
> > [vf#0:0 @ 0x5576d6b7f140] Error sending frames to consumers: Cannot all=
ocate memory
> > [vf#0:0 @ 0x5576d6b7f140] Task finished with error code: -12 (Cannot al=
locate memory)
> > [vf#0:0 @ 0x5576d6b7f140] Terminating thread with return code -12 (Cann=
ot allocate memory)
> > [vost#0:0/mjpeg @ 0x5576d6b7ab00] [enc:mjpeg @ 0x5576d6b79580] Could no=
t open encoder before EOF
> > [vost#0:0/mjpeg @ 0x5576d6b7ab00] Task finished with error code: -22 (I=
nvalid argument)
> > [vost#0:0/mjpeg @ 0x5576d6b7ab00] Terminating thread with return code -=
22 (Invalid argument)
> > [out#0/image2 @ 0x5576d6b7ec80] Nothing was written into output file, b=
ecause at least one of its streams received no packets.
> >=20
>=20
> Patch attached. Thanks for testing.

this fixes the issue

thx

[...]

--=20
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The difference between a dictatorship and a democracy is that every 4 years
the population together is allowed to provide 1 bit of input to the governm=
ent.

--irPdIx+ijqX1VHyr
Content-Type: application/pgp-signature; name="signature.asc"

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

iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ+WRJQAKCRBhHseHBAsP
qyZ2AKCTMryHOXka9Gk8FJ+6dBRz5j8g2ACcD2Z6EbY6jM0l5TZuv6nGPGjMjAs=
=1/LX
-----END PGP SIGNATURE-----

--irPdIx+ijqX1VHyr--

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

--===============5364863208222969789==--