From patchwork Fri Sep 30 02:18:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38476 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp1399238pzh; Thu, 29 Sep 2022 19:19:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM45lTzRjTWgQ3dN8MPI1L+18ytGpw5NOxQlG6eyYIYWcDg0mcZT30Zl0OOTuTqIhY4CiS66 X-Received: by 2002:aa7:de9a:0:b0:44d:8191:44c5 with SMTP id j26-20020aa7de9a000000b0044d819144c5mr5971758edv.232.1664504375542; Thu, 29 Sep 2022 19:19:35 -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 qf12-20020a1709077f0c00b0078334ccc570si798908ejc.328.2022.09.29.19.19.34; Thu, 29 Sep 2022 19:19:35 -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=XYsCiSNC; 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 C924E68BBB2; Fri, 30 Sep 2022 05:19:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065014.outbound.protection.outlook.com [40.92.65.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6AA9868BB3E for ; Fri, 30 Sep 2022 05:19:20 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f0HVPZXvz936v6N6jiiXmVsM+4jHdjqjeVfW6aDXxdiY94w3NS1guhIm0QXCVW8usspX5Pxoryk/Tf7qLKDMKucBYcRMkGUdZ8dJJSy/gzmbP8EuJ235BNqpmeUB/DlnIDzqZ+jLBD5Ns83u4UOvaqq44fJzVgEnObIzD+bRKDoc4Kk0R/nDp9b36wk6fJpjroTIya4yvYN2q4+Y5453JinIli2JHrkV4fcgYT576wDlB3K05WHSD3IHV3q7yaZZ4LUgDV0/cDpjFT26gBEcSGcl+APMJGFG9Mmtm5VwKKFmo0eHcwg3/JMbLriERF3D22hZvvW1EZRloUJdUxR08A== 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=SSAKyzqlm5Y+ktaoBWwMlSfxrQiQaSD/Ui4wFB0l784=; b=TilGfO3kG1dk7YUT+tVDa/BH+igVXJIl66Ng+uHnvm87eoAp9T+jFg7W0RUDSCNhrcSB/o8OtPxgy6YflS4mvZhffwWB8I3skadn44/+5TRYHGvZ9EijJophD8lzaIlRkG0tIfWUm5dmHJlLvaHU5VhX9S1aRPwvcRR2q45bbh7/dMGtsqIvxLpQvL3Q4CrgVjDxQu8xV+Mc4CW2dtbGk3XxmXg0VicoAug3RoKXUwUekgyZIjy/CszDjltJurMJKpDJuqe42cccT8hJvQWCmorYxS7isVfneqO1FHyQ9bSrIaZssSobjkJRAK62pFHyXLz0+9P4xun2+jpNI+CvnQ== 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=SSAKyzqlm5Y+ktaoBWwMlSfxrQiQaSD/Ui4wFB0l784=; b=XYsCiSNCa0vZVs+WEN3Eq91kncdzwRDjebo4bvUmDhzpUlf4ltnUMX53EXmcUHQ6SJOn/x3jIjXA9y78lUjyOD8gL3iDQeipMg3hRGGj17jr9rs5sVaUVgmGupXPXSC5ks9uUPIbu1uoz2/0T9ClyOkUG+kfpZLzccNgigPYayxRPEMyRDpJswQNo9t2kT5g2YEk0SjSguhsR44BaCzF5e28AcclUqwdBlZR7NhLxsF6U/X4kJ4rEKTuPhv/U4JcR/eKeFjpE5697EgCTZL9cRpQSCVWd+xrpKxTIdDDstfWUK5YvLXpjzf9vTg7cVPMjuEsjl84bPYGnf0w2zk+Aw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0422.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:285::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Fri, 30 Sep 2022 02:19:16 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5654.025; Fri, 30 Sep 2022 02:19:16 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 30 Sep 2022 04:18:54 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [KF+UOimiSORorGEnOB++h0oYb1YamGLYLD+bmteohKk=] X-ClientProxiedBy: FR3P281CA0167.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a0::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220930021854.3048208-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|PAXP250MB0422:EE_ X-MS-Office365-Filtering-Correlation-Id: aacce807-ae9e-4d68-b77d-08daa28a2c42 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKyb/VeDmXQSdjhJ6c8u8nN+S6bjTChwGquv2nr3frKaNU4/qOoVcsyBK6vRZxFsgSdZczfk0fqVwfBIWVLFvIjrjizhgbRzT/Nuc141ksd7d+4sp0GTc4LXrQrx5RDusTQ2j0hyfodVQTvpY9N0ys2Ks0ap22ouXr1KbUbfFa+AZ40wVs9jkjRHJU8BQz57ptDLPTS5EtTIYUm7rX/QBI72XPykmzJuKD6MbcyABG9SZqN7gT/HYi+KqiCyqIv7GWUC51t2u5LmNVvdFxDI5t4GOAATi8lVGwlFbCHSouiqkasEktwC9RoL8QjflqfTUXO0EekohZhLCbTfma8Wvev8iIiAu4UpLgf18u7DeWeelV/AOOMxQ9KmlKjB3bwQowVHvfZV3U4Hx6Bgp3tS8OXeiQrHJKTy6yNkDRaZkpm/e9agUNwQPyhjJ2JU/T/MqbT+wcMQ2H3/oDdW8FD/jSmjMVcoBEnIVWXKxtbpQzD7MC1oO6L4BVErpmBpZ6SogO2MlgYDY6dOMXFWkIZFmTtDoCinvEyEgF6baM7RxmQo1gv63ZEH2FEekt7MEsmgQzDM4VcpWulTdBZsFny246uhAOf2seJCDRCslZsReWlYwp+NyAK4m1o3P4kUOUlTnx45FTcL35t7BKRwj+Nqcez9XlaVHaqq1We8nZp2ZD56HczZyhzmR3JNP9e6hg8NWDfHXrKJ18IDq6xVQZwrjuAvCNe3rQmz4Yk= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mMWO5sjn7Gs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MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2022 02:19:15.9820 (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: PAXP250MB0422 Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/mpeg12: Move ff_mpeg1_clean_buffers decl to a new header 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: 9oZ+vFeZRzBq It allows to avoid including mpegvideo.h when including mpeg12.h. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12.c | 1 + libavcodec/mpeg12.h | 10 +++++++--- libavcodec/mpeg12codecs.h | 29 +++++++++++++++++++++++++++++ libavcodec/mpeg12dec.c | 1 + libavcodec/mpegvideo_enc.c | 2 +- libavcodec/tests/mpeg12framerate.c | 3 +++ 6 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 libavcodec/mpeg12codecs.h diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 7f2aaea7c0..df6aba9d74 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -34,6 +34,7 @@ #include "avcodec.h" #include "mpegvideo.h" #include "mpeg12.h" +#include "mpeg12codecs.h" #include "mpeg12data.h" #include "mpeg12dec.h" #include "startcode.h" diff --git a/libavcodec/mpeg12.h b/libavcodec/mpeg12.h index b323728a33..4e2e67eae1 100644 --- a/libavcodec/mpeg12.h +++ b/libavcodec/mpeg12.h @@ -22,7 +22,7 @@ #ifndef AVCODEC_MPEG12_H #define AVCODEC_MPEG12_H -#include "mpegvideo.h" +#include "libavutil/rational.h" /* Start codes. */ #define SEQ_END_CODE 0x000001b7 @@ -34,9 +34,13 @@ #define EXT_START_CODE 0x000001b5 #define USER_START_CODE 0x000001b2 -void ff_mpeg1_clean_buffers(MpegEncContext *s); +#include "version_major.h" #if FF_API_FLAG_TRUNCATED -int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s); +#include + +struct ParseContext; +struct AVCodecParserContext; +int ff_mpeg1_find_frame_end(struct ParseContext *pc, const uint8_t *buf, int buf_size, struct AVCodecParserContext *s); #endif void ff_mpeg12_find_best_frame_rate(AVRational frame_rate, diff --git a/libavcodec/mpeg12codecs.h b/libavcodec/mpeg12codecs.h new file mode 100644 index 0000000000..f8cf5503e2 --- /dev/null +++ b/libavcodec/mpeg12codecs.h @@ -0,0 +1,29 @@ +/* + * MPEG-1/2 codecs common code + * Copyright (c) 2007 Aurelien Jacobs + * + * 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_MPEG12CODECS_H +#define AVCODEC_MPEG12CODECS_H + +#include "mpegvideo.h" + +void ff_mpeg1_clean_buffers(MpegEncContext *s); + +#endif /* AVCODEC_MPEG12CODECS_H */ diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index dad1970f6c..df76a90c6c 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -47,6 +47,7 @@ #include "internal.h" #include "mpeg_er.h" #include "mpeg12.h" +#include "mpeg12codecs.h" #include "mpeg12data.h" #include "mpeg12dec.h" #include "mpegutils.h" diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 0b398c56ab..06c3ff4cbe 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -46,7 +46,7 @@ #include "dct.h" #include "encode.h" #include "idctdsp.h" -#include "mpeg12.h" +#include "mpeg12codecs.h" #include "mpeg12data.h" #include "mpeg12enc.h" #include "mpegvideo.h" diff --git a/libavcodec/tests/mpeg12framerate.c b/libavcodec/tests/mpeg12framerate.c index 595bdb278a..f2d3e2472c 100644 --- a/libavcodec/tests/mpeg12framerate.c +++ b/libavcodec/tests/mpeg12framerate.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + +#include "libavutil/log.h" #include "libavcodec/mpeg12.h" #include "libavcodec/mpeg12data.h"