From patchwork Tue Feb 1 13:06:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 33993 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2c4e:0:0:0:0 with SMTP id x14csp603799iov; Tue, 1 Feb 2022 05:11:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyg76ntWuDeQd6iZLB63OcWknXqSxeGv7mQDpxPBvSJJhQNCBx090v0FsUOKSzSfJ5u4dMv X-Received: by 2002:a05:6402:3587:: with SMTP id y7mr24602575edc.224.1643721080870; Tue, 01 Feb 2022 05:11:20 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j8si9978463edp.379.2022.02.01.05.11.20; Tue, 01 Feb 2022 05:11:20 -0800 (PST) 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=rH4uoZlV; 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 DEC2968B2F1; Tue, 1 Feb 2022 15:07:50 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2028.outbound.protection.outlook.com [40.92.89.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5F3F468B2FD for ; Tue, 1 Feb 2022 15:07:44 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZEba3r6DmcZRxbIQ05V8OxfpxqP+8B5lnTWSrxTWmJy5pwgtviYjaH89csbkHvtlSoDbpbAUIfr4HbMO0H4s/+hAhxgVpksZuxm7a7rjajp+Uf5Q4MmiIIgRNzHtzHqBsKHwcm5x1+GCqb27S9Xiop7qTMvpeVLjm/eipAIM5cbvokqCBHlkmdKVU0TZr06OkvIdexSTxsbSBLB3/+32m38dWH5iRL0o9wjYxOjwxlIx+6BDVw2PloVvw8kaQKr4tjY5J24Ys7rBDnI4VDW31OSoPE37hrAIbLpvsG8rRXa2QrHQudS/+eQQvwfKt4MTSjmcbl6xp13jCkWJluqiwA== 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=TIdbaDGJm4ETMNicXGzcmfsS0Qu1oIfz9XBoY+mirzU=; b=PtzUt2G+ewAhlsnqiY8EztAf+kUM7V+VqRIBMC9tKneT9c7ey63C8Uh8aO97818fxPR0ASpENaGcciu4qrBM3AYgZka5gLEGdp+BlwyhGQnp6GCbI/tei+eom/vWI9q4lBkMbKKfl+7114Cyppqm5LFOyC6kFbXLbOwXobEbbfYf1mmLJjOHQXaEmhUnL1lyFXCqHedNb8W4BtU5W6IsGSfDU5uYJbB4cf2sh3urU367mGH6n9gnZ8RkzIiq37Yc8zX1MbBXYAR/9lT0FYg+WzDOYlodI5sIuHhxsJRSD3tOcuJ/i9BZKE0IknAc1/eXoEBfv1Pezy9n0Z2AWMJjfw== 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=TIdbaDGJm4ETMNicXGzcmfsS0Qu1oIfz9XBoY+mirzU=; b=rH4uoZlVXU6sxzH2m3WODrQN0r5xXI1CWw0MTJRH3SqaXI1+q6PiZXvOdccVcZy2tQJTeiwPueSh/iU5EWjyNUT0jPv4CbAIT1Up3Z/u12JFn0plWcXE3okfUgu2RyH1TX10G6wilQs38FhdMEKN/HZ5vqBj4rti9mX3pn21NRy6xtV3kJnFXIz4SNfSLPjBO+RG1kdywTWdFfcwgRbFSUGEFnLw59D4qqBqF5htlGpoqytCD4ACc8JLcorqoRM7DPVGJGXvFshQkUJtFNV4ekTwca9I+NZ4rEzCYfrVkQCv3DBTWJ4nExN7e8A0PdLwU7gl91zQSUR/oqtuMjZd5w== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM0PR03MB5700.eurprd03.prod.outlook.com (2603:10a6:208:16f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.22; Tue, 1 Feb 2022 13:07:43 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%6]) with mapi id 15.20.4951.011; Tue, 1 Feb 2022 13:07:43 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 1 Feb 2022 14:06:16 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [zoWHIJHM/e5brmNiAyeWJxlhtxq8BUs+] X-ClientProxiedBy: AM6P195CA0092.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::33) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220201130706.1420875-18-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b031f2e-378b-4931-29f7-08d9e583d52a X-MS-TrafficTypeDiagnostic: AM0PR03MB5700:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 31IFHg711YWCSR7sufQQkfI4xVPqmI7YgYq0V4k14mayAarTGPPfH7qIdk/3zU3YjzexS1hnqtWimh3933F4SvaGGhAVl4fGbMSpY+GiSqrHDt1Pz0XU8T3AdsEZ+U97WVPnbNm2Qbtv/fTxtALVw9+tta1CDk1LuDsjwjhBa0emGiJymhIcOGovJw2K5nUC0V6VJP+KK+3RN7WvHWH4EBb9YegRusRjuDKzwebazkoiigWqSfr7oVw1s5dxSFCnTC8UA0PwHMCOaDnv8D79+1PO4zubjhjVlO03X4V8Gc+J5Iy6dWIScGx83TJc/eY7kYHYpwY8K9CyCO5sYBoe09sFr+RBEaHSbiqhOlln1uuF5HqutoTTDnwJjhNe9aIL5NhI7fq7EqQqZqLgqPoDu6wdZHqRNiwpCup3h2WH7nLk7HD8Yb/CAmDVgl47ySMH+pLI6JIykA1YlBl3iPSB0KC7TyX8IJTKfBQmC/Jd2vyqgH5uqZ2zmW96sajVksBjiuWh+0/aJ4ittQZMciwJUyXN8AM8gDJD7yuFyUZ37t9e+HBvfvHsdgwsMnAYhNdf X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 23UoD5GPr6+8hkBXHA2lULVeLxfOxqusKJjE3wCiJ52dBMP6BzO9/4JGowTC3NTPQy/KPYIZDuwd9pU9dbGOayMjP+hOXaIymXCngaW2xAwwz7uJI6PKyTQKBVSpfWgo+unvR1yrDO7ZYqREkhMn6ckU2fkEBjimyYQnT0E4XGWs5w276+XxUzcJV97o1ObTuCsRThjEDDQ7dUpGXPkvRfLab2uVxM6BYb+OuY+EALO9wi0x7O7knKAz34BFcIE7iUXjKbs1d4vUUAwhKo5ibPPgoZiFrxf77yhlLNleQHOKDUUadJ1dML5CPEN+fR1j01K0Qrtn63Lz87cVBKnQodHVrx9U5Q5Mi+yloQlnsEYD23KZWHKXp/kkUvwvMsuwY3c22rK3xrrVOv9c+pG2ViXOtNTDttbH5bw1ivybS7L9W9pKF1f9N2/8Ox3lNSaYn6NNBXjGtQPLY/S1Z0L89VTzsPs/sxevwb+mKsd90ZB9T15CXCdXLQbsHiLkrNf1yFHa6kNTUYYiHCzZZZzSSowKWE4F8m7BGIfiWMNN0klBw7v9wkcXu6zWR67R0L7jDwuBn4YXhLznuAKNFbFhqBR2q84ZFfd3p9dKPgsGhPwSAHVPtwxNyKqMQqs/SBXaux52t7pdTLpWqgQ0C5N099D8J/Y2UK46FaU3MaX2PPctHSsu9GI59G7gIJIRoGVp7vFszkTBjJEniK228xvlTGFVAvMZza2ZoLBhE5yJPlDM8myym5oHid4SzaJ5R+31/lapTk2EmPWOxDszfelkcmuyhMT+YqGQNt453I1XHSnQGmfgYkxXR2HRL78MUbtmSPK2NoejOvTg1SpgnNiK2HR+K/f5eaR324RgEiiZIO7O9TDbrB18PzaVo9fJ68aeJjX9mfv3RcGOd2rPazSyKASslbILz7G/6ZvqoSLAOR+R9fPp6HUas5jonWX10LNV5cRryvhCj9d0dq0VtJqnvA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b031f2e-378b-4931-29f7-08d9e583d52a X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2022 13:07:43.0516 (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: AM0PR03MB5700 Subject: [FFmpeg-devel] [PATCH v2 19/69] avcodec/flv.h: Split header into encoder-only and decoder-only headers 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: IOVkbPlPjRXi Signed-off-by: Andreas Rheinhardt --- libavcodec/flvdec.c | 2 +- libavcodec/flvdec.h | 29 +++++++++++++++++++++++++++++ libavcodec/flvenc.c | 2 +- libavcodec/{flv.h => flvenc.h} | 9 +++------ libavcodec/h263dec.c | 2 +- libavcodec/ituh263dec.c | 3 --- libavcodec/ituh263enc.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- 8 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 libavcodec/flvdec.h rename libavcodec/{flv.h => flvenc.h} (87%) diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c index 2bd86b5b47..62bb32bc62 100644 --- a/libavcodec/flvdec.c +++ b/libavcodec/flvdec.c @@ -20,7 +20,7 @@ #include "libavutil/imgutils.h" -#include "flv.h" +#include "flvdec.h" #include "h263dec.h" #include "mpegvideo.h" #include "mpegvideodata.h" diff --git a/libavcodec/flvdec.h b/libavcodec/flvdec.h new file mode 100644 index 0000000000..3527d82beb --- /dev/null +++ b/libavcodec/flvdec.h @@ -0,0 +1,29 @@ +/* + * FLV decoder header. + * + * 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_FLVDEC_H +#define AVCODEC_FLVDEC_H + +#include "get_bits.h" +#include "mpegvideo.h" + +int ff_flv_decode_picture_header(MpegEncContext *s); + +#endif /* AVCODEC_FLVDEC_H */ diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c index 158b399c40..7271d64af3 100644 --- a/libavcodec/flvenc.c +++ b/libavcodec/flvenc.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "flv.h" +#include "flvenc.h" #include "h263data.h" #include "mpegvideo.h" #include "mpegvideodata.h" diff --git a/libavcodec/flv.h b/libavcodec/flvenc.h similarity index 87% rename from libavcodec/flv.h rename to libavcodec/flvenc.h index 561cfe0baa..aaa0fcffab 100644 --- a/libavcodec/flv.h +++ b/libavcodec/flvenc.h @@ -1,5 +1,5 @@ /* - * FLV specific private header. + * FLV encoder header. * * This file is part of FFmpeg. * @@ -18,10 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_FLV_H -#define AVCODEC_FLV_H +#ifndef AVCODEC_FLVENC_H +#define AVCODEC_FLVENC_H -#include "get_bits.h" #include "mpegvideo.h" #include "put_bits.h" @@ -29,6 +28,4 @@ void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number); void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run, int last); -int ff_flv_decode_picture_header(MpegEncContext *s); - #endif /* AVCODEC_FLV_H */ diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 99dc7a74d2..bf2e9b1583 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -31,7 +31,7 @@ #include "avcodec.h" #include "error_resilience.h" -#include "flv.h" +#include "flvdec.h" #include "h263.h" #include "h263dec.h" #if FF_API_FLAG_TRUNCATED diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index b09cc9a2db..5588840c3d 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -28,7 +28,6 @@ */ #define UNCHECKED_BITSTREAM_READER 1 -#include #include "libavutil/attributes.h" #include "libavutil/imgutils.h" @@ -40,11 +39,9 @@ #include "h263.h" #include "h263data.h" #include "h263dec.h" -#include "internal.h" #include "mathops.h" #include "mpegutils.h" #include "unary.h" -#include "flv.h" #include "rv10.h" #include "mpeg4video.h" #include "mpegvideodata.h" diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index 70ac1f643b..c8a95574d2 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -34,12 +34,12 @@ #include "avcodec.h" #include "mpegvideo.h" #include "mpegvideodata.h" +#include "flvenc.h" #include "h263.h" #include "h263enc.h" #include "h263data.h" #include "mathops.h" #include "mpegutils.h" -#include "flv.h" #include "internal.h" /** diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 460462d997..7c5d013200 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -63,7 +63,7 @@ #include "faandct.h" #include "thread.h" #include "aandcttab.h" -#include "flv.h" +#include "flvenc.h" #include "mpeg4video.h" #include "mpeg4videodata.h" #include "mpeg4videoenc.h"