From patchwork Wed Oct 26 02:01:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 39009 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:85a8:b0:a2:d5a7:ad9d with SMTP id s40csp148604pzd; Tue, 25 Oct 2022 19:02:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Do+LXO4ZZzM4VxnmnvL+jvSnzkxG/9/vPgv6wzTnVgeSj6yxpCO403d+/FBdt2UILTYrc X-Received: by 2002:a05:6402:d0b:b0:458:a244:4e99 with SMTP id eb11-20020a0564020d0b00b00458a2444e99mr38637165edb.46.1666749741948; Tue, 25 Oct 2022 19:02:21 -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 hv11-20020a17090760cb00b0078c37681f89si5089937ejc.650.2022.10.25.19.02.18; Tue, 25 Oct 2022 19:02:21 -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=gO1jGQDc; 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 5518768BC4A; Wed, 26 Oct 2022 05:02:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02olkn2064.outbound.protection.outlook.com [40.92.49.64]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 11C7F68B9D8 for ; Wed, 26 Oct 2022 05:01:58 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P2hZCxhqR0sSBVjDR6Q9ugH3X4jH2fuYZF2iVRNS2eeeABhOsMqJkZDJoaip3I6+vDnC71fUmm+yna3eSw9vvqp2S7vyx9RLpKJnBbtHHiM79C2BH0M1XP1Yfb6DhT4tRYPM7RAF+klpkDKw5N0wlpJurwuE/OqzgUWjOd4/0f7iasAhrOknow/sxCYWfTUaE8gHfXAXwwDHX5VWX25wqUpw8dOSf74uIQA/splz8oIJH4zMad1w7+rWe0IJEJvJTWvgW20WOgANXbTuNQNDuj9znFUUrABxm4ihFW2J2ufnkwSv4pwxyFhWm6ScIwl2StGHz1g4Ll+pSNnVyKXeeQ== 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=W9HPFHzy9vxqsX8rcMGe9qdEtrHh0neTawko6lVGA2A=; b=iyqekBB0JA/DZNjBnv11re4ZaOg9F+aVMZy1vbvhRlDHZX0v5W/DHO/lnVxEJoHEFL/JwkJenF4q1keRQ+/RgNj81HOdq1UFzYhto530F1/i9W2Cc78c57To8vjrBRhJaeMHiTtMVDsAw+tVX/66QBThg6Esgp/tRE8l5BA2xa8L7k6bQUllIVLDZmYDNqEorlr9BqUYYxyCFDndOFnG8n048QmwHYsTbAElWPgXfYZlekyWm0x2d/EcbNoDhSgclg7+emWbE6Ld7Y/KPyd0yRSCR81p2MpjzADopMBotXMReAArOvoodDwP5qeEwz8E6w0zqD8Ovc2giQdJShBTGw== 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=W9HPFHzy9vxqsX8rcMGe9qdEtrHh0neTawko6lVGA2A=; b=gO1jGQDcXBuhN2S7mUg4GllqWH9uG5xB57jFfXnvDMdp7HUTOYPJRAcHzznxtu4JNYeHJ8cGmW+uJerQ8jVGnig5CDymvq4hHXExsRsL3kl+plGv42ggZFNPQvT9XkmsJ47KDVYA+ovHSHl/EY8sx/82GLw08nzKUJOswyT/dr8yJpNAfjy3i8KGVG5fPxbW/BUa48+7Y04fBOs0Sr2o+6qEstN+tja+cunr7zotYhkVe3ngvjgK0lCul7AYkp+10fDbyNH6LL82SpYUdSMN7DfzUqeNTjoMYY75V4JcBr5ez5/DKvRDl4esKnCizhhxk849hIqKFotc5SwxjDKrAQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0067.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:172::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Wed, 26 Oct 2022 02:01:56 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Wed, 26 Oct 2022 02:01:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 26 Oct 2022 04:01:46 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [rJXE9tBzYdYsYyBlYvGBC7p8FLkELWuhWqqXmDo/eU4=] X-ClientProxiedBy: FR0P281CA0133.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221026020148.1899997-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0067:EE_ X-MS-Office365-Filtering-Correlation-Id: ac0885cd-0a0a-41f0-50f7-08dab6f60f21 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmoSzhB4sgWW4MC2Y4ACp8EG00u+HYPV3WkJiW+vjOljd7lkWxX4TMBQP+RmiwQ9n9SqcvjprscIpmKaMC/thmKGadUbYTWD8zWZAp0qLW/LxmqbE83etxpRNKGQXFUHKMASDfX8GDGuwR9tTHOyvWJEUDyhrZV8M3DqECgMFYCIkpiVEpjFDLmLLxoWTPV82Yrc1P8EucBZoXuvpATdmUNqv2GlTNcwr+vM6H/HP4YzQXA6rRiuG3fkyBxD3PZFY7FBs40OOy8XKdzUQHuh+X2o/nwMgeIXj9NEVyLSArK/uTA5aSLMvp+sqd6z6hvkwCfEVIPkJdt2qy5ouq3qIYppGEMvEMYgGeYeaOaQ37HsjOf70Hj3YzXgmLpIM3hQih35ZCNGOlPWaB/bZv2ttbGSbOt4ko2Q8yUeC0tuBhc4K3hCsWexV7QXIKDWsMo2o/5qbHHwKrlqNAVzSjKQwqvqOOxUjl97p6xXqArQiQDi1nZAsw70hZrft7Y6OzUQ69FkV/If7UB9ERzgQPLeVgYqv3tdP/XqQNFfpdRXbKKe7AZSepEl7ZKs7iAuzLobpDET3Jq/AcfLr92hiHO96hk2H3RE5cm7TlZi+cVTQaKbI9rZ8sp47faLMVIPdgeJ+vvqKeXML9dvMlQcauhq8EBo55O6u7GpDaE9pV45oUz1oanQcptszHDqQ1HhVFwVPw0oDthRecmHKW/j6XHtm0N+WFtULelYtUaszCVsb2aHS2o09Di5Ti9PdLonOvDOQY8= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /LOPWg+reOQjk4zqABSNx2HR5WIwUBn5K20ZEqgxQwqmrSDZPkWT2FbbebkYVVmR+yawASR2J0xI/Uu42eQODaDes19b8go+UgyM1PGoKroWvIoXSISzOPFdWE1VOk2m1MUske/b0E3rMtJ+TicDb7s/BvXGOQIXuIcYyg53VV0N+ZtoT+Z3nXGEjjo822NDAmo3xeuaBJ4Qk0O99+/fZFZlIeOzzYlCO9kGeCgIE9zIzzcNXSf6DwUFgOK6TYTQ7rOQxkxJJaojs2kH/tBn6980hurreloWXhYEb+hu/PQNdYWed+Dp/FYqVdmERutFx0w2vGfla8dPavjfXpI/K1UNfLneXFfoYJaAqm6HJbj/daptzbuJMMFsZTji1SVsTLfhzWI/j3ZbgX9VbC+tQajX+rbjA6LDbZvTGofeCAagmhviSXyshI37/72zRI1KVYy6ixXL4bRgZyVAUmxy/KstsEp1HbIxU0Y5HF4eqZzqPHhd4J6dzP7AzdmOE7jZGPoqjCwl7lChUbTeum2EF8kNCeyWbU4sBcZXyxkQKF2UXUkoSdzpesh2LtsLZ/On9q5pp94DJdv1DuS1j9xAbkliHK64Z+xHn2jXtqPPU1pq++0lmjg6vTVeJoIFebJAruIy2plCat+/AZgJhmgMBXcsWzPVI7wFPqBN+VE/luPGejx/DjiUeakTyUjw2+qF X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: x3XP0vAqezKusxowVmzl1Dr4sGUbaW4xnprcGYdSGgv7Yohiwmr/MMAOBM9YrDLVAhGI0mY3m7QzNI9lCtUjNfndGjRAq/eNgLOqbeiG+yLk0VeMCWnVAWF0Cfuu9YOWS6ad5KpxF+pjuTaCTO+vS+l0wTChDyemdBr2WElmAiQv1gd9JydnCD8NQ4qxvF7KY6V8yiL3E1YZpld4CfiJmaW+PV7bu0ku7mWydSMqa52REonW3ikjNvhnDPSGza/1odKYDp9S+xMTtcEYCzHu1vsFjtXZo6nCab2KzbI4BfSOhheLZZZgJx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Network-Message-Id: ac0885cd-0a0a-41f0-50f7-08dab6f60f21 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2022 02:01:56.0597 (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: PR3P250MB0067 Subject: [FFmpeg-devel] [PATCH 5/7] avcodec/msmpeg4dec: Move setting decode_mb for WMV2 to wmv2dec.c 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: /R2AwU1jmyox It avoids checks and allows to make ff_wmv2_decode_mb() static; furthermore, it allows to avoid a config_components.h inclusion. Signed-off-by: Andreas Rheinhardt --- libavcodec/msmpeg4dec.c | 6 +----- libavcodec/wmv2dec.c | 4 +++- libavcodec/wmv2dec.h | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 8e12e1aab2..bc554ed2eb 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -22,8 +22,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config_components.h" - #include "libavutil/thread.h" #include "avcodec.h" @@ -38,7 +36,6 @@ #include "h263dec.h" #include "mpeg4videodec.h" #include "msmpeg4data.h" -#include "wmv2dec.h" #define DC_VLC_BITS 9 #define V2_INTRA_CBPC_VLC_BITS 3 @@ -391,8 +388,7 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) s->decode_mb= msmpeg4v34_decode_mb; break; case 5: - if (CONFIG_WMV2_DECODER) - s->decode_mb= ff_wmv2_decode_mb; + break; case 6: //FIXME + TODO VC1 decode mb break; diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index a70913134c..2daf6c70e8 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -445,7 +445,7 @@ static inline int wmv2_decode_inter_block(WMV2DecContext *w, int16_t *block, } } -int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]) +static int wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]) { /* The following is only allowed because this encoder * does not use slice threading. */ @@ -573,6 +573,8 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx) if ((ret = ff_msmpeg4_decode_init(avctx)) < 0) return ret; + s->decode_mb = wmv2_decode_mb; + ff_wmv2_common_init(s); return ff_intrax8_common_init(avctx, &w->x8, diff --git a/libavcodec/wmv2dec.h b/libavcodec/wmv2dec.h index cc410afe17..bc8745bf6f 100644 --- a/libavcodec/wmv2dec.h +++ b/libavcodec/wmv2dec.h @@ -23,7 +23,6 @@ #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],