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 D79DD4B987
	for <ffmpegdev@gitmailbox.com>; Thu, 27 Mar 2025 11:39:06 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DA2F3687BF0;
	Thu, 27 Mar 2025 13:39:01 +0200 (EET)
Received: from EUR02-AM0-obe.outbound.protection.outlook.com
 (mail-am0eur02olkn2030.outbound.protection.outlook.com [40.92.49.30])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2381B687B99
 for <ffmpeg-devel@ffmpeg.org>; Thu, 27 Mar 2025 13:38:55 +0200 (EET)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=vSW8rYgyA9U18hVamW9d7IY7Bm0ZfQkbxoNCDBmNF7BLW3/jYJke5spTL1gN/o0wZDDJkVWrG1jaaZzJP0rJ6lZnWxmjF5KCj1r1Y0QC0nDAXVIDkMjWbsNowzHOxnYgJwJMwJVrYq+AoZV3Y/6XHyDq1raVykAHg/E6KId/AfG4EDtU0X4YYX2BTjpmuVrvDPfo8SflSgHkcYL1DdapsfWqfFgzLx+2+4e21raB/11dMlywQ0F1MvL5H34aM4brR532tDY7Qck7b/K0IOyLQJ5+w0/JdC0pgLzVkU3JpjBsbkZoP+Z3BRARM93flEzjfRdEQ1YnIGYt6YU5LGRi4A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=fjRC/d5+9eOMXYpFFAoQge+Vm/WL016kGs7ttTGTDZg=;
 b=kfSfXy5OHexKDG/V0isUliEkUXWs7fk1vl4baxtcjN+B8zp778I9dHqj+Rxdtap5euHvGCvu2g3gKwAVeeDD3DF72QLEZL9ycv3SGuGlvkOeeAbI51XH48VVHHeWEsabomnui6vDXuPBZTRRG1CGeqjRw4yPfVYHE9mKT4H25KvG+7OOni2wx/DW5xwn039E88igaEieOGar3kZ4O13W7PlQQDfwtclILwBwGQzuq/2wX/PnscUVsLhdLlcRCJtzDTrPnjx0LYsQv0xJS40si9lZrAONJPcBuEWv7pkaR45EzoXz/Wj9DKrFk2A0/Nln3LO4au+xlTjSH8RsvHupow==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=fjRC/d5+9eOMXYpFFAoQge+Vm/WL016kGs7ttTGTDZg=;
 b=JTLWvENpKNW+I8WZMMOSPR3KysOKXovQ8QPguF3Q45ge8zgg5usNvlw2lcvH8GCO75+AxTwjlaKbzgNyX/Qg2qQfVWTmOO/dyXZX1yQb0KiOs8clvDagLkcVJz1OHejyo3Ml1NzeOQ/bz02pWv1wJRURU+UNd48kEwuAUyJ9O2bk2mp2LZv8flR78/SCEXag7A8/zyDPB05Ls5Mk/QcvVJ21Zq66qvJ9iWucr5ZkgnfrPQaHkOynR92YC4gTExf3LrUapAO4TBakkJVm3JFkZ5iqlZCeTIvZ88AOTFaFF6Z0kVJ1j+wV2yZRcmPInlKqjp2CGC/WixQD9gHRA9GDPw==
Received: from GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8b::16) by
 AS8P250MB0395.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:377::14) with
 Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.8583.26; Thu, 27 Mar 2025 11:38:53 +0000
Received: from GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM
 ([fe80::2e14:af18:9569:bc54]) by GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM
 ([fe80::2e14:af18:9569:bc54%5]) with mapi id 15.20.8583.023; Thu, 27 Mar 2025
 11:38:53 +0000
Message-ID: <GV1SPRMB003641AC21E1C022DA272EDC8FA12@GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM>
Date: Thu, 27 Mar 2025 12:38:51 +0100
User-Agent: Mozilla Thunderbird
To: ffmpeg-devel@ffmpeg.org
References: <20250326040856.71D62412944@natalya.videolan.org>
 <20250327011637.GC2448403@pb2>
 <GV1SPRMB00366620CF8F282D3BBF97638FA12@GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM>
Content-Language: en-US
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
In-Reply-To: <GV1SPRMB00366620CF8F282D3BBF97638FA12@GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM>
X-ClientProxiedBy: FR5P281CA0032.DEUP281.PROD.OUTLOOK.COM
 (2603:10a6:d10:f3::6) To GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM
 (2603:10a6:150:8b::16)
X-Microsoft-Original-Message-ID: <c09a436f-e23c-4d11-99a1-9d545aa33c23@outlook.com>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: GV1SPRMB0036:EE_|AS8P250MB0395:EE_
X-MS-Office365-Filtering-Correlation-Id: 8592e778-4966-442b-e117-08dd6d23f33b
X-Microsoft-Antispam: BCL:0;
 ARA:14566002|461199028|7092599003|15080799006|8060799006|6090799003|5072599009|19110799003|10035399004|3412199025|440099028|41001999003;
X-Microsoft-Antispam-Message-Info: =?utf-8?B?WG9kbXJyQ00yNEEycWlZYVczYTY3SXNwNmhOaWFnUFZvQzZ5aH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CN2gwWUdrYWFaV2JScHg0UVpldHFr?=
 =?utf-8?B?SStVMWs4WW9YNGxyQzBxNnROekFMRVEvUXlvRkN4bE1Sa3FTYVRvMmFmZDEv?=
 =?utf-8?B?R09FRElMK3hDK01XSmNKUT09?=
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8592e778-4966-442b-e117-08dd6d23f33b
X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2025 11:38:53.1718 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P250MB0395
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: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/GV1SPRMB003641AC21E1C022DA272EDC8FA12@GV1SPRMB0036.EURP250.PROD.OUTLOOK.COM/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

Andreas Rheinhardt:
> Michael Niedermayer:
>> On Wed, Mar 26, 2025 at 04:08:55AM +0000, Andreas Rheinhardt wrote:
>>> ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | Mon Mar  3 02:36:55 2025 +0100| [24dbc4c2e82481f89d6fcacee1949e5038c5c2fc] | 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=commit;h=24dbc4c2e82481f89d6fcacee1949e5038c5c2fc
>>> ---
>>>
>>>  libavcodec/mjpegenc.c | 24 ++++++++++--------------
>>>  1 file changed, 10 insertions(+), 14 deletions(-)
>>
>> Breaks: (did not investigate why)
>>
>> ./ffmpeg  -i lena.pnm -strict -1 -s 4096x2048 -bitexact -y /tmp/file-4096x2048.m2v && ./ffmpeg -i /tmp/file-4096x2048.m2v -y -bitexact /tmp/file-4096x2048-dec.jpg
>>
>> [vost#0:0/mjpeg @ 0x5576d6b7ab00] [enc:mjpeg @ 0x5576d6b79580] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
>> [vf#0:0 @ 0x5576d6b7f140] Error sending frames to consumers: Cannot allocate memory
>> [vf#0:0 @ 0x5576d6b7f140] Task finished with error code: -12 (Cannot allocate memory)
>> [vf#0:0 @ 0x5576d6b7f140] Terminating thread with return code -12 (Cannot allocate memory)
>> [vost#0:0/mjpeg @ 0x5576d6b7ab00] [enc:mjpeg @ 0x5576d6b79580] Could not open encoder before EOF
>> [vost#0:0/mjpeg @ 0x5576d6b7ab00] Task finished with error code: -22 (Invalid argument)
>> [vost#0:0/mjpeg @ 0x5576d6b7ab00] Terminating thread with return code -22 (Invalid argument)
>> [out#0/image2 @ 0x5576d6b7ec80] Nothing was written into output file, because at least one of its streams received no packets.
>>
> 
> Patch attached. Thanks for testing.
> 
> - Andreas
> 

Will apply soon unless there are objections.

- Andreas

_______________________________________________
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".