From patchwork Thu Aug 25 02:07:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37466 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp60355pzh; Wed, 24 Aug 2022 19:08:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR7jIp0DGJuLKFy4jqo8gR44LvW1dWxuDiPtJhGBFQgUL41WxDyxygqmmBmt0eiEmBC+qeCc X-Received: by 2002:a17:906:8a4e:b0:730:9fcd:d988 with SMTP id gx14-20020a1709068a4e00b007309fcdd988mr1002177ejc.636.1661393295545; Wed, 24 Aug 2022 19:08:15 -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 s19-20020a056402165300b0043cc4d599f8si532463edx.161.2022.08.24.19.08.05; Wed, 24 Aug 2022 19:08:15 -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=HCEGZANF; 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 9617868B9A0; Thu, 25 Aug 2022 05:07:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072077.outbound.protection.outlook.com [40.92.72.77]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 59DB968B959 for ; Thu, 25 Aug 2022 05:07:51 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LW/OKyZnlJkA3YE6Hc9rps9xH5u0YMdf8FP2fEz7ggOidVLAJbzN1EcdxUcqTvvyi+2Rr6um3VqXTRGIIBivssBORZTKrtPG9CmjlDgjXcm2piZxiGbwECO/LmIEpcSHryEYUqqFrK9FjAuUondj8o19rarDXHSzeWAVTFAfyaXfupDKDSgXhSzdelmzHLqNeDn3C5x7xneQ+uifznAW1HdkbyI+FH2Fy4AGyl5iAthf9eVeyJ6P+YA8kNsXCt/EgYJsKgu7FeyhkZhp1qgTWBW5f8cmAx3pyBAVop0kJRvfHCteb3jstHKpkovv5lUgZ9hMsE6Qm5TLdItxdDucSw== 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=B0C0fyG7HMaLKG1Jvq0nyTWLUNCCb6gqiXpTIUU1pKU=; b=cJSbEBnMDbb1zAkNr45glv5PkFzDExjx8/TQ3P2YsnywLB/JBlOdQJFXHky9W7govMo4XsVNlwMx6NLosWuJITR+ZUfcMBFZDswdlR7ZLnnMtsm8ZJxTW7PFer8Cpco15e7frCXyqE6fP8UMMjuHkvmgq9dyOTGNfRb5hhe0UnCCJ6ubap2hjb11JNw/51gMbF+0LecTK31fumOKXO2zPBlttHx+f9Emqnc81y8DGJKAYHjpQtaauuqrW52ltnBnlYESf0l9SedsZJGGoKGtVCSYQ624Brpl2XKiGSrk8ORhgTCoYg3SoYp3kiLNZolSZ495MYoPBXqyM000bj3qpg== 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=B0C0fyG7HMaLKG1Jvq0nyTWLUNCCb6gqiXpTIUU1pKU=; b=HCEGZANF0ojfAc9tmSKMpIbHqFUBADcYCwq67PfqpcFvcAcZu/7wxE4gRyahoEok3/N3W4z56F3V7bPR+B1PWKeL2bV3Q6tAUqWMLMhIA+JAX5PbKdUgUBElaX5SG5FrFpU5H2trk+nEGwW6U44cvINTXAe/l4fJH1tzDOy8KViR9+ahaKBYAbs0zsnTxB905ywOHTQCeSTOIswEesKAeWvdgrRVKD/86ADrineYNlFvev3klE7Mr8Yn8hCNkykvQ8tWUHftI2XZqzp2cF9Tb7le3De87vwv3wpLKHz26pu38tzcCY21MnN+bVl2hsTaqmFKtlt4jV6rkgtPSAuuGg== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by VE1PR01MB5726.eurprd01.prod.exchangelabs.com (2603:10a6:803:124::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Thu, 25 Aug 2022 02:07:46 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46%11]) with mapi id 15.20.5546.022; Thu, 25 Aug 2022 02:07:45 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Aug 2022 04:07:14 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [+J2E7RYZZZjBI4l+Jwiz5aqEGfIztq4H] X-ClientProxiedBy: FR0P281CA0095.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::12) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220825020721.405811-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f414c191-5440-4a95-36e0-08da863e99ca X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmpE5Ud63VVPnzi67JlvJlcMUbbU8eKeATfyyO1Erlcoc2h4fxfqWNneLATZbO6yEPKJWqyoOVzoDXELPjG9L/uKhMhL1kgFMa0xujcieB6HKIuEicJpOcS7EEL01jluDhfRc1O1txow4z4bpAEISW5r9VyXDMXaPAiSnh8c1yUVgnBjDEisYkl579QJsWlaSteRoQ9c+HQjTkn1l6u3+RGNeQnfNIv6/9pkirU3vVpPkvA2NXBkFEXAhdwxbf6L33eeeMocSOhFySdDWd3EOTHhrr4s33STRLnDKQCA4p/V6a1P/nJwTpS6rk+zEpuxnJWz7fEQ1SOnXnZ5F23VUf3JaMLeOekyi5y9z39s8Pmd7FUWf4/a49DW3KUlcQNRvwFF2rjYM49CouwQfxX6CXNvWY9pW6mK8INa9Lp6Runqlzo/82D+o3IuCBNxwGKPfrKSCJ8i3ZUDzdOn7h9xPBjlYDDQkrc4lF3leH7cPAT+7mJl+IVovsVhXgySUFeHXqDPSPsEGfbp7FCm5IDr9TLaotCkGDhAHS0z/kr7rzRPrWgorkbSQIiI99VfIzu3X/emNbzQ8EqLSs7YJrz6j3jMcqf5scbELajjMnCbrA7ToxyT+Ws/8gs9E5xJRDtXzT5KOEtKCiHEevz/dJAunqVTp6Ded0SY65Aep3OqpgRam4GfXYJ80tnIC9jGi83t5Oa1r6yNgVMQRgDV2G0Kb4Ibc3silsdZL9R9pLTODNHJTyaImoPnufGuTuTf0AERXcs= X-MS-TrafficTypeDiagnostic: VE1PR01MB5726:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4ERR67khZlqRMbpsxSuzVzWmdPs6NornRR49nqbf3/+AjBjqI+T2n5HSI1rG6j/4U0bdb2p13OKyFUbPYWxrem/B1howCmFZXMsGBDg4VbNq3qGpxfK+bdMFivf04nqoSu6+wwu6ijjVoiH2x0l+jwybVeITXiZm5RKJmsB7o0MEa9gBWeG1aLpFS0e+xzuhqif/WaVmGGcZG/UlIZGZ1D8MmLsfimHklvn5FpJTg4rGAcMkCx8L1+IxRj8FWRW6IEdgmrwYyav8Qii51SfR2mgwqL5+xV9OhZe+6clLvxcjkHkjiAhC14npdSmjE28sWazC8kQWvFi2498bH1GNf6N0b+hAlzuVZpTUZGZF/H2LAb4Pf40LkMnFjDcY/yYq6oBow1EcF2z9dp8J5hqnTt7PUmfMDWVgA6FKGfBVluEOVJhVToOwEMf/2VJWvIZ2z71rbCNl8Js5Y6ega9I6gg3qMudtlzO1nVvXDCZwDprWl3OrhLTKMcmBPnZi//cE6m8haHgvCg8iMZ/B+XKjRNaHYhG9lzvfiMBxR2hgaBrv/L6CGbLROtKM6hP2djBDjME484BMswiLRRMKb60eKw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: spxv2VkndA1I0oNhrWhLO/Y7hQOkFkTM3DI8Oa6Xh/2vGw9xlSnJj3wLtsgC0rrmukLi0z0Jgr8x8oyMiV6o8lBZI7d+VVVzcNgkG5pfA+VgCx2m07HGnGZlAIRO/VBNPbl5mEZqe+6amb24tESm8RBdO8iFd8Zo0inzQpm0rWdFBrAIhziNAQcM0yuu3CtI1uY2mwdjac97zgGpCp/sEvGbVkxDIjxgb1lUxmHsgqzWM+yvaK7hIczKKYV5guYQTUKrWUuL94JQot+kem2rfLRK995iLpz15KHSekORGkwmjYoSQPsa1bSidwAEcScUMPm8YtsL7yj3UOoDSHwnAfxIS3v9MZsYRLeKeW4BxmHwtwLt2m9sTclSgvqbN5+FyMylv5wxrL+cK/4RbJKZ5WLuPPryF6GC4BNoQ/ROjxpmJZmywd486PXypMj+SHy0wL5X1VYHzrftn2Uh5yvLFTvPsFtO4p+VU7Z8w8gaMSjx2hBm9Tco4ODyWz/uLqrNFh8mvqpBsC2xqRygj+WkarXRtbxrxkOuFkR83QnpmkU6iYJSakzb4h4ygOGWw9RyUcW44JyCW4N3e4SqSaxvbVLBltf2DHbpEgihxdrXBZBUHgIKf9U5EdtY1wFpnH++FPKnIv5HuhGdIRN6FhpRNWwFb0i7QpCfdwBGhEQri6m9hVpeg21FxhwjuUr/G5PzNOO9sftc0FLTvZsVuxCTcwtqYJEGkW+w/j8ZiQbcBmJwLunMXv7HY1p894UehuPQw7ofysIJQkLuyDu+tlPX39Dg84BrtTgHQNAuZpNIn0jbJPvrMLvMx6o6BqfyqQEfNROl+1FlF/ELwyS+F8/8o0wCeSG/ToOEQxcsLb/Fn3dCeDk65SAgS3eljPPw3/SWCk9fSy+AtB1nAM5p0Ki/CC2B6tT1lHAKUW7x8hj89HrJr3Gh8kAuhoEiGRcs+qqyg+RvYZYMpiJf6gBkeRRK+82YUUgujBkn7nlcRBsK5oI7nU6WAOb7rvWb55dxCulGeJc99TRSHhHA2ge+xr1gefwKC6q2veYJkeMqXsNdn+C3W7YjGa0pU8VePU6Da81KfL0ob7wli+KGr6OBiH0qzolWY4GCP9mL9DfcsDsiQCDPkfd6u/NOe0dnKhI2AaTBrybZuCSL1Dgfw3rnmOF3KCZQWyESDAHuON4R7jgfy2aWRFvWyX0fM0U72H5iXgZmGWGAyt8yPc+UKaEjFSWLvEbCHBsXwI5Fa20zK3vNnUkori9SjkVGtWQiu8Y05k/ECQUGVP6wyL0miMU2UX2bAf72dInYmQrAgHtOOOkx9Aw= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f414c191-5440-4a95-36e0-08da863e99ca X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2022 02:07:45.6981 (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: VE1PR01MB5726 Subject: [FFmpeg-devel] [PATCH 14/21] avcodec/internal: Move ff_reget_buffer() to decode.h 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: ilje95HyxoAq Only used by decoders. Also clean up the headers a bit while removing now unnecessary internal.h inclusions. Signed-off-by: Andreas Rheinhardt --- libavcodec/aasc.c | 4 +--- libavcodec/anm.c | 2 +- libavcodec/ansi.c | 1 + libavcodec/argo.c | 5 +---- libavcodec/avs.c | 1 + libavcodec/bethsoftvideo.c | 2 +- libavcodec/bink.c | 1 + libavcodec/c93.c | 1 + libavcodec/cdgraphics.c | 1 + libavcodec/cdtoons.c | 2 +- libavcodec/cinepak.c | 2 -- libavcodec/clearvideo.c | 1 + libavcodec/cpia.c | 4 ++-- libavcodec/cscd.c | 4 +--- libavcodec/decode.h | 7 +++++++ libavcodec/dsicinvideo.c | 2 +- libavcodec/fic.c | 2 +- libavcodec/flashsv.c | 1 + libavcodec/flicvideo.c | 4 +--- libavcodec/gifdec.c | 1 + libavcodec/imx.c | 1 - libavcodec/indeo2.c | 3 +-- libavcodec/internal.h | 7 ------- libavcodec/jvdec.c | 1 + libavcodec/lscrdec.c | 2 +- libavcodec/midivid.c | 7 +------ libavcodec/mmvideo.c | 2 +- libavcodec/mobiclip.c | 4 ++-- libavcodec/motionpixels.c | 2 +- libavcodec/msrle.c | 3 --- libavcodec/mss1.c | 2 +- libavcodec/mss2.c | 1 + libavcodec/mss3.c | 2 +- libavcodec/mss4.c | 2 +- libavcodec/msvideo1.c | 3 --- libavcodec/nuv.c | 1 + libavcodec/pafvideo.c | 2 +- libavcodec/qtrle.c | 3 --- libavcodec/roqvideodec.c | 3 +-- libavcodec/rpza.c | 5 +---- libavcodec/rscc.c | 1 - libavcodec/scpr.c | 1 + libavcodec/screenpresso.c | 3 +-- libavcodec/smacker.c | 1 + libavcodec/smc.c | 4 ---- libavcodec/tiertexseqv.c | 1 + libavcodec/truemotion1.c | 1 + libavcodec/truemotion2.c | 2 +- libavcodec/tscc.c | 4 ---- libavcodec/tscc2.c | 2 +- libavcodec/ulti.c | 6 +----- libavcodec/vmnc.c | 6 +----- libavcodec/vqavideo.c | 1 + libavcodec/wcmv.c | 4 +--- libavcodec/xxan.c | 2 +- libavcodec/yop.c | 3 +-- 56 files changed, 55 insertions(+), 91 deletions(-) diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index d6afa35b86..db9fc834b7 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -24,13 +24,11 @@ * Autodesk RLE Video Decoder by Konstantin Shishkov */ -#include -#include #include #include "avcodec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "msrledec.h" typedef struct AascContext { diff --git a/libavcodec/anm.c b/libavcodec/anm.c index a66ee1e65b..c7256fe6d3 100644 --- a/libavcodec/anm.c +++ b/libavcodec/anm.c @@ -27,7 +27,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct AnmContext { AVFrame *frame; diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c index a6b15c728f..1cd9ebceba 100644 --- a/libavcodec/ansi.c +++ b/libavcodec/ansi.c @@ -31,6 +31,7 @@ #include "avcodec.h" #include "cga_data.h" #include "codec_internal.h" +#include "decode.h" #include "internal.h" #define ATTR_BOLD 0x01 /**< Bold/Bright-foreground (mode 1) */ diff --git a/libavcodec/argo.c b/libavcodec/argo.c index b772e9c565..a863373af2 100644 --- a/libavcodec/argo.c +++ b/libavcodec/argo.c @@ -19,18 +19,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include #include -#include "libavutil/imgutils.h" #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct ArgoContext { GetByteContext gb; diff --git a/libavcodec/avs.c b/libavcodec/avs.c index 20c07aeeed..86a41a31be 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -21,6 +21,7 @@ #include "avcodec.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "internal.h" diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c index a2e8f412d6..ea5016bae5 100644 --- a/libavcodec/bethsoftvideo.c +++ b/libavcodec/bethsoftvideo.c @@ -32,7 +32,7 @@ #include "bethsoftvideo.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct BethsoftvidContext { AVFrame *frame; diff --git a/libavcodec/bink.c b/libavcodec/bink.c index 09be0488de..e6d9bdc2fa 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -32,6 +32,7 @@ #include "binkdsp.h" #include "blockdsp.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "hpeldsp.h" #include "internal.h" diff --git a/libavcodec/c93.c b/libavcodec/c93.c index 196b95e428..871ae589e6 100644 --- a/libavcodec/c93.c +++ b/libavcodec/c93.c @@ -22,6 +22,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "internal.h" typedef struct C93DecoderContext { diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index 0070d9b8e6..240c57d5f8 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -22,6 +22,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "internal.h" /** diff --git a/libavcodec/cdtoons.c b/libavcodec/cdtoons.c index c1b4577dca..00fbe58c26 100644 --- a/libavcodec/cdtoons.c +++ b/libavcodec/cdtoons.c @@ -32,7 +32,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #define CDTOONS_HEADER_SIZE 44 #define CDTOONS_MAX_SPRITES 1200 diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index 4cbbac8e36..480afbc81d 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -34,7 +34,6 @@ */ #include -#include #include #include "libavutil/common.h" @@ -42,7 +41,6 @@ #include "avcodec.h" #include "codec_internal.h" #include "decode.h" -#include "internal.h" typedef uint8_t cvid_codebook[12]; diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 47570a95c2..4e5fc02e23 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -30,6 +30,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "idctdsp.h" #include "internal.h" diff --git a/libavcodec/cpia.c b/libavcodec/cpia.c index 8b8c59f40f..c798038161 100644 --- a/libavcodec/cpia.c +++ b/libavcodec/cpia.c @@ -22,10 +22,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "codec_internal.h" -#include "get_bits.h" -#include "internal.h" +#include "decode.h" #define FRAME_HEADER_SIZE 64 diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c index 64d29a942c..51756b6d12 100644 --- a/libavcodec/cscd.c +++ b/libavcodec/cscd.c @@ -18,12 +18,10 @@ * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include #include "avcodec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "libavutil/common.h" #if CONFIG_ZLIB diff --git a/libavcodec/decode.h b/libavcodec/decode.h index 81767f73fd..d9014d3e0f 100644 --- a/libavcodec/decode.h +++ b/libavcodec/decode.h @@ -112,4 +112,11 @@ int ff_decode_preinit(AVCodecContext *avctx); */ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt); +#define FF_REGET_BUFFER_FLAG_READONLY 1 ///< the returned buffer does not need to be writable +/** + * Identical in function to ff_get_buffer(), except it reuses the existing buffer + * if available. + */ +int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags); + #endif /* AVCODEC_DECODE_H */ diff --git a/libavcodec/dsicinvideo.c b/libavcodec/dsicinvideo.c index e8d79bfb5d..32efefade1 100644 --- a/libavcodec/dsicinvideo.c +++ b/libavcodec/dsicinvideo.c @@ -27,7 +27,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef enum CinVideoBitmapIndex { CIN_CUR_BMP = 0, /* current */ diff --git a/libavcodec/fic.c b/libavcodec/fic.c index 3a0211ebe0..cb536cf36e 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -26,7 +26,7 @@ #include "libavutil/opt.h" #include "avcodec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "get_bits.h" #include "golomb.h" diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 8215d04ce8..11d6657394 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -43,6 +43,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "internal.h" #include "zlib_wrapper.h" diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c index 50b317d974..e141d90a37 100644 --- a/libavcodec/flicvideo.c +++ b/libavcodec/flicvideo.c @@ -34,15 +34,13 @@ * in which the header is only 12 bytes. */ -#include -#include #include #include "libavutil/intreadwrite.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "mathops.h" #define FLI_256_COLOR 4 diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index 84ff8aa789..15d4f9743f 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -26,6 +26,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "internal.h" #include "lzw.h" #include "gif.h" diff --git a/libavcodec/imx.c b/libavcodec/imx.c index 4856de0c70..68fdbc4ae9 100644 --- a/libavcodec/imx.c +++ b/libavcodec/imx.c @@ -23,7 +23,6 @@ #include "bytestream.h" #include "codec_internal.h" #include "decode.h" -#include "internal.h" typedef struct SimbiosisIMXContext { AVFrame *frame; diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index 9bad9bf0b3..8a4b1a584a 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -30,10 +30,9 @@ #define BITSTREAM_READER_LE #include "avcodec.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "indeo2data.h" -#include "internal.h" -#include "mathops.h" typedef struct Ir2Context{ AVCodecContext *avctx; diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 03b200c444..fde0cc0ad6 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -220,13 +220,6 @@ static av_always_inline float ff_exp2fi(int x) { */ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags); -#define FF_REGET_BUFFER_FLAG_READONLY 1 ///< the returned buffer does not need to be writable -/** - * Identical in function to ff_get_buffer(), except it reuses the existing buffer - * if available. - */ -int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags); - int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx); int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec); diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index bca2603330..420a00a790 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -30,6 +30,7 @@ #include "avcodec.h" #include "blockdsp.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "internal.h" diff --git a/libavcodec/lscrdec.c b/libavcodec/lscrdec.c index 0d6b29cced..cd7dc8b2b7 100644 --- a/libavcodec/lscrdec.c +++ b/libavcodec/lscrdec.c @@ -29,7 +29,7 @@ #include "bytestream.h" #include "codec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "packet.h" #include "png.h" #include "pngdsp.h" diff --git a/libavcodec/midivid.c b/libavcodec/midivid.c index 7448c8c797..49f31b0fa7 100644 --- a/libavcodec/midivid.c +++ b/libavcodec/midivid.c @@ -19,13 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include - #include "libavutil/imgutils.h" #include "libavutil/internal.h" -#include "libavutil/intreadwrite.h" #include "libavutil/mem.h" #define BITSTREAM_READER_LE @@ -33,7 +28,7 @@ #include "get_bits.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct MidiVidContext { GetByteContext gb; diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index 85e126b17e..97e55119e4 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -35,7 +35,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #define MM_PREAMBLE_SIZE 6 diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index b5ec806e89..b99b070c56 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -27,12 +27,12 @@ #include "libavutil/thread.h" #include "avcodec.h" -#include "bytestream.h" #include "bswapdsp.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "golomb.h" -#include "internal.h" +#include "mathops.h" #define MOBI_RL_VLC_BITS 12 #define MOBI_MV_VLC_BITS 6 diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 8b4f5c1017..51e22c04c8 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -27,7 +27,7 @@ #include "get_bits.h" #include "bswapdsp.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #define MAX_HUFF_CODES 16 diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index 72134bc4a6..447d18002c 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -28,14 +28,11 @@ * The MS RLE decoder outputs PAL8 colorspace data. */ -#include -#include #include #include "avcodec.h" #include "codec_internal.h" #include "decode.h" -#include "internal.h" #include "msrledec.h" #include "libavutil/imgutils.h" diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c index d130a8f29c..8a5f00674a 100644 --- a/libavcodec/mss1.c +++ b/libavcodec/mss1.c @@ -26,7 +26,7 @@ #include "avcodec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "mss12.h" typedef struct MSS1Context { diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index 6019368e07..f7dade4a29 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -25,6 +25,7 @@ #include "libavutil/avassert.h" #include "codec_internal.h" +#include "decode.h" #include "error_resilience.h" #include "internal.h" #include "mpeg_er.h" diff --git a/libavcodec/mss3.c b/libavcodec/mss3.c index 2e331ac802..0464bd12a6 100644 --- a/libavcodec/mss3.c +++ b/libavcodec/mss3.c @@ -27,7 +27,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "mathops.h" #include "mss34dsp.h" diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index 53b7910097..21e0536319 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -31,8 +31,8 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" -#include "internal.h" #include "jpegtables.h" #include "mss34dsp.h" #include "unary.h" diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index 8db31676f0..aeb3027b5f 100644 --- a/libavcodec/msvideo1.c +++ b/libavcodec/msvideo1.c @@ -26,8 +26,6 @@ * http://www.pcisys.net/~melanson/codecs/ */ -#include -#include #include #include "libavutil/internal.h" @@ -35,7 +33,6 @@ #include "avcodec.h" #include "codec_internal.h" #include "decode.h" -#include "internal.h" #define PALETTE_COUNT 256 #define CHECK_STREAM_PTR(n) \ diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 3f03775b7f..c404bd8cf0 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -30,6 +30,7 @@ #include "libavutil/imgutils.h" #include "avcodec.h" #include "codec_internal.h" +#include "decode.h" #include "idctdsp.h" #include "internal.h" #include "rtjpeg.h" diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c index d9fbd19543..cb57b2a5a6 100644 --- a/libavcodec/pafvideo.c +++ b/libavcodec/pafvideo.c @@ -25,7 +25,7 @@ #include "bytestream.h" #include "copy_block.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" static const uint8_t block_sequences[16][8] = { diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 2c070c0bc2..569c68359b 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -31,15 +31,12 @@ * data. 24-bit data is RGB24 and 32-bit data is RGB32. */ -#include -#include #include #include "avcodec.h" #include "decode.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" typedef struct QtrleContext { AVCodecContext *avctx; diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c index 4fbb0ca94d..2f7f91d41f 100644 --- a/libavcodec/roqvideodec.c +++ b/libavcodec/roqvideodec.c @@ -26,12 +26,11 @@ */ #include "libavutil/avassert.h" -#include "libavutil/imgutils.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "roqvideo.h" static void roqvideo_decode_frame(RoqContext *ri, GetByteContext *gb) diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c index d5ece16c32..f9ab3a7647 100644 --- a/libavcodec/rpza.c +++ b/libavcodec/rpza.c @@ -35,15 +35,12 @@ */ #include -#include -#include -#include #include "libavutil/internal.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct RpzaContext { diff --git a/libavcodec/rscc.c b/libavcodec/rscc.c index eff4f87750..e74f2defe7 100644 --- a/libavcodec/rscc.c +++ b/libavcodec/rscc.c @@ -45,7 +45,6 @@ #include "bytestream.h" #include "codec_internal.h" #include "decode.h" -#include "internal.h" #define TILE_SIZE 8 diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c index ed129a507d..ff78041386 100644 --- a/libavcodec/scpr.c +++ b/libavcodec/scpr.c @@ -27,6 +27,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "internal.h" #include "scpr.h" #include "scpr3.h" diff --git a/libavcodec/screenpresso.c b/libavcodec/screenpresso.c index f5bc46ff99..a5ca32765f 100644 --- a/libavcodec/screenpresso.c +++ b/libavcodec/screenpresso.c @@ -34,7 +34,6 @@ */ #include -#include #include #include "libavutil/imgutils.h" @@ -43,7 +42,7 @@ #include "avcodec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct ScreenpressoContext { AVFrame *current; diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 06af0fb7b6..5ef84a068f 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -51,6 +51,7 @@ #define BITSTREAM_READER_LE #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "internal.h" #include "mathops.h" diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 28dc2b4d3c..c4364cfe8c 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -28,16 +28,12 @@ * The SMC decoder outputs PAL8 colorspace data. */ -#include -#include #include -#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" #include "decode.h" -#include "internal.h" #define CPAIR 2 #define CQUAD 4 diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c index 26711a3bc4..9e1b10a40c 100644 --- a/libavcodec/tiertexseqv.c +++ b/libavcodec/tiertexseqv.c @@ -27,6 +27,7 @@ #define BITSTREAM_READER_LE #include "avcodec.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" #include "internal.h" diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index fc9f8118be..ee41b0ed4d 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -35,6 +35,7 @@ #include "avcodec.h" #include "codec_internal.h" +#include "decode.h" #include "internal.h" #include "libavutil/imgutils.h" #include "libavutil/internal.h" diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index ec3f0d0d08..3784733bee 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -30,8 +30,8 @@ #include "bswapdsp.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" -#include "internal.h" #define TM2_ESCAPE 0x80000000 #define TM2_DELTAS 64 diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index 601ee198b1..89c4413647 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -34,13 +34,9 @@ * Supports: BGR8,BGR555,BGR24 - only BGR8 and BGR555 tested */ -#include -#include - #include "avcodec.h" #include "codec_internal.h" #include "decode.h" -#include "internal.h" #include "msrledec.h" #include "zlib_wrapper.h" diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index a50a8da738..ba84a07da7 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -32,8 +32,8 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "get_bits.h" -#include "internal.h" #include "mathops.h" #include "tscc2data.h" diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index b9d17da60e..a3abec3d5a 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -24,14 +24,10 @@ * IBM Ultimotion Video Decoder. */ -#include -#include -#include - #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "ulti_cb.h" diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c index e6e5442a16..2d47f8ec0f 100644 --- a/libavcodec/vmnc.c +++ b/libavcodec/vmnc.c @@ -25,14 +25,10 @@ * As Alex Beregszaszi discovered, this is effectively RFB data dump */ -#include -#include - #include "libavutil/common.h" -#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "bytestream.h" enum EncTypes { diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index a195eae584..61c30c2a62 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -78,6 +78,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" +#include "decode.h" #include "internal.h" #define PALETTE_COUNT 256 diff --git a/libavcodec/wcmv.c b/libavcodec/wcmv.c index d2fdb30662..8bc900f304 100644 --- a/libavcodec/wcmv.c +++ b/libavcodec/wcmv.c @@ -21,15 +21,13 @@ */ #include -#include -#include #include "libavutil/imgutils.h" #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #include "zlib_wrapper.h" #include diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index 79edc16335..555925e5b5 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -26,7 +26,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct XanContext { AVCodecContext *avctx; diff --git a/libavcodec/yop.c b/libavcodec/yop.c index 50bb64bf87..33d8c8b815 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -26,11 +26,10 @@ #include "libavutil/imgutils.h" #include "libavutil/internal.h" -#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" typedef struct YopDecContext { AVCodecContext *avctx;