From patchwork Fri Dec 24 03:23:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 32894 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp7811835iog; Thu, 23 Dec 2021 19:24:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQzvSMN+XDuMgUEhUj0fg4MbL2ogg1KHOVfcWeSocQwCMYqpHqGR937S91Eds3TrD9o6rB X-Received: by 2002:a17:907:94ce:: with SMTP id dn14mr3872493ejc.85.1640316272495; Thu, 23 Dec 2021 19:24:32 -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 i20si2671864ejj.658.2021.12.23.19.24.32; Thu, 23 Dec 2021 19:24:32 -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=dsp1RhqQ; 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 4E6C168B264; Fri, 24 Dec 2021 05:24:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064061.outbound.protection.outlook.com [40.92.64.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2900868B22C for ; Fri, 24 Dec 2021 05:24:13 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aSODlWAuCT4qPuTyxiQWN/VOfvNKbI13QFt0OhiuNyyq1SyIVonxpwFXmUJCerhj2uIgUoar4TYkNS21KhrkRHXYVYEEM05hWW+xV2bELjQhdQ+g1ePpM+wl+CdtDcgi201H6TT2OOuaJFYaX+xZYiGljvWKixripjd61XRJIlht+FlGBNcGyth5w14XyAsf0rH0rDHKPLmdcL8TtNJ0j6gV1XvfEWNU7ix7HyikoEUHgBtw9UUxAAC7GTCrbgkSLS0Q12x/MIP2+NG32yYOrAQWbzNgKvipb/jrLck3O85p95U1AT0xnUGM7WJNi9crFsZDLuU0VIW6S9tScqH64g== 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=8SAS6pE/4C07YVntmjxR8YFTIIY9JV31H3nFS8TMLAg=; b=IT+7t6OJ7xAPgTWiKV9Ez266vbQTR66WeLv2YnmpQ8PuLQ34gDvkAZwUSlXuBt+/9hwahwd6a1dt5zRSPTAmJdXSW8rvZ319ycqXEkxJF0tu25kQwJDnHKuxR+vhNk1qGBoTwYOXL+ioNAq9IfWqhF2xIrfhwQf15rMRWV1IVPR1QXkRALvjd9l5W1ZZBb5WO5e+3HJ+Vvdu6j6dyC5SFye0tmRbct+j894q/QsxlkJjTuvVktP98CVbGjvxI+FHLrQooCfhjd5+nU9nnEXs0xgGNULkZ0Ipc+lrwB1GmFIsFlh3HB1A5ZRcDH7Ys/EKAb+qOKHMVKRTS1Y+SKJWEQ== 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=8SAS6pE/4C07YVntmjxR8YFTIIY9JV31H3nFS8TMLAg=; b=dsp1RhqQ6DkmcedtrDG+X3LvTzT+8R9y9J7iRoY96+mhMQJKEhYWhF8fI4gjc2m0ZEHxecaA4KCNySX94mISn1uohQsGtZJ5s85KQd9Tu/XccasmOS6UdpOcaKwtflrAda4BTbDwBoM3AremM982HNhSC8t71vRGAncb89Gx4ZBWMsHGfjNwZIhKbxJaUYqGYa20HUNsOXCL2Wi+QBNfvuTs48hxjD5CvW/ezk7U2hEg6pXZ51N6QHr5uU5aIlpYOgk5dybyGKR/fzyaBRIoqBvNyKOCX1wlw1qUOL72KJsjkG8HTB+0CBdRBFxNwyXu0cYPpbPzNjghWQDUWAlYag== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5249.eurprd03.prod.outlook.com (2603:10a6:20b:c9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Fri, 24 Dec 2021 03:24:08 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%5]) with mapi id 15.20.4823.019; Fri, 24 Dec 2021 03:24:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Dec 2021 04:23:30 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [FW8itKCvg1wwC90+5cCOuZeR7R6xJS4E] X-ClientProxiedBy: AS9PR0301CA0032.eurprd03.prod.outlook.com (2603:10a6:20b:469::30) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211224032332.2104747-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0af7523a-c329-4810-0ec8-08d9c68cd8ab X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEuBoyQUf2rHPVuupI3Je4ybkkniQ49XJyx07B036V/QUU3UzXSpDZ6ZbpqC35PxY1/ImuQLaB0cZDIsc9dG7LVsh2smYd/6bfKRxLzRKJRrTo6zwPmmy74cCyvghPxvmpyUcO/VrEEFn+nF9utGMH3ezVJTTO2ptmF2k+kDUa5cd4zyb3IV6re4PHN6lLAbkpXy7cROgG80fr/Ntt87GG+SpNocxmAhdSrhpN0Kdk9AA7HelEzwY2VI3es2YXOhBieRGYzxUuDjCjHa/h5k6ABbK3qhpOV6NCCg3dtxoAsVapkPCSxun2RtbQn4qsB9MIZlRQtGcv1mmsUfcUCZm5cQqurZHThCewiEwyURZ6DxIztGvs4vEmQZGej1cDS1Nnb7SYkVSnsXjMg7m26fKZwcO5wYDwzUU+vGpZTeTE22lwWQFQ7RATdRvjbQZSdZ4G3HZBjhjVg+F03clkuPCyNmb0KjleUCoXP45IqkwPjmFtSHCiaBR4KdQhMp75BRsLsX7FjL1NARxJmX7RxSuCn67JRil2+NUpBr2F3iXKhtIBUz7bMge/B7i3v/s0djRUMJpXdZgdIRCXdCS/SfzglCdVKLkyfYcuARFx1tsdoFw+/MSxWL1Kg8rSEqXMwHtElQRziusW0sfruqJIIZmukf6+hZfXoaVxdLZVk8g6dBCkiaQV61wY6BAtsU1gVYUfrdDvvj6jiBi0lkfwLgbjogXqoYLVAiEtsPTKNK6bT7+ULMNmUsgJZ/dB+k3L1v5mS8pJmNr7k9B+iLsuwWmiof X-MS-TrafficTypeDiagnostic: AM6PR03MB5249:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X/qtuTCvqhBdPzL+M2YPQrGg4LqQxouoQJep+G8g6TR4K/FJDOv4G/qPvrKx5w5i2pISoY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RsPH9y14/t+6b1QFXhqn+Tie3BLGMiijLuLF/71jS8QejlDBbCZMKuk6HbMbFibqM9isow07wCcpt+Ob+WDNHy1/wvA3YKMQzCc30VXUH3blDCREesGsRboKnMzChlPiWUeJ/OijU6GuEjtvZ5tNnov3s1mUy7J7BMB/rVuBpdZKzm49ETBjdwOFHXU8I0KUwr2v0xlPqRA/mmZMC5drW1J/pWdq77Bic2KCEcrqzOCvW5DR44sw8bQQ38uBpqoPlwZSBJd5ZWqo9eenHIq43j6jFCTDSmkZ3Dg+Qcxn+3kZ5lyPgY18Ii0/EPhFFeZTvXlsQX5BrchGq7GAhLTHAE93f6MGkNtLQgvxAGmGr9h6sP1H9IW9q6GUwCBgb0VY/LPAH0Opy2PKlNyexPSuZCytr2wHKbMNWAFMid40hpKOFW8DM1EZVJpAJuWciDJX6YVWVtnqOuqvGbzIWc472CqmkJLm6ieew== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0af7523a-c329-4810-0ec8-08d9c68cd8ab X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Dec 2021 03:24:08.4320 (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: AM6PR03MB5249 Subject: [FFmpeg-devel] [PATCH 34/36] configure: Add new mpegvideodec CONFIG_EXTRA 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: QuCCyqcbV8Lt This allows to remove the spurious dependencies of mpegvideo encoders on error_resilience; some other components that do not use mpegvideo to its fullest turned out to not need it either. Adding a new CONFIG_EXTRA needs a reconfigure to take effect. In order to force this a few unnecessary headers from lavfi/allfilters.c have been removed. Signed-off-by: Andreas Rheinhardt --- configure | 26 ++++++++++++++------------ libavcodec/Makefile | 3 ++- libavcodec/mpegvideo.c | 2 +- libavfilter/allfilters.c | 2 -- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 23ef2abc9b..f3bdfd2920 100755 --- a/configure +++ b/configure @@ -2476,6 +2476,7 @@ CONFIG_EXTRA=" mpegaudiodsp mpegaudioheader mpegvideo + mpegvideodec mpegvideoenc mss34dsp pixblockdsp @@ -2723,7 +2724,8 @@ me_cmp_select="fdctdsp idctdsp pixblockdsp" mpeg_er_select="error_resilience" mpegaudio_select="mpegaudiodsp mpegaudioheader" mpegaudiodsp_select="dct" -mpegvideo_select="blockdsp h264chroma hpeldsp idctdsp me_cmp mpeg_er videodsp" +mpegvideo_select="blockdsp h264chroma hpeldsp idctdsp me_cmp videodsp" +mpegvideodec_select="mpegvideo mpeg_er" mpegvideoenc_select="aandcttables me_cmp mpegvideo pixblockdsp qpeldsp" vc1dsp_select="h264chroma qpeldsp startcode" rdft_select="fft" @@ -2812,9 +2814,9 @@ fraps_decoder_select="bswapdsp huffman" g2m_decoder_deps="zlib" g2m_decoder_select="blockdsp idctdsp jpegtables" g729_decoder_select="audiodsp" -h261_decoder_select="mpegvideo" +h261_decoder_select="mpegvideodec" h261_encoder_select="mpegvideoenc" -h263_decoder_select="h263_parser h263dsp mpegvideo qpeldsp" +h263_decoder_select="h263_parser h263dsp mpegvideodec qpeldsp" h263_encoder_select="h263dsp mpegvideoenc" h263i_decoder_select="h263_decoder" h263p_decoder_select="h263_decoder" @@ -2836,7 +2838,7 @@ indeo3_decoder_select="hpeldsp" indeo4_decoder_select="ividsp" indeo5_decoder_select="ividsp" interplay_video_decoder_select="hpeldsp" -ipu_decoder_select="mpegvideo" +ipu_decoder_select="mpegvideodec" jpegls_decoder_select="mjpeg_decoder" jv_decoder_select="blockdsp" lagarith_decoder_select="llviddsp" @@ -2866,10 +2868,10 @@ mp3on4_decoder_select="mpegaudio" mp3on4float_decoder_select="mpegaudio" mpc7_decoder_select="bswapdsp mpegaudiodsp" mpc8_decoder_select="mpegaudiodsp" -mpegvideo_decoder_select="mpegvideo" -mpeg1video_decoder_select="mpegvideo" +mpegvideo_decoder_select="mpegvideodec" +mpeg1video_decoder_select="mpegvideodec" mpeg1video_encoder_select="mpegvideoenc h263dsp" -mpeg2video_decoder_select="mpegvideo" +mpeg2video_decoder_select="mpegvideodec" mpeg2video_encoder_select="mpegvideoenc h263dsp" mpeg4_decoder_select="h263_decoder mpeg4video_parser" mpeg4_encoder_select="h263_encoder" @@ -2880,7 +2882,7 @@ msmpeg4v2_decoder_select="h263_decoder" msmpeg4v2_encoder_select="h263_encoder" msmpeg4v3_decoder_select="h263_decoder" msmpeg4v3_encoder_select="h263_encoder" -mss2_decoder_select="mpegvideo qpeldsp vc1_decoder" +mss2_decoder_select="mpegvideodec qpeldsp vc1_decoder" mts2_decoder_select="jpegtables mss34dsp" mv30_decoder_select="aandcttables blockdsp" mvha_decoder_deps="zlib" @@ -2913,8 +2915,8 @@ rv10_decoder_select="h263_decoder" rv10_encoder_select="h263_encoder" rv20_decoder_select="h263_decoder" rv20_encoder_select="h263_encoder" -rv30_decoder_select="golomb h264pred h264qpel mpegvideo rv34dsp" -rv40_decoder_select="golomb h264pred h264qpel mpegvideo rv34dsp" +rv30_decoder_select="golomb h264pred h264qpel mpegvideodec rv34dsp" +rv40_decoder_select="golomb h264pred h264qpel mpegvideodec rv34dsp" screenpresso_decoder_deps="zlib" shorten_decoder_select="bswapdsp" sipr_decoder_select="lsp" @@ -2950,7 +2952,7 @@ txd_decoder_select="texturedsp" utvideo_decoder_select="bswapdsp llviddsp" utvideo_encoder_select="bswapdsp huffman llvidencdsp" vble_decoder_select="llviddsp" -vc1_decoder_select="blockdsp h263_decoder h264qpel intrax8 mpegvideo vc1dsp" +vc1_decoder_select="blockdsp h263_decoder h264qpel intrax8 mpegvideodec vc1dsp" vc1image_decoder_select="vc1_decoder" vorbis_decoder_select="mdct" vorbis_encoder_select="audio_frame_queue mdct" @@ -3246,7 +3248,7 @@ h264_parser_select="atsc_a53 golomb h264dsp h264parse" hevc_parser_select="hevcparse" mpegaudio_parser_select="mpegaudioheader" mpegvideo_parser_select="mpegvideo" -mpeg4video_parser_select="h263dsp mpegvideo qpeldsp" +mpeg4video_parser_select="h263dsp mpegvideodec qpeldsp" vc1_parser_select="vc1dsp" # bitstream_filters diff --git a/libavcodec/Makefile b/libavcodec/Makefile index e7f1f110e7..df118fd3e7 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -123,9 +123,10 @@ OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \ mpegaudiodsp_fixed.o \ mpegaudiodsp_float.o OBJS-$(CONFIG_MPEGAUDIOHEADER) += mpegaudiodecheader.o mpegaudiodata.o -OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideo_dec.o mpegvideodsp.o rl.o \ +OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideodsp.o rl.o \ mpegvideo_motion.o mpegutils.o \ mpegvideodata.o mpegpicture.o +OBJS-$(CONFIG_MPEGVIDEODEC) += mpegvideo_dec.o OBJS-$(CONFIG_MPEGVIDEOENC) += mpegvideo_enc.o mpeg12data.o \ motion_est.o ratecontrol.o \ mpegvideoencdsp.o diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index a2c4e14b6e..1c2b28f450 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -658,7 +658,7 @@ int ff_mpv_init_context_frame(MpegEncContext *s) return AVERROR(ENOMEM); memset(s->mbintra_table, 1, mb_array_size); - return s->encoding ? 0 : ff_mpeg_er_init(s); + return !CONFIG_MPEGVIDEODEC || s->encoding ? 0 : ff_mpeg_er_init(s); } static void clear_context(MpegEncContext *s) diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 26f1c73505..f506ef64cc 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -19,9 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/thread.h" #include "avfilter.h" -#include "config.h" extern const AVFilter ff_af_abench; extern const AVFilter ff_af_acompressor;