From patchwork Tue Feb 1 13:06:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 33986 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2c4e:0:0:0:0 with SMTP id x14csp602347iov; Tue, 1 Feb 2022 05:09:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrEsvJ55NWMrMSxsIiQE9r9oIBn2pa4kEwSVNwbqhJih40uENC2KP+eNB8oQPM/6mfmlNC X-Received: by 2002:a17:907:3f9f:: with SMTP id hr31mr20563901ejc.584.1643720976871; Tue, 01 Feb 2022 05:09:36 -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 dt18si9341143ejc.735.2022.02.01.05.09.36; Tue, 01 Feb 2022 05:09:36 -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=gMcumUJQ; 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 506F468B2FE; Tue, 1 Feb 2022 15:07:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-oln040092071051.outbound.protection.outlook.com [40.92.71.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C920168B2CC for ; Tue, 1 Feb 2022 15:07:41 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WSJrlv7/Ov5N8Eybsayf8c7NIBQeoPY1PD9BqID7Hiov7RQq5Bxx3osZ/2acPRlV41rogUahBd+DfGmnez9EvSi+zSQs0Vo2qYDOT4fa/rsf7XRmn/00RXOJ0RhKqABXc99KLBf+hEcvQlpDOZewp9IhQtuCLzY93aqeSf/pte02sRDHl6oupB4zph7bsNAeP/DoeGxMNTJ+TH5kM0pB48ez2++xolbLwnjQl3D+Wtz9BWye3i0j9pEusIj/a1n4vfoXiVzCJA42zNCeaWKgZZSBrUdiUDtYAWNCMKHUdX7VTDFQcRcYZ+jXcIjz1VAv/N+xBan7aZFlOx5Obxr86w== 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=MpU7bxTqPeWZ6PX15mPNNXkFwudQLQEUaTOdGLyvW24=; b=ijYk8rcblo0JNzJ7xxHf0J+2AhDwdhEdeOBnd5+CDtVQAjQEHswqW/i1YQpiuLl3OJH8ml84m1rFUH3Jm9osEAf7O6SFu4+MSHSOoIPuhASnWxhCO53xm36fNP6SB4QgrTXErrenpR8Eh8i33jDzfAkVte+/apAFOFdY2qSeTQufKbmhWuTRZBkz+DkqKpnENg46kAiLoDj6GfcL3kECmbuu2r9Yc9K4aAmhTTY4EHZ++R/3QyRSCtcK0iaycMfuFu9TNmYoyiAhiL76LcvUWIxPY/TsbTtdbzCNey06AtIlNiWHDWumQOYLstey/O8Q+YrbS7THbuwbeGmxAFaJ9w== 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=MpU7bxTqPeWZ6PX15mPNNXkFwudQLQEUaTOdGLyvW24=; b=gMcumUJQx1bNZoYYPRzEI/D9fRFJbwCSr6WcbHR3UIQPlFU3933RLKx8yAeMz/oLPiSN4JhergXp87SC2VQgGtgdIL7f63diP5nwCGWfwOXI1XlIGhgKfn42WcxN2wbGlGrn5Ql6E0qtrSwGan/xnBgru8qW0bgw2D96ON0dtXw7JM63MKezUQKxPZ83fo/pWttNrtN2fm+VY9amPEgAVpTpuMrnp7tkyVdZcKVNBVSxp8IKiPO+kXMtD52ze8AUh6pZgUk38t4t2kltFrJ/37/5a65HPySLem8ZP1L33eoXV6c8ZIKT/RX+sFJ+uJ+PiD6KMnFY9GRfTIXC4KL0SQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6948.eurprd03.prod.outlook.com (2603:10a6:20b:2d9::15) 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:34 +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:34 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 1 Feb 2022 14:06:09 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [nse34VzIb/TG8DQsqof5LGvdWys0Ue/v] 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-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 242c1442-799f-4ecd-cc0f-08d9e583cff9 X-MS-TrafficTypeDiagnostic: AM9PR03MB6948:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xw0e1wZ5tspr33XWunz6vbswmDCXwJpPPIhUgKCnyLgRp19X9kst9zsmkS4joU78q9bgVtFyAp2MtZb1jWJ/L/uoSdv2kfBtyNBtUDLICjwZXpGs31J+Gh8lIVOCAS/Uge4KXFluEF+neLFOEF480/2wxjrh0MJ2nWJBIqjKk5x9O3ZyzTP8PcKTkzg7hRsQglZasjB3mtJUORETd49G0Y62t7mnBCeO2Z0gf6ecAERz6X8PpoexlzmqgXeM19/721V60IPURp2sMgTYtNR5Gmz78Kf786OWkeBAg6BEcOvntIDkbQlEQw8YdaTDnvyHiO8IjxcRwlikjzgMCuN/MxtucDnAKVCC6CKA4QHHfyOP+uUs8sWTV4cfixgoKWmjHiXM54qIR83xkXNJqrdyvfVexI2XQ881bZjLHfd9COOQUialW1nzrKcNP/IOC4gh0iQc4N45OcDtRKCiH5MYb9OsEF3VfvVJlobp7P1Pf7RMkALOWKn5ff4IjJZb6Z45VHSQv4eJu1X5j70uymOwq1kr/GbsFKbeP4/Y4QE09I+Fedyx0Yad6Z2chygOCGSv X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LAnpWl7YjuFWdcaIUh9stHxw52pQEOr09tCYO02HXGUVIMxVFobIeUNEXgJROeiqc0jgK1c0e7CX7u1UZ1B/R+JC87+k8sEX7wkDhkN6etZsCa4uwQUrFIl3k1U3iW/TymVfgRj7yeXwzAe3j1RWVTfcX0zjbew+ukB+qBONQv+npaMEJ7cS+VRN/cjJNyCGSyJVKfroZboeYOYADu9MYtO1LlYJ0oLhfLComzz4ERi0ZF1WTHtH5YuvoI0WbVTr/E3u1prcukmNeoVtCoEtKj4Ztswu8WZR2xje/FyBP3uso4uawvLJLZsEGwjFwN1myJqwUhwwRQDC3HgDBiat4H29sYRhb/8m0RoLGcQPcpX6+N2U64UHz9kXhdIwwhshBtpb/MZc6vEzaoXR/KwhldQ7RwAsJYe3/S+dXIUnKl/+LiMdn+uAUUs6Gm34gRe+ehzBCpzJx4wpxruFkqMeD7wNFjBGUTjhA73jVYGACM0jENcL33BANI5yOef3Q0+cdmbjzNat4mOcc/NDCrhk8dYQzUuxQC9OpPmGJtCbmIl17Z0cZ/UJqwudI6h/BwppCoQrApIeRzeoEWIuhs9SC93/IcAmtFqjlK51+49Aq8icD61VULjcQqsD44OF18pjEd1kEROcFvbtT5YXCzR9NH8vL31i4hDxmUMv0qZkgXeBX5cT7Xb1f65AlMLcfS3pZe+2vK3jHC845U1vjwcOod4VIeWyMzRlza7ayuvdUN2jLEhSpXWHxTQRjWdGzVC38iGwq2TM944x1ZfvCJ7QO/3L7qHHtxFQuwpEWh5UDtws3/JZ94m5fM39rgNHqXWWJSOIoLjH5hkID0qUFZ8mVP+6kV7/1sVKPEBOBH7tra79XiCe5rVw2dlRh0bXoNguVnfT1hvWnNylnI+z0hBPlZMyBDUYZNGZwcLjgugkG+wcYNEo1FWKOFJ3B+J6Pua9g/0FV1ExXM1XRqeN+Q8pvw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 242c1442-799f-4ecd-cc0f-08d9e583cff9 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:34.3304 (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: AM9PR03MB6948 Subject: [FFmpeg-devel] [PATCH v2 12/69] avcodec/wmv2.h: Move encoder- and decoder-only parts to new 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: BPkIfuuUK43S Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c | 2 +- libavcodec/mpegvideo.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/msmpeg4dec.c | 2 +- libavcodec/wmv2.h | 9 --------- libavcodec/wmv2dec.c | 1 + libavcodec/wmv2dec.h | 32 ++++++++++++++++++++++++++++++++ libavcodec/wmv2enc.c | 1 + libavcodec/wmv2enc.h | 31 +++++++++++++++++++++++++++++++ 9 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 libavcodec/wmv2dec.h create mode 100644 libavcodec/wmv2enc.h diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 3466027286..0812912f17 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -49,7 +49,7 @@ #include "msmpeg4.h" #include "qpeldsp.h" #include "thread.h" -#include "wmv2.h" +#include "wmv2dec.h" static enum AVPixelFormat h263_get_format(AVCodecContext *avctx) { diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index bbcf00b014..0e0f035526 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -44,7 +44,7 @@ #include "mpegvideodata.h" #include "qpeldsp.h" #include "thread.h" -#include "wmv2.h" +#include "wmv2dec.h" #include static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s, diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index bb8d3bc908..d2365a54af 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -67,7 +67,7 @@ #include "mpeg4videodata.h" #include "internal.h" #include "bytestream.h" -#include "wmv2.h" +#include "wmv2enc.h" #include "rv10.h" #include "packet_internal.h" #include diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 3d2dcb9429..e1d2c342bc 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -33,7 +33,7 @@ #include "mpeg4video.h" #include "msmpeg4data.h" #include "vc1data.h" -#include "wmv2.h" +#include "wmv2dec.h" #define DC_VLC_BITS 9 #define V2_INTRA_CBPC_VLC_BITS 3 diff --git a/libavcodec/wmv2.h b/libavcodec/wmv2.h index 4001093881..cdd58cf011 100644 --- a/libavcodec/wmv2.h +++ b/libavcodec/wmv2.h @@ -37,15 +37,6 @@ typedef struct WMV2Context { void ff_wmv2_common_init(MpegEncContext *s); -int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]); -int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number); -void ff_wmv2_encode_mb(MpegEncContext * s, int16_t block[6][64], - int motion_x, int motion_y); -int ff_wmv2_decode_picture_header(MpegEncContext * s); -int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s); -void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64], - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr); - void ff_mspel_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, op_pixels_func (*pix_op)[4], diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index f9d91f9571..ddf68545fc 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -32,6 +32,7 @@ #include "simple_idct.h" #include "wmv2.h" #include "wmv2data.h" +#include "wmv2dec.h" typedef struct WMV2DecContext { MpegEncContext s; diff --git a/libavcodec/wmv2dec.h b/libavcodec/wmv2dec.h new file mode 100644 index 0000000000..cc410afe17 --- /dev/null +++ b/libavcodec/wmv2dec.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2002 The FFmpeg Project + * + * 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_WMV2DEC_H +#define AVCODEC_WMV2DEC_H + +#include "mpegvideo.h" + +int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]); +int ff_wmv2_decode_picture_header(MpegEncContext * s); +int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s); +void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64], + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr); + +#endif diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index a7827f3194..5cb4c4073c 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -24,6 +24,7 @@ #include "msmpeg4.h" #include "msmpeg4data.h" #include "wmv2.h" +#include "wmv2enc.h" typedef struct WMV2EncContext { MpegEncContext s; diff --git a/libavcodec/wmv2enc.h b/libavcodec/wmv2enc.h new file mode 100644 index 0000000000..3f7f5104a6 --- /dev/null +++ b/libavcodec/wmv2enc.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2002 The FFmpeg Project + * + * 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_WMV2ENC_H +#define AVCODEC_WMV2ENC_H + +#include "mpegvideo.h" + +int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number); +void ff_wmv2_encode_mb(MpegEncContext * s, int16_t block[6][64], + int motion_x, int motion_y); + + +#endif