From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 9874D4208A for ; Wed, 15 Dec 2021 12:37:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 19AC468B11A; Wed, 15 Dec 2021 14:36:16 +0200 (EET) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067045.outbound.protection.outlook.com [40.92.67.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7E2B668B0F0 for ; Wed, 15 Dec 2021 14:36:06 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SqqDkKEaOxYfcHVqtgBIO1dAuU9NnAGgUW73r7h9h7bbCmQvESufU149nX1I3fLNmnkqrD72EzZQ6rd8hTTu5a+63SLEgRwomRZ/w7SnXpE29zBdSOJoAC6G1ag6yOqFLWZy22/1fhquZoTlYuunF0V8hRNHybjKIU+0XjIjDVA1tuFQ/GXezryHR3yUPNHZ0ugWtZIhvpKaS6Jfsl1EsEmFWBUGEn16M0WzZw4PSTzbzPs8zhtV+2L6VSHCSrFwZKMxgIP5nEzOAXKPJ8BGoCy8l785LNfKGVCwQxkeK10FQZNW3kbIGWgpxIjPwdiNEJPQJqy3tA/w4PJ7uPuBaA== 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=N1LAsml2YVm3NkWZ5Sp3eNMXJFvWH0ueW0iuejVAboA=; b=EKz5ejhpVdUkXNiV0GymLv4bKga2rBLZIlCCl9Zj9KFBLvFSPMQS7rhCRiZ4S3okDHCA1gCjn4kMu36OxImRgwniuCHE81D4u8oMHMOse2grhZqwVuvutvpgJeIeds9l47ElyqWruWHyK2gAtS/NNbu5gtpdBxnB1jnKJBRl27X63QuiQVrW8sdJuLSijnguylXq2SHrjkrLWi1+dM98mNR451RuNCe+4OSDqFAjuhQNJ7eWi5uRxG9TH/BDE/tHBYPH3UIQd/f0whfJURXN8+G1JTOSctjloHR+uNbdSghaAXbXY9Zp+9z44xi+wc2SuTO0UOfPKnRp8hO8rPDXVA== 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=N1LAsml2YVm3NkWZ5Sp3eNMXJFvWH0ueW0iuejVAboA=; b=JWXHuD1rXccahwB2F/YNtE3H5IRQfRWHwWMVP//q2YQaUSNLSFTNHHi6W1lnlhXvmW3ISuyaN9IHZ3K2Kvv97GF39QFhFRg8FPctaIDcTcYRz4buuRxAOPuPEDgjx/E+qjMp+YBJWyVqJXbopE5lwDWLFU/Vi7ggRGuw2j+zdYSOOnLlNlQDKVrRglTYFV307NRBinN+QGsP51R4VL9DMnQenL30J20kiZHya1BORXSuslxbWc9TGjMGFQphvkwmC5K604HaDEdrepmgDNxC8RYXFE441mHvgtIjc02V2E5mOLGoi+PRxo9hi5dbATX59dwpMBiXb6GopQDdR2+cDw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4952.eurprd03.prod.outlook.com (2603:10a6:20b:8a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Wed, 15 Dec 2021 12:35:54 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%6]) with mapi id 15.20.4778.018; Wed, 15 Dec 2021 12:35:54 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 15 Dec 2021 13:35:35 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [U4Fqfm5++sld0jvmcHeV6+NWl4YY3AKO] X-ClientProxiedBy: AM0PR08CA0014.eurprd08.prod.outlook.com (2603:10a6:208:d2::27) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211215123541.5406-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1836fab-9335-4012-b4ba-08d9bfc76f79 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UJ+cHfC79vTguh6WqLpD1ahmrhZc+sv5AjJ/7p1oAUXuRulPkRYA1QDloIW+UF7Yk+naj5iLHouxO6Qhh3f7Wx7hyVZiVIUfyWEO5wAWJKkSNyX+r5n3j8RTwTO9Shtd0jzkwZiG2dsWJ6vfVvlN5frsdO+aBoXhberi7/O13qPj5x28le66Alk3LHVHha9rwiPz1oobxS1unhuhscmXfW13Si0+a6yBUByixs03Pq3vBPrioqEvz+AGPrYbTSZqWTFqGToqbDijD3OCk8h6ICslwVL1GCMLQSYvmgJq7cSNCjKOISbDQSgKnxmLE5gYOm6VoxCj/J5rfif6k2vs91icQCMd8qbDZyIzPZ42B9x0AkElV2qIlKGd5JiVRb/igZiyhHDQVz7OvWkGaHa5+RDBp/YLnRZIHhZzb/JmA3vF8YFHt57SPrSez3Jb64WTJkzaK59vJjLXruxXo8AvapWH3zNS38T9sj6m4bCep9llnwEj+dvBMV2r3RSXTd5+RiLAumN/QWZHvyIFvjHFHktL5bTQ9ShyT2Rap6RZ6NDvYan37jO/bVrLS9/uGnC7GAHQsUowheZXiFqvruXjGZhcvKbtb0OXYEQRVWN6QyIE9Xyw70w3NFO9E3j4zoEvj/0hKQ4GdALtJ044PegBR3ek2pwcxSPYdu40zocfceiAp25MUSg1ZUyy1kkdgK4zNqULGqgnMJCaQ== X-MS-TrafficTypeDiagnostic: AM6PR03MB4952:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U3asW6UXRsChqw5vNYIbT9k9VlKSdEmnMQ++ZxUqg+glJ+DbyDbJyTT2MGIJLtKP3qFiSbb9NSGpCEcSwyBjNRoeGALuNxG4xDy6FYgcsWdgzysPA0pQYERyfyPbIipazpEZ2KtBdhrGwcDYRKrfZOQdM4qX8pYzXRvnXtdyA6oPyQShUq32o7g6p+SdQHDBatS7fJZ3jD097xUwZIhIqSktFxIC2R/BOt1smzWttDf52MNKErTJ3vm4rLuVs3z8D7NWXkmYystvJc4qb/uh+SmfqMj8IEye+cwl0kG1ZbzupQyBrvVHkj/hTdNPNlr7Vw2c7i/TZiHieyr8+NWIgupp0FYXWxCisNGe/PubY08rxPqREIj+RMivAcMl0v4R/z3Hcf1zetKcE1wubnCi6d2ByB6njT9wNuppl7sCkUkhNeD6LkFCn4aXjCaSDn6hgqufCRPAhvQtgOUmGibaUo6B4cZNABWk95ldBJk0luTFo2NmFFtx8ZwfqCMk0NUkxatcC+FUsmCRHhMS9gfrC1dLvObulBrnx201u52ydk0swQe9pOoOxL3ELBCoNWRJmFHxz9QLQoSiQ9+ch+ftjg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ve6rwIffe1mNaxRGMfEgLRlhtCuB13qk8BdZZAgGogT2mxBCxLca6jFLNAr6?= =?us-ascii?Q?kwrVzN7la7/4wHdwKGEJKznYlOtIlxyWkNqAo1XD9/piM7aaLkDYxB/KvDoi?= =?us-ascii?Q?oLKGOQklczqhZQOjg+04YhrWG0YTmyb3sxGKKgqhcuUQoif+hVnJm6qgEbUZ?= =?us-ascii?Q?UvStYp29WjbRzH24Pc+Grh2Km5NBig8BRYz6PPIT3awbNpZe9GhKPzRQ1n77?= =?us-ascii?Q?7AdIVgN6mMQt/f8XDRY34Akka99VUeC9dtYnjt85Qx5gY1uCHskpxPHgfVNN?= =?us-ascii?Q?pMFpJD+tLN//Y2PS/YCeLarNwkaVpn0fiKjB5t9x/jgxVAKwFIfviGM+5Kre?= =?us-ascii?Q?8oVatz2AIGu7Oaum2e7yxh1bJZPH6Pp785CGtuoY7WF/jx827heZsI+EKtRX?= =?us-ascii?Q?ZepQFeafSXV8p6qP+EX0cvd61G8nu728k/S3OKQU5nE0wjOfGBOUSKPsMQNR?= =?us-ascii?Q?ersUor/SzPGwYeVFj0kn7DtBD5FbZ5IkCx20w5O48uC43giT1PaVFNAEkIU8?= =?us-ascii?Q?yD6ZYycLaanICpkEewIfYUw7xWmarTFndUpH39ZL4a8VUcnGMVsmOvOfwoNM?= =?us-ascii?Q?Lxr689M89r+BhJWmuv0GE2j8O6LE9Y3a7xJmfgp0c+bX1EAyRfALQUp88nhL?= =?us-ascii?Q?eeoZG/YeDvESevzIEel897fgI3FmmwsH0J523WqB3vEthMb41muULwVh36A0?= =?us-ascii?Q?h0YDVKlRnzRfu+Cb45da90AU/Ms+L0h1Ks1o5rVIm0O2XeXXFDZVw0EBBUZG?= =?us-ascii?Q?7LGl0eeJwYnQF0yhMJcbcvbEtioojvy3Jg+qgmk46/phZeXHKWZszxUIpoeN?= =?us-ascii?Q?0BVRJQjro1DldzKR0qHhaWA7geEdX1cHkIYsPcJs+vB7YXzNMcuFOxgEJ/bb?= =?us-ascii?Q?l6dDzleRCI82AV5BDeLfH9XH6qEu3bgwVQ3A7FA6Z+p6+YJ2hyjRObaU1QjE?= =?us-ascii?Q?9I3dTumvIhpNqMnnujEegg=3D=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1836fab-9335-4012-b4ba-08d9bfc76f79 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2021 12:35:54.1937 (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: AM6PR03MB4952 Subject: [FFmpeg-devel] [PATCH 05/11] avcodec/dca: Unavpriv dca_sample_rates 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: Andreas Rheinhardt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Said table is 64 bytes long and exported so that it can be used both in libavcodec and libavformat. This commit stops doing so and instead duplicates it for shared builds, because the overhead of exporting the symbol is bigger than 64 bytes. It consists of the length of the name of the symbol (2x24 bytes), two entries in .dynsym (2x24 bytes), two entries for symbol version (2x2 bytes), one hash value in the exporting library (4 bytes) in addition to one entry in the importing library's .got and .rela.dyn (8 + 24 bytes). (The above numbers are for a Linux/GNU/Elf system; the numbers for other platforms may be different.) Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 8 +++++--- libavcodec/dca.c | 7 +------ libavcodec/dca.h | 4 +--- libavcodec/dca_core.c | 2 +- libavcodec/dca_parser.c | 2 +- libavcodec/dca_sample_rate_tab.c | 25 +++++++++++++++++++++++ libavcodec/dca_sample_rate_tab.h | 33 +++++++++++++++++++++++++++++++ libavformat/Makefile | 1 + libavformat/dca_sample_rate_tab.c | 25 +++++++++++++++++++++++ libavformat/spdifenc.c | 2 +- 10 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 libavcodec/dca_sample_rate_tab.c create mode 100644 libavcodec/dca_sample_rate_tab.h create mode 100644 libavformat/dca_sample_rate_tab.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 36a1a1a4de..e4a547ffaa 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -275,7 +275,8 @@ OBJS-$(CONFIG_CSCD_DECODER) += cscd.o OBJS-$(CONFIG_CYUV_DECODER) += cyuv.o OBJS-$(CONFIG_DCA_DECODER) += dcadec.o dca.o dcadata.o dcahuff.o \ dca_core.o dca_exss.o dca_xll.o dca_lbr.o \ - dcadsp.o dcadct.o synth_filter.o + dcadsp.o dcadct.o dca_sample_rate_tab.o \ + synth_filter.o OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o dcadata.o dcahuff.o \ dcaadpcm.o OBJS-$(CONFIG_DDS_DECODER) += dds.o @@ -994,7 +995,6 @@ OBJS-$(CONFIG_MATROSKA_MUXER) += mpeg4audio.o OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o -OBJS-$(CONFIG_SPDIF_MUXER) += dca.o OBJS-$(CONFIG_TAK_DEMUXER) += tak.o OBJS-$(CONFIG_WEBM_MUXER) += mpeg4audio.o @@ -1003,6 +1003,7 @@ STLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o STLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o STLIBOBJS-$(CONFIG_MXF_MUXER) += golomb.o STLIBOBJS-$(CONFIG_RTP_MUXER) += golomb.o +STLIBOBJS-$(CONFIG_SPDIF_MUXER) += dca_sample_rate_tab.o # libavfilter dependencies OBJS-$(CONFIG_ELBG_FILTER) += elbg.o @@ -1098,7 +1099,8 @@ OBJS-$(CONFIG_BMP_PARSER) += bmp_parser.o OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o OBJS-$(CONFIG_COOK_PARSER) += cook_parser.o OBJS-$(CONFIG_CRI_PARSER) += cri_parser.o -OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o dca_exss.o dca.o +OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o dca_exss.o dca.o \ + dca_sample_rate_tab.o OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o dnxhddata.o OBJS-$(CONFIG_DOLBY_E_PARSER) += dolby_e_parser.o dolby_e_parse.o diff --git a/libavcodec/dca.c b/libavcodec/dca.c index b2152524a5..fb359b2ff3 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -33,11 +33,6 @@ #include "get_bits.h" #include "put_bits.h" -const uint32_t avpriv_dca_sample_rates[16] = { - 0, 8000, 16000, 32000, 0, 0, 11025, 22050, 44100, 0, 0, - 12000, 24000, 48000, 96000, 192000 -}; - const uint32_t ff_dca_sampling_freqs[16] = { 8000, 16000, 32000, 64000, 128000, 22050, 44100, 88200, 176400, 352800, 12000, 24000, 48000, 96000, 192000, 384000, @@ -112,7 +107,7 @@ int ff_dca_parse_core_frame_header(DCACoreFrameHeader *h, GetBitContext *gb) return DCA_PARSE_ERROR_AMODE; h->sr_code = get_bits(gb, 4); - if (!avpriv_dca_sample_rates[h->sr_code]) + if (!ff_dca_sample_rates[h->sr_code]) return DCA_PARSE_ERROR_SAMPLE_RATE; h->br_code = get_bits(gb, 5); diff --git a/libavcodec/dca.h b/libavcodec/dca.h index e96c589c02..6be975fdfa 100644 --- a/libavcodec/dca.h +++ b/libavcodec/dca.h @@ -32,7 +32,6 @@ #include "libavutil/intreadwrite.h" #include "get_bits.h" -#include "internal.h" #define DCA_CORE_FRAME_HEADER_SIZE 18 @@ -195,8 +194,7 @@ enum DCADownMixType { DCA_DMIX_TYPE_COUNT }; -extern av_export_avcodec const uint32_t avpriv_dca_sample_rates[16]; - +extern const uint32_t ff_dca_sample_rates[16]; extern const uint32_t ff_dca_sampling_freqs[16]; extern const uint8_t ff_dca_freq_ranges[16]; extern const uint8_t ff_dca_bits_per_sample[8]; diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index f0a3c18d62..758e3447a6 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core.c @@ -129,7 +129,7 @@ static int parse_frame_header(DCACoreDecoder *s) s->npcmblocks = h.npcmblocks; s->frame_size = h.frame_size; s->audio_mode = h.audio_mode; - s->sample_rate = avpriv_dca_sample_rates[h.sr_code]; + s->sample_rate = ff_dca_sample_rates[h.sr_code]; s->bit_rate = ff_dca_bit_rates[h.br_code]; s->drc_present = h.drc_present; s->ts_present = h.ts_present; diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index 8b5c354312..3148397b7d 100644 --- a/libavcodec/dca_parser.c +++ b/libavcodec/dca_parser.c @@ -267,7 +267,7 @@ static int dca_parse_params(DCAParseContext *pc1, const uint8_t *buf, return AVERROR_INVALIDDATA; *duration = h.npcmblocks * DCA_PCMBLOCK_SAMPLES; - *sample_rate = avpriv_dca_sample_rates[h.sr_code]; + *sample_rate = ff_dca_sample_rates[h.sr_code]; if (*profile != FF_PROFILE_UNKNOWN) return 0; diff --git a/libavcodec/dca_sample_rate_tab.c b/libavcodec/dca_sample_rate_tab.c new file mode 100644 index 0000000000..16ee04b1d2 --- /dev/null +++ b/libavcodec/dca_sample_rate_tab.c @@ -0,0 +1,25 @@ +/* + * DCA sample rates + * Copyright (C) 2004 Gildas Bazin + * Copyright (C) 2004 Benjamin Zores + * Copyright (C) 2006 Benjamin Larsson + * Copyright (C) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "dca_sample_rate_tab.h" diff --git a/libavcodec/dca_sample_rate_tab.h b/libavcodec/dca_sample_rate_tab.h new file mode 100644 index 0000000000..93d9a13663 --- /dev/null +++ b/libavcodec/dca_sample_rate_tab.h @@ -0,0 +1,33 @@ +/* + * DCA sample rates + * Copyright (C) 2004 Gildas Bazin + * Copyright (C) 2004 Benjamin Zores + * Copyright (C) 2006 Benjamin Larssonb + * Copyright (C) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCA_SAMPLE_RATE_TAB_H +#define AVCODEC_DCA_SAMPLE_RATE_TAB_H +#include + +const uint32_t ff_dca_sample_rates[16] = { + 0, 8000, 16000, 32000, 0, 0, 11025, 22050, 44100, 0, 0, + 12000, 24000, 48000, 96000, 192000 +}; +#endif diff --git a/libavformat/Makefile b/libavformat/Makefile index e30d34f924..8f05b8d83c 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -682,6 +682,7 @@ SHLIBOBJS-$(CONFIG_HLS_DEMUXER) += ac3_channel_layout_tab.o SHLIBOBJS-$(CONFIG_MOV_DEMUXER) += ac3_channel_layout_tab.o SHLIBOBJS-$(CONFIG_MXF_MUXER) += golomb_tab.o SHLIBOBJS-$(CONFIG_RTP_MUXER) += golomb_tab.o +SHLIBOBJS-$(CONFIG_SPDIF_MUXER) += dca_sample_rate_tab.o # libavdevice dependencies OBJS-$(CONFIG_IEC61883_INDEV) += dv.o diff --git a/libavformat/dca_sample_rate_tab.c b/libavformat/dca_sample_rate_tab.c new file mode 100644 index 0000000000..ed2380b0cd --- /dev/null +++ b/libavformat/dca_sample_rate_tab.c @@ -0,0 +1,25 @@ +/* + * DCA sample rates + * Copyright (C) 2004 Gildas Bazin + * Copyright (C) 2004 Benjamin Zores + * Copyright (C) 2006 Benjamin Larsson + * Copyright (C) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavcodec/dca_sample_rate_tab.h" diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c index e8f54bff4b..3be89328df 100644 --- a/libavformat/spdifenc.c +++ b/libavformat/spdifenc.c @@ -263,7 +263,7 @@ static int spdif_header_dts(AVFormatContext *s, AVPacket *pkt) case DCA_SYNCWORD_CORE_BE: blocks = (AV_RB16(pkt->data + 4) >> 2) & 0x7f; core_size = ((AV_RB24(pkt->data + 5) >> 4) & 0x3fff) + 1; - sample_rate = avpriv_dca_sample_rates[(pkt->data[8] >> 2) & 0x0f]; + sample_rate = ff_dca_sample_rates[(pkt->data[8] >> 2) & 0x0f]; break; case DCA_SYNCWORD_CORE_LE: blocks = (AV_RL16(pkt->data + 4) >> 2) & 0x7f; -- 2.32.0 _______________________________________________ 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".