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 ESMTP id 1965743E09
	for <ffmpegdev@gitmailbox.com>; Sat, 15 Oct 2022 00:25:00 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B487568BD50;
	Sat, 15 Oct 2022 03:24:57 +0300 (EEST)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com
 (mail-oln040092074012.outbound.protection.outlook.com [40.92.74.12])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D140A68BB80
 for <ffmpeg-devel@ffmpeg.org>; Sat, 15 Oct 2022 03:24:49 +0300 (EEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=f7EeSZ3VGWziU7EbBWSTd/wps7ZJ2alB4+p6X1Q0lIPgK5tXZhRb7/IYfEIzVTy6P0Pikgvda0DYgwAvrWNOuVDg30HOnXMsBzq+Z6dOK22DlQ8BOo68WUDAknG9XfHNEDz9UqwxyLGEmRauOh9QUhqg0qe5e7AR2SkhlQ8nSgy2QFpcOLXMg6LSqWBkYm0G+4Kmn1q627mS6J0ZWTSe8oD3sHunM9NUaoUzDUm8TdN6ViZAA1pcwv90DKlQLVVIIBzdpPm1DNGIqo03GLP/OJ8kBfZhzQ8htpHYdLaYps+zw1CFyrIQx2yEXHfoHrNoMqGYCDnuV0wRJ2GodlI4Xg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 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=nsKHbzAeoVdxkcjF+YSCAnOhQhXp2jqQoYOSKDhl1Bk=;
 b=i2vsm4BbPt/DSUmxtrG2AytjQbDsGxQLgAIumF8A+UklSCJGbhMakBTmv1dmcZ9jvIBcGm+VrwBtpkDfOppmbaZtQw8GDKsOPULowithDH/ry+GFSK98BePmSlu7Sjkqj9vJavPhdIfspLzwF0USRpcosAD2N4dYIEwZ4kOmmH9dMx7TgceBKw7yosKn19JhePq7O9QtU5J2pr1tNNJlK93Su/833pZgeVa9HXjfYw0FgEOhAyUX6FK4hI6rsecg8iaMPryDqm3jq6LHlweZhhNy1AbK0zhG4cr5m8THmpYCEQYXj1JWKShRIKDhWMZPH8fhtOvzTC9mPHut+ywyNw==
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=nsKHbzAeoVdxkcjF+YSCAnOhQhXp2jqQoYOSKDhl1Bk=;
 b=lk9vZ0BrLfAXe0xfW3twPXjDA0ckwGcj3v74qXnc/in6pOWVI3QQ2qFQa+VqBIFY/Q8Kw3VyPB0kdnX9WKiHtCwvhmOdacNzC4NkroF2Hpe6X0KIuXhLg4v7HN7q2y+Sc/ske4DioNGCS8Ihc9N5TD9ens38fbJgGCcUgmbqmnXnDBVaA2iSNxz+hVCCZxe8okjPGUNZno/4F1Y1r754muKBdZmtdI0erPWdsgO+1NbBAN/yrW1pUW41CSarOUgyfTtqKMyWi9+mTUXt3S6l/xszPWzQAIQzJ3MMVpJLPGArJpSbaUGCRY20rMWELtG4XyIf0SLQNsh3SZp65jVJfA==
Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14)
 by AM8P250MB0199.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:326::16)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sat, 15 Oct
 2022 00:24:48 +0000
Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
 ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
 ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Sat, 15 Oct 2022
 00:24:48 +0000
Message-ID: <AS8P250MB0744FFEB8876FCEB4D533C4E8F279@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
Date: Sat, 15 Oct 2022 02:24:57 +0200
Content-Language: en-US
To: ffmpeg-devel@ffmpeg.org
References: <5781e37ed86f8c9554a5754103d6a7ea5dcd6661.1665728570.git.pross@xvid.org>
 <AS8P250MB074446601FBE7BEB0B1971438F249@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
 <Y0n0bHKahL9m49ty@b3f2f4f02429fd693cede1faeaf102ce>
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
In-Reply-To: <Y0n0bHKahL9m49ty@b3f2f4f02429fd693cede1faeaf102ce>
X-TMN: [l+/Ra9H/KZrezoble/HVPAYJUeZXdM4dyTD+Mr9f7TQ=]
X-ClientProxiedBy: FR3P281CA0129.DEUP281.PROD.OUTLOOK.COM
 (2603:10a6:d10:94::17) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
 (2603:10a6:20b:541::14)
X-Microsoft-Original-Message-ID: <9cd4f1c2-6e4a-0411-71fe-eff037c7becd@outlook.com>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AM8P250MB0199:EE_
X-MS-Office365-Filtering-Correlation-Id: 57c92766-a979-4187-66c0-08daae43aaf3
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: 1fkD1r9O2XDRWY4yPguY/H/YvY9vGvNiNOS7LKP6uncCUnFu05icdU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1cVVyMlhrRkpBa1FMd0FLRlBkVFNtUVVFNFA4NlkvRkx6TlVPS05I?=
 =?utf-8?B?NS9MSjNWK1NoNjE2OXg1RjF4bjcyUCsrbFQrZnIzbHM5M0Fzd1A1cnNOZ1FG?=
 =?utf-8?B?cmtFaVRNUmRsT3ZrdVVSeThzRHE0MjkvSDRTbGFkTzhFNEd2Q2RaR0xZU3RI?=
 =?utf-8?B?VUZocXdPTkptYzA0R21XcnNZaGNTcjkvL2ZRbkxTWHR0bnNLV2hsMlk4Vkkw?=
 =?utf-8?B?ODA4SzRZZnVVbWhBZjFybDg4SGpBeHJod3RyMFIyTEJJSllKcHgyaVJiZVNz?=
 =?utf-8?B?a0dJc0V2RDVXVmtoaG9WUzV2ZFg2V1A5VDJ5ZUZYdzVqd3FuTCtrYVRicmhy?=
 =?utf-8?B?RVowSWljaU9OOWdOYWFzZWJ0aStrL0lMcmlUcm9KT0lubnRhRG1pQ25zc2wr?=
 =?utf-8?B?MmtudHB2TUZmWU1MaGRybTl4OVZPVkNieHBCYWRzaGl5N1JiNU5QSGVhMDlh?=
 =?utf-8?B?ckNadTVoUVlQa256REFFdUZoREV3Z0dFU1VGVE9ybm9aYzZiWUJJZktlc0RN?=
 =?utf-8?B?ZmFwWnNUSnU5ZzhORGkyekZYcVpjcGM4anJtK1BJN2c3eG5IVk5ic2RUK003?=
 =?utf-8?Q?a4f7oXCNPGj1s9KfcIdghKukiDyg4Rc02+y5wGc?=
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 57c92766-a979-4187-66c0-08daae43aaf3
X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2022 00:24:48.2353 (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: AM8P250MB0199
Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/jpegtables: remove duplicate
 luma and chroma quantization tables
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/AS8P250MB0744FFEB8876FCEB4D533C4E8F279@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

Peter Ross:
> On Fri, Oct 14, 2022 at 05:19:44PM +0200, Andreas Rheinhardt wrote:
>> Peter Ross:
>>> Duplicates of the standard JPEG quantization tables were found in the
>>> AGM, MSS34(dsp), NUV and VP31 codecs. This patch elimates those duplicates,
>>> placing a single copy in jpegtables.
>>> ---
> 
>> 1. mss34dsp now uses jpegtables, yet it does not have a dependency on
>> it. Instead you seem to rely on all the users of mss34dsp to have a
>> dependency on jpegtables, yet this is not true for all of them. You will
>> get linking failures with --disable-everything --enable-decoder=msa1.
> 
> there is a OBJS-$(CONFIG_JPEGTABLES) += line in avcodec/Makefile that
> takes care of this. i tested this patch under few different configurations
> and observed no build errors.
> 

I am sorry, I missed the '+mss34dsp_select="jpegtables"' line from your
patch. So my first sentence above was simply bullshit.

>> 2. The fact that you need to add jpegtables to configure for almost all
>> components that use the jpeg quant tables means that it is not really
>> appropriate to put the jpeg quant tables into the same files as the jpeg
>> huff tables.
>> 3. The jpeg huff tables are duplicated into libavformat for shared
>> builds (because the overhead of exporting them exceeds the size gains
>> from not duplicating them); yet when one uses --enable-shared and
>> --enable-static at the same time, it might be that libavformat.a is
>> linked to libavcodec.so and therefore has no access to libavcodec's
>> internal symbols like the jpegtables, so we have to duplicate the
>> jpegtables into libavformat.a in this case. But if one links using
>> libavformat.a and libavcodec.a with both containing the jpeg huffman
>> tables, then one will get a linker error with this patch: The jpeg
>> huffman tables in libavformat will be pulled in by the libavformat
>> component needing them. With this patch libavcodec/jpegtables.o will
>> also be pulled in. But it also contains the jpeg tables already provided
>> by lavf/jpegtables.o, so you will get a multiple definition error.
>> In contrast to this, before this patch, lavc/jpegtables.o would not be
>> pulled in, because all dependencies to the mjpeg huffman tables will be
>> satisfied by lavf/jpegtabes.o.
>> So to summarize: If one duplicates stuff in multiple libraries, the
>> object files must really provide the exact same symbols; not more, not less.
> 
> wasn't aware jpegtabs.h was duplicated into libavformat.
> 

I said so on IRC yesterday. It's the reason the jpegtabs header exists.

>> The last two points imply that these tables should be moved to a file of
>> their own. Btw: I don't think that a configure subsystem is appropriate
>> for this (a single file with some tables is not really a subsystem);
>> actually I don't think that the current jpegtables subsystem is
>> appropriate at all.
> 
> will do
> 

If you do, please mark the declarations as internal so that the compiler
still knows that these tables are in the same DSO.

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