From patchwork Thu Aug 25 16:33:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37486 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp452701pzh; Thu, 25 Aug 2022 09:37:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR6DsL2nVlpNyTwUHJVxAAMtJ6kLflPR8bUZzkISni5nRXBn6Q63aEtEaB7uZypEJKAvHbhG X-Received: by 2002:a05:6402:191:b0:445:cf66:25c5 with SMTP id r17-20020a056402019100b00445cf6625c5mr3931748edv.58.1661445460241; Thu, 25 Aug 2022 09:37:40 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gs9-20020a1709072d0900b0073da7f87a09si4813847ejc.585.2022.08.25.09.37.39; Thu, 25 Aug 2022 09:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=RJhE4Hwj; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E936568B9E8; Thu, 25 Aug 2022 19:37:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2056.outbound.protection.outlook.com [40.92.59.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AA02568B378 for ; Thu, 25 Aug 2022 19:37:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TZhZ/fn9Jjo7QrGE6X8Yff6vppcepdcUB2BzvtjkuPcXgtSGozcCztipUmWOZDF2Goyq5pu1Uk9yHEfk1RNXnncjcyfspwhE+skyyOAQ6SJOk0Q3zfAnAE28sxlvTWSbgOzvoUc9uLwKtubFo/LxQS8dQUODoKdIKOWbFvquybo6WC6kdH6B3ExGg+p01ojFB9aClLxhh5YE2idHcTAT6IHLr8imYeIGcp5xYUQVli5mOpZhK/c7/Vnp4UqfWVfu2A01umHH+xkHnK5o1LLE++TPkekdVwpb8rmvJEQ1b29z6hCaly5jbwRa8bj12Vpm20KdjPL1URqQgHB3BBgMJQ== 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=rCCC69fNJclagvwPd2aKiVhm07afUALR0BbiWk5EJLw=; b=mRZo3XWPUax8sI5IrFN6BnjK+52Zlpv1eIp8x54jpeyG8M7Etvd7a6kK1pqb2J1aGwY33bLH6TfL0vliS1o/KmaQdMrzDqOnAq8nA9gvy/I2RSSZFyTwkp8XHP+/vU/cAO1i7xa09/dB1/sbnz7CzbpMWyc3heYVKZb7qtj4GvBKg8ux85d/gJ+tGT4U8OvwnAj4qOFwpWrPbUSvsSlN1MtFiCRKR52Geo2MFqZtYKdo1vx13evufUA5hTwG90N9kfb7hA2I+ZCiBWVKEe1aglWixz8cJQbhxyBFGI5aNvotV3Oad6N2y8FzH1JtCSrus4OAHuYRlgBAaia82S7wGQ== 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=rCCC69fNJclagvwPd2aKiVhm07afUALR0BbiWk5EJLw=; b=RJhE4HwjNAJebn9Zy1cRRDYWlfbmGPGyJ1g42pOyV5sp4nLrBeU8IvwEz3dyZrDjrVAGGf51sUMwdyVJ5W7L0OpFhC870gD8adlfa0ip7er4R2W8OXejpqJlozBhwERfmpjWP2txlXtOwASNAysUzJbCadd1WKaIi3rSsiXZJiyHPkb5D3Q+1skkuoGmn7fpDhhe0vIKBTD/ZWt1jorZ+pAvTjQSUM8BU0ZedqGOFvKBj1a2FHYJYYCOGxdbciN/R+L3Pih3R3iwwwvVZluDrsPtey5M8bA0qVz4ExWaYDjHxTGWQeO66uf4V5sAYI+ohk4l77qknNwr0d/sgCozAg== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by PR3PR01MB7017.eurprd01.prod.exchangelabs.com (2603:10a6:102:79::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Thu, 25 Aug 2022 16:37:35 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46%11]) with mapi id 15.20.5546.022; Thu, 25 Aug 2022 16:37:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Aug 2022 18:33:59 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [hj97geDjpBhBPj9hSi9NtmrWjSv97/Xg] X-ClientProxiedBy: ZR0P278CA0051.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::20) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220825163400.420541-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3d6aab7-dcb8-425e-f412-08da86b81d22 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiS9msLST/hR/KAN/HlVpM25OuJL3oFnULWtiPZcCgAWk0jzqE0btXvlBwk9CR5ducL0OBKe7UPTzNXWjHRqTSLigRUAeOUuczUiFREoENRSdSEmmz+hfqIdJzPVDek6UJAZCj6oRWyBLnJG8WO73gzNot+2vt16haOIsHnloDys8hrHKrDgnzEipSbXs1KZqRodBfzH9kS/BaKu8/2GIDEue1faStGuGgcUfakrrYiLXwB6xOPqytyw/aDn+Dc/Jx3exQRmZqRwAyF46rZ882SX629Zcv1U8dKUWyKDm7eCIIIXsKX3y5tbahy99UZYMqfnwsb4mrGFkLZcdwFAtoIJMUEKkUkROldC4Bf/G5/959D4aqZyBPTeiDhSD9RE4Fbb8OeUUdPZsGyfm9y8z0ceFy6E8ZJm825f19KtEIqEd6RuAVuQY64mFqRBe6+NPeuTOtfP3hQrdSVw+8s9z+Mq+EZ3LIBbMdx9vjoJzuvw6rmjfU7uz4+eEk9kc/evUp/Q3fQaFtTNQlKRqf2RuHEiFI4dng3bqSJQjgB9Bymik2+5O8L8Bg9ZFi6Gv2BE1EC7Iq5qIh/5ZfaRQVQDQcLOM2Me1M3Qz9UBT+Has1SAo9y7oR9Kl5sSKSKucHibiq30VYmP4Jl4aWLPDsdLLaMvpAwsaTcH5kWuc2hBhpVM4fzewN82FI/EneCtHZob40D1KboDP1vOscdhN4QaTT26GRmZJFPTcLfBScWEM119osp6qIfGCQ016OeEIW/ttH0= X-MS-TrafficTypeDiagnostic: PR3PR01MB7017:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KAW48ifDFa1Ux0D2eeBzbFIQ8fGJ+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cs1AtrjX98qhthJ5KHAd4nFAwP/n7s9SB2ZhnxUPbA+refHHzO1uJsSyASlfTS+PXWBzkSDIylBoL98DuXULE+0TZ82fbxLft9g1lUEMZsxgIGVsQlZ3ROq3Az2CVTXHY3YzMs0cAspSeIDDnLE4HxW68mkn44MjXD90qHQSB814z7rkbe1S3tCLojNBpOFIQcRBGuIwoAwVotTWEgeAx6hiviGIcMRvKe4hazG4MAZ8VF9174+QLLTaT0v3inRyEn9uE9+5ycKKUNMmAnuZmkt/QGJU/41brSUa/ZSZzW1u7Or0YfMbXRGS/Y0M7Gu+oIWG4xKSWzBCiRsOzr9mBLP8o6VW2gcp7PQgWb2Co+f7XSJMhNmHSHKGUwJF9fGm6tqf7Dyk64RirUc/3FPiLjLUBgS4bKR7olR6FgDYOMOhnsDCNLOBZy/v74uPNfKIeh2DNXaQInrUpEaCWSttTVLPl/iiS0AdJUNr4QEGTR5kVqqf2xLfcw2uBZT0uEA9aX7xndE1GX46wp03cj4TzAGdeGOTT1DL5/FJmqzuOO2tbbZYqb77gTV4GiR3Y9dnA/pIzApnkQSt7Ov6VXlaGwQJ0sth1aQPGdpbcY5Rn23mIHE0cL/83KnbEDTQHr+8X7E8fgpBvemXoNP8hZ6G+7Iex+Yo16NYeKUiMw5hOBPecgKz1JaeCTqwQpO4xYh2O4bD5UR9bbKxpC2DdMiSHV5dqERZfGCXc3XolLP4lcm/E3TyZS3gdruYeD1Iu7AtFHJ12EzHUzwPVw0ObAik+8SvfZPilgaNANLbEXUAQwOI72KVM3enV9OqBzaItvPsj+qhchdmCGqZTYjkLHm+UXQwvm7P0RiIQ2ybbpMqzLi4vlnTttjHWSr2H1xOTcZerDdH4A1oMk/5chvYUIWqO/EXj1SxY5RtQlyJT/XBbIqc4oQfAwPY= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3d6aab7-dcb8-425e-f412-08da86b81d22 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2022 16:37:35.0561 (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: PR3PR01MB7017 Subject: [FFmpeg-devel] [PATCH 20/21] avcodec/internal: Move ff_dvdsub_parse_palette() to new header dvdsub.h 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: zpCCr8QaJUYq Signed-off-by: Andreas Rheinhardt --- libavcodec/dvdsub.c | 3 ++- libavcodec/dvdsub.h | 26 ++++++++++++++++++++++++++ libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/internal.h | 2 -- 5 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 libavcodec/dvdsub.h diff --git a/libavcodec/dvdsub.c b/libavcodec/dvdsub.c index 87215d2bd1..fb415677d9 100644 --- a/libavcodec/dvdsub.c +++ b/libavcodec/dvdsub.c @@ -19,10 +19,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "internal.h" #include "libavutil/avstring.h" #include +#include "dvdsub.h" + void ff_dvdsub_parse_palette(uint32_t *palette, const char *p) { for (int i = 0; i < 16; i++) { diff --git a/libavcodec/dvdsub.h b/libavcodec/dvdsub.h new file mode 100644 index 0000000000..3f51c3f805 --- /dev/null +++ b/libavcodec/dvdsub.h @@ -0,0 +1,26 @@ +/* + * 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_DVDSUB_H +#define AVCODEC_DVDSUB_H + +#include + +void ff_dvdsub_parse_palette(uint32_t *palette, const char *p); + +#endif /* AVCODEC_DVDSUB_H */ diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 4b692c093f..3338cd6b92 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -22,8 +22,8 @@ #include "avcodec.h" #include "codec_internal.h" #include "decode.h" +#include "dvdsub.h" #include "get_bits.h" -#include "internal.h" #include "libavutil/attributes.h" #include "libavutil/colorspace.h" diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index 3fe50ae199..37d6efdd5d 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -21,7 +21,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "dvdsub.h" #include "libavutil/avassert.h" #include "libavutil/bprint.h" #include "libavutil/imgutils.h" diff --git a/libavcodec/internal.h b/libavcodec/internal.h index e63d985091..0da8f296d0 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -244,6 +244,4 @@ int64_t ff_guess_coded_bitrate(AVCodecContext *avctx); int ff_int_from_list_or_default(void *ctx, const char * val_name, int val, const int * array_valid_values, int default_value); -void ff_dvdsub_parse_palette(uint32_t *palette, const char *p); - #endif /* AVCODEC_INTERNAL_H */