From patchwork Wed Jul 27 20:11:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37016 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp569215pzb; Wed, 27 Jul 2022 13:12:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tqF2bPItMwXyc83mO0rNVXEsXT6QbiXcNf2P5Jd3i81fQOmFJSEyCZ+Gyx+cZmW+gp+ZdY X-Received: by 2002:a17:907:b590:b0:72b:949c:c737 with SMTP id qx16-20020a170907b59000b0072b949cc737mr19027483ejc.155.1658952723278; Wed, 27 Jul 2022 13:12:03 -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 gb15-20020a170907960f00b007219be3906bsi21757882ejc.578.2022.07.27.13.11.55; Wed, 27 Jul 2022 13:12:03 -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=f6yEu8il; 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 8231168B95B; Wed, 27 Jul 2022 23:11:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074061.outbound.protection.outlook.com [40.92.74.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96FFE68B8A1 for ; Wed, 27 Jul 2022 23:11:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jAM0kOwEX1lIfunGzdYYd8uA0kG6LxXglukv3xee7iuboS4lNtpMIpcVweSTIVOl91NKK8sZp/i6PjMCMP9sWbEmn5HrkqBpe/8ci51zOcCaKGCD9YOZ1M4iKIOUHoqqqYWIgheBdTnFmHdoSQGLodbcNGaxYwYrjyx9RkWgY2xXZAqIWLAK4a7g6iCJyDcqTT5HKZgm/w+If0MjUPppHVMUt/oOVSmmcyp8ais4yNuMJl3AqGfn6Irf3mEtev7gybpoqkZzX6yaejrDNsdo/8V2r6+8i51iiacRDujfiY8E1B6zknxHaNIIQk8sexr/kDYlEMmAS7rggoGPQcs8sQ== 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=U0dOg9DLn8/WtNNAAptAJBFaisb2B4211o1IqIWM8ys=; b=BAaiAIUo716z6oAqDO4N45L4GNgBoLfEXDR/7U7F2Y3OxfWD/s6SRH7JcL/EeYOzTiw2ChP7m++Unu9TONEb077Bt5g2tNUGvGvptjMQ7y+u8U6grmBvQyqs+ZgO73jSxG0fIY7rc+H7DD4D78P6/EtxmzCc4jWVJs6LdwWOh0xIAf8riS7OxDwwC23mdCYjNcZinnp7aHpeT/Qr2m5h3GGFJoahniduHnDD74xNtOGEQZ5nJ6uC7/SPwdZoyb549Gywbv3cgkytWRqByDzJmNatHOBmu/NY/d64HezOje5baHS8Fqt+NNa6hWplVF1+yP5LROkvXV30AxERQcib1A== 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=U0dOg9DLn8/WtNNAAptAJBFaisb2B4211o1IqIWM8ys=; b=f6yEu8ilTO4l/iCKofwlDw4SN/Bxj0L6DQXYklpHSzgglombTxGuaErwf9w+FoQWlsr6XtrqHn1qBPDFDp8HRaFa9EY0r8Yw63hAJnGIo6sxwMjN2SrtoPne0RMuQJ0Frk16q3qa+eN1JRoN19XrnL46nZEbKvUhUDJrLOquPuroujUnj7FbWTMmruAzqhDj4LS3HJOwUSkJlmHblL4YVfwn7BSxmyrsvaBv5RbHsHl9jVrdXWihTRPiuuIDvjM/uKNJfoncItCL2ObIO84ZK9Vg/GucXwO+E7ha+Wa9s+/42pkmXu8Vjms32kXHcByGDkk9XM2f4j3qaODLtnkjMw== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by AM0PR01MB4516.eurprd01.prod.exchangelabs.com (2603:10a6:208:ef::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.24; Wed, 27 Jul 2022 20:11:43 +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.5458.025; Wed, 27 Jul 2022 20:11:43 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Jul 2022 22:11:22 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [8Nm53gYg2BGokzkiL7K5B52zshNnKmb2] X-ClientProxiedBy: ZR0P278CA0140.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::19) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220727201122.995478-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a5dba9c-8bc6-4a2e-50a5-08da700c3923 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVyKCVpjTdsZ0M3NpbcaYkhZR7i7cfz9+YAOZZQ/laU4t1uMaozbjVXwzGSKoXAXDPQPU8Ztlcj+JYssolBuMVFeWCgm4do8D/PJTGVp/TMX+f7ZmoGPW5enm6gtQa1zbFlP0XwD5HqeJcU980DyfcGNFR64fp0D/emkKwgmIKbocVlO1y3V6SNIjkCQ6UBz5tYckHrXLIzV5SLgTogsUDcbwFhOiLXdMENVoMqWuJitqYkGpuR/ozY6N5fdbgzEzyKkxuFfzzT6U2J7U+mdZPR0lAt0hBKHblTxCMbw24NUXYxOLKLZd5TXDOu1n66xq3o6+VtS+C5z5FOAvKNU2QfHmkL7TBjTZ/qJ5O1hrq+jkuJDr000Aye/6luh12vWU3wiiVP3sHt+XpMjF9cZwjkZA6XbRP1PtIwXquRlN/WIHzAVoAA4nExExOGlDUeZjIw2BoCn1VMMFIWp9DI51OzPwl9ydfbnbqKE8gie1Ow9rE53D0FukGslqMmAm3/Qb3GihS+gyfdT0Lwg6EW0rzHT1CxAFCWi9XOb8EfgpCAu4mC3uy8embUnh1ORXR1sWvWR8ZiHMUofy+nprYxrXW90y3XZVaWuT5AA//rFMOfDXLhwC1NM0rUBAiZ4G9pXiCCwb6TaOZeHabxpqafrpo5NiDnMnphhj3BYiksopez+UlIDFQBeu8VRA2rLKvmMOAWMpoeDZLkSoZaLChXE1ma/aWZdj8sibo= X-MS-TrafficTypeDiagnostic: AM0PR01MB4516:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T5JRovD4Q4Q6DHwnlZuKNGAZKbJhkRxY8F5UjuVdoBtHHgMYfWAkdOWNbqI9LgRw7i6Y3TxyxZN3OeVcOyv3oaKrufum2ZzrpMeUVz5gHmqDNpq/YOKKDPrMmrdgsjuTCtmYHrYqAzbnZeZJSJjEAuvhPFjIeKn0dr+nO+xZNXH40bhXR9ybFV0jnNcLCRo60GqLIEJoqE4P1rCNBQSDNO4UN00YthKdnzoTbRF8IJD4X6g3qS/Gq5ZxS/5NsCLS8i6+iGXLAWgWnQd+0S2vWQWYduTrOR/L0AcByjOVbn/aoMlMps6lgsxpL4yGK6v+aTO5I4pdC5yjII9c4+TWQIBxVxGK2pb5+G26U4zk+Uj0mmqi9UeLTZcSjZ04tkZ8oVXT5kypmXDSjsM6gXCavIWvCPuhjVWF5jUjooQxJk4BScfKy4WJghBkgOE9hHuFw5I4ZRPPj+SeDjdPVsyHaG2SpPVL292BGBjj1YRLe9mpRydzmSaaUKmmUNj4aG4LrYVJdttk8AmxXrfR8tkpc1sMgDgF3IH9UsCdYN9HaY6cfmIuo82eUan7p3eb1X14ZlUkdryq121cGOuvb5ZIS9frJ4Nwt86rcse//YwfQ4o75jOHO0yYKnXGcOC2Bl0VIsvpHj3QTfnOHamQneglUw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: W4oZdkRa8UsUHP9HHXojS70NQXRqtKK3GEAke6vYvDt756GRmhA7Jply2hQT71s0Mom2Zp5U3ksSkBeu0geBnq92mtCcdBFfHu1olMr6+ydZ/NhJ1K0yO15zByopMFfLPmaQ2XW3+m/04WLd3XN3xODQ05k/r3Q9MVRQB+2RmPNsOzevC1r4TdHwD7AqHpPvaiKf4WXC0UeH9I0gUKYfNk6ts0Hko5xcVqGGR0oWXA0zi9e/MGs4TdY1WFbcF6zSmMlNkxYrLnZzK/nPChVYJx7IcDFA2iykBbop0CWceWeCaKDT4FWIpMbJYlvvqqo5yA9LWi+VJximnsRbHd/pFh8ThFMvhjhz+866m7d9Sl1jWxfrzPeNb/FkO/TbCoYyYxrq39kc7PwoQ/l5VjpYz/5TYaDjC/j549KxaQsVTU9/EgHJR3lDs5V75CsLzr8s82y5dBBNiiadBNio+O84MXQLPjP+7N9wMd2+YHWdhf3yQwcnNug3Wu7wzV+MvSlfgVkOxombMU8q7HSghHRU0dTTeMvFPDie0vOGlbSwop7PHSHUCF3/e27CCDU+oY0u7/XEK9Mx2X8DhJjwu0lR+gHB/sdo533n61hAk7O4bEQaKipLD+T9nFY7j+YddjA6hgni5YLvF8z1JBfCup6tBeqaLhQf7iAlZMIJLtJMNlkuUgSqyhs/aAPZ8w4nMTd8QwrbXocZX36rX3S8M8nq6N7Bhbg/xTRZkfCZitmqeyQ62a3KcBIjJss4ISJDQMj7Wt189Ehnp3QlSzVzUIT12udYOhNnKmcLUZVhzs6xlDINRUXvLtFbQOGkvaAL7jGSGG0Fv/oaUDYHzpfrcnckv2y200tIZax40F3JEA2uxxPc3SAQpc1jP1aAXTkqVO17vy7icqc2MgJLmh+O5FJEA/a5dGXNflsLJSRCNvAm846t9Rm2otUVK05Y8P0KJ0TDZMhh7FOtI+fdBDbv/qMSukhSKnlf2vrb37NMQxESwW11HWS/B4YstkoxDYXJH15VHdGa3jYVg/tApOZqLIbixDeIbZFsjnS7mEV9akeafL5wyUWeAxOoToLaZnuP6k659ee06CGEg3UvxTjEKKs54c0C7duNiMFzcYEosIVXywlkgarUeFnWBfLuDdzw8uzBDUe2rhY3/wQAZ73Wh6DUG4Z/fL/TpKZ/gMtKCUEABv1eaDeFy7ulYLCjBkBrnOAEPBA9FmGI21vkTb1l9S4QiuFD8cDJCv7NgUZ4ly7dUrmAHz9qCShNU6olaJE4dvhkDUU9mZ1ZaxkqakjPdLZB153IKws+wX6pTPtjZwALmcY= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a5dba9c-8bc6-4a2e-50a5-08da700c3923 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2022 20:11:43.0630 (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: AM0PR01MB4516 Subject: [FFmpeg-devel] [PATCH v2 3/3] avcodec/h264chroma: Constify src in h264_chroma_mc_func 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: BULbynUYoj2H Signed-off-by: Andreas Rheinhardt --- libavcodec/aarch64/h264chroma_init_aarch64.c | 12 +- libavcodec/aarch64/h264cmc_neon.S | 4 +- libavcodec/aarch64/rv40dsp_init_aarch64.c | 8 +- libavcodec/aarch64/vc1dsp_init_aarch64.c | 8 +- libavcodec/arm/h264chroma_init_arm.c | 12 +- libavcodec/arm/h264cmc_neon.S | 4 +- libavcodec/arm/rv40dsp_init_arm.c | 8 +- libavcodec/arm/vc1dsp_init_neon.c | 8 +- libavcodec/h264chroma.h | 2 +- libavcodec/h264chroma_template.c | 16 +-- libavcodec/loongarch/h264chroma_lasx.c | 82 +++++------ libavcodec/loongarch/h264chroma_lasx.h | 6 +- libavcodec/loongarch/vc1dsp_lasx.c | 2 +- libavcodec/loongarch/vc1dsp_loongarch.h | 2 +- libavcodec/mips/h264chroma_mips.h | 20 +-- libavcodec/mips/h264chroma_mmi.c | 8 +- libavcodec/mips/h264chroma_msa.c | 142 +++++++++---------- libavcodec/mips/vc1dsp_mips.h | 8 +- libavcodec/mips/vc1dsp_mmi.c | 8 +- libavcodec/ppc/h264chroma_template.c | 4 +- libavcodec/rv40dsp.c | 4 +- libavcodec/vc1dsp.c | 8 +- libavcodec/x86/h264_chromamc.asm | 2 +- libavcodec/x86/h264_chromamc_10bit.asm | 4 +- libavcodec/x86/h264chroma_init.c | 22 +-- libavcodec/x86/rv40dsp_init.c | 8 +- libavcodec/x86/vc1dsp_init.c | 8 +- 27 files changed, 210 insertions(+), 210 deletions(-) diff --git a/libavcodec/aarch64/h264chroma_init_aarch64.c b/libavcodec/aarch64/h264chroma_init_aarch64.c index fa6e0eaf15..00fc7b20f1 100644 --- a/libavcodec/aarch64/h264chroma_init_aarch64.c +++ b/libavcodec/aarch64/h264chroma_init_aarch64.c @@ -28,18 +28,18 @@ #include "config.h" -void ff_put_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); av_cold void ff_h264chroma_init_aarch64(H264ChromaContext *c, int bit_depth) diff --git a/libavcodec/aarch64/h264cmc_neon.S b/libavcodec/aarch64/h264cmc_neon.S index f8e9407854..88ccd727d0 100644 --- a/libavcodec/aarch64/h264cmc_neon.S +++ b/libavcodec/aarch64/h264cmc_neon.S @@ -23,7 +23,7 @@ #include "libavutil/aarch64/asm.S" -/* chroma_mc8(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ +/* chroma_mc8(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ .macro h264_chroma_mc8 type, codec=h264 function ff_\type\()_\codec\()_chroma_mc8_neon, export=1 .ifc \type,avg @@ -193,7 +193,7 @@ function ff_\type\()_\codec\()_chroma_mc8_neon, export=1 endfunc .endm -/* chroma_mc4(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ +/* chroma_mc4(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ .macro h264_chroma_mc4 type, codec=h264 function ff_\type\()_\codec\()_chroma_mc4_neon, export=1 .ifc \type,avg diff --git a/libavcodec/aarch64/rv40dsp_init_aarch64.c b/libavcodec/aarch64/rv40dsp_init_aarch64.c index 142705db98..2b91d6835a 100644 --- a/libavcodec/aarch64/rv40dsp_init_aarch64.c +++ b/libavcodec/aarch64/rv40dsp_init_aarch64.c @@ -25,14 +25,14 @@ #include "config.h" -void ff_put_rv40_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_rv40_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_rv40_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_rv40_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_rv40_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_rv40_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); av_cold void ff_rv40dsp_init_aarch64(RV34DSPContext *c) diff --git a/libavcodec/aarch64/vc1dsp_init_aarch64.c b/libavcodec/aarch64/vc1dsp_init_aarch64.c index a7976fd596..3bc0bd17ee 100644 --- a/libavcodec/aarch64/vc1dsp_init_aarch64.c +++ b/libavcodec/aarch64/vc1dsp_init_aarch64.c @@ -43,13 +43,13 @@ void ff_vc1_h_loop_filter8_neon(uint8_t *src, ptrdiff_t stride, int pq); void ff_vc1_v_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq); void ff_vc1_h_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq); -void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst); diff --git a/libavcodec/arm/h264chroma_init_arm.c b/libavcodec/arm/h264chroma_init_arm.c index aae804b621..5c7d523186 100644 --- a/libavcodec/arm/h264chroma_init_arm.c +++ b/libavcodec/arm/h264chroma_init_arm.c @@ -26,18 +26,18 @@ #include "libavutil/arm/cpu.h" #include "libavcodec/h264chroma.h" -void ff_put_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); av_cold void ff_h264chroma_init_arm(H264ChromaContext *c, int bit_depth) diff --git a/libavcodec/arm/h264cmc_neon.S b/libavcodec/arm/h264cmc_neon.S index 3687b02ede..7272b571d3 100644 --- a/libavcodec/arm/h264cmc_neon.S +++ b/libavcodec/arm/h264cmc_neon.S @@ -22,7 +22,7 @@ #include "libavutil/arm/asm.S" -/* chroma_mc8(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ +/* chroma_mc8(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ .macro h264_chroma_mc8 type, codec=h264 function ff_\type\()_\codec\()_chroma_mc8_neon, export=1 push {r4-r7, lr} @@ -197,7 +197,7 @@ T cmp r7, #0 endfunc .endm -/* chroma_mc4(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ +/* chroma_mc4(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */ .macro h264_chroma_mc4 type, codec=h264 function ff_\type\()_\codec\()_chroma_mc4_neon, export=1 push {r4-r7, lr} diff --git a/libavcodec/arm/rv40dsp_init_arm.c b/libavcodec/arm/rv40dsp_init_arm.c index c24854d1cd..92d2867e04 100644 --- a/libavcodec/arm/rv40dsp_init_arm.c +++ b/libavcodec/arm/rv40dsp_init_arm.c @@ -49,11 +49,11 @@ DECL_QPEL_Y(1); DECL_QPEL_Y(2); DECL_QPEL_Y(3); -void ff_put_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int); -void ff_put_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int); +void ff_put_rv40_chroma_mc8_neon(uint8_t *, const uint8_t *, int, int, int, int); +void ff_put_rv40_chroma_mc4_neon(uint8_t *, const uint8_t *, int, int, int, int); -void ff_avg_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int); -void ff_avg_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int); +void ff_avg_rv40_chroma_mc8_neon(uint8_t *, const uint8_t *, int, int, int, int); +void ff_avg_rv40_chroma_mc4_neon(uint8_t *, const uint8_t *, int, int, int, int); void ff_rv40_weight_func_16_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t); void ff_rv40_weight_func_8_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t); diff --git a/libavcodec/arm/vc1dsp_init_neon.c b/libavcodec/arm/vc1dsp_init_neon.c index 48cb816b70..46fd80a837 100644 --- a/libavcodec/arm/vc1dsp_init_neon.c +++ b/libavcodec/arm/vc1dsp_init_neon.c @@ -76,13 +76,13 @@ DECL_PUT(3, 1) DECL_PUT(3, 2) DECL_PUT(3, 3) -void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst); diff --git a/libavcodec/h264chroma.h b/libavcodec/h264chroma.h index 3259b4935f..b8f9c8f4fc 100644 --- a/libavcodec/h264chroma.h +++ b/libavcodec/h264chroma.h @@ -22,7 +22,7 @@ #include #include -typedef void (*h264_chroma_mc_func)(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/, ptrdiff_t srcStride, int h, int x, int y); +typedef void (*h264_chroma_mc_func)(uint8_t *dst /*align 8*/, const uint8_t *src /*align 1*/, ptrdiff_t srcStride, int h, int x, int y); typedef struct H264ChromaContext { h264_chroma_mc_func put_h264_chroma_pixels_tab[4]; diff --git a/libavcodec/h264chroma_template.c b/libavcodec/h264chroma_template.c index a3ca07b518..b9d24f5a0c 100644 --- a/libavcodec/h264chroma_template.c +++ b/libavcodec/h264chroma_template.c @@ -26,9 +26,9 @@ #include "bit_depth_template.c" #define H264_CHROMA_MC(OPNAME, OP)\ -static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\ +static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\ pixel *dst = (pixel*)_dst;\ - pixel *src = (pixel*)_src;\ + const pixel *src = (const pixel*)_src;\ const int A=(8-x)*(8-y);\ const int B=( x)*(8-y);\ const int C=(8-x)*( y);\ @@ -60,10 +60,10 @@ static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, uint8_t }\ }\ }\ -static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ +static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ {\ pixel *dst = (pixel*)_dst;\ - pixel *src = (pixel*)_src;\ + const pixel *src = (const pixel*)_src;\ const int A=(8-x)*(8-y);\ const int B=( x)*(8-y);\ const int C=(8-x)*( y);\ @@ -99,10 +99,10 @@ static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, uint8_t }\ }\ \ -static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ +static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ {\ pixel *dst = (pixel*)_dst;\ - pixel *src = (pixel*)_src;\ + const pixel *src = (const pixel*)_src;\ const int A=(8-x)*(8-y);\ const int B=( x)*(8-y);\ const int C=(8-x)*( y);\ @@ -144,10 +144,10 @@ static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, uint8_t }\ }\ \ -static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ +static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ {\ pixel *dst = (pixel*)_dst;\ - pixel *src = (pixel*)_src;\ + const pixel *src = (const pixel*)_src;\ const int A=(8-x)*(8-y);\ const int B=( x)*(8-y);\ const int C=(8-x)*( y);\ diff --git a/libavcodec/loongarch/h264chroma_lasx.c b/libavcodec/loongarch/h264chroma_lasx.c index 824a78dfc8..1c0e002bdf 100644 --- a/libavcodec/loongarch/h264chroma_lasx.c +++ b/libavcodec/loongarch/h264chroma_lasx.c @@ -33,7 +33,7 @@ static const uint8_t chroma_mask_arr[64] = { 0, 1, 1, 2, 2, 3, 3, 4, 16, 17, 17, 18, 18, 19, 19, 20 }; -static av_always_inline void avc_chroma_hv_8x4_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avc_chroma_hv_8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) @@ -71,7 +71,7 @@ static av_always_inline void avc_chroma_hv_8x4_lasx(uint8_t *src, uint8_t *dst, __lasx_xvstelm_d(out, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_hv_8x8_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avc_chroma_hv_8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) @@ -127,7 +127,7 @@ static av_always_inline void avc_chroma_hv_8x8_lasx(uint8_t *src, uint8_t *dst, __lasx_xvstelm_d(out1, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_hz_8x4_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avc_chroma_hz_8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2x = stride << 1; @@ -154,7 +154,7 @@ static av_always_inline void avc_chroma_hz_8x4_lasx(uint8_t *src, uint8_t *dst, } -static av_always_inline void avc_chroma_hz_8x8_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avc_chroma_hz_8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2x = stride << 1; @@ -193,7 +193,7 @@ static av_always_inline void avc_chroma_hz_8x8_lasx(uint8_t *src, uint8_t *dst, __lasx_xvstelm_d(out1, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_hz_nonmult_lasx(uint8_t *src, +static av_always_inline void avc_chroma_hz_nonmult_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -239,7 +239,7 @@ static av_always_inline void avc_chroma_hz_nonmult_lasx(uint8_t *src, } } -static av_always_inline void avc_chroma_vt_8x4_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avc_chroma_vt_8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2x = stride << 1; @@ -266,7 +266,7 @@ static av_always_inline void avc_chroma_vt_8x4_lasx(uint8_t *src, uint8_t *dst, __lasx_xvstelm_d(out, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_vt_8x8_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avc_chroma_vt_8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2x = stride << 1; @@ -307,7 +307,7 @@ static av_always_inline void avc_chroma_vt_8x8_lasx(uint8_t *src, uint8_t *dst, __lasx_xvstelm_d(out1, dst + stride_3x, 0, 3); } -static av_always_inline void copy_width8x8_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void copy_width8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride) { uint64_t tmp[8]; @@ -347,7 +347,7 @@ static av_always_inline void copy_width8x8_lasx(uint8_t *src, uint8_t *dst, ); } -static av_always_inline void copy_width8x4_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void copy_width8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride) { uint64_t tmp[4]; @@ -372,7 +372,7 @@ static av_always_inline void copy_width8x4_lasx(uint8_t *src, uint8_t *dst, ); } -static void avc_chroma_hv_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hv_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1, int32_t height) @@ -386,7 +386,7 @@ static void avc_chroma_hv_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -static void avc_chroma_hv_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hv_4x2_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -414,7 +414,7 @@ static void avc_chroma_hv_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res_vt, dst + stride, 0, 1); } -static void avc_chroma_hv_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hv_4x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -446,7 +446,7 @@ static void avc_chroma_hv_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res_hz0, dst + stride_3, 0, 5); } -static void avc_chroma_hv_4x8_lasx(uint8_t *src, uint8_t * dst, ptrdiff_t stride, +static void avc_chroma_hv_4x8_lasx(const uint8_t *src, uint8_t * dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -492,7 +492,7 @@ static void avc_chroma_hv_4x8_lasx(uint8_t *src, uint8_t * dst, ptrdiff_t stride __lasx_xvstelm_w(res_hz0, dst + stride_3, 0, 7); } -static void avc_chroma_hv_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hv_4w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1, int32_t height) @@ -509,7 +509,7 @@ static void avc_chroma_hv_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -static void avc_chroma_hz_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hz_4x2_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { __m256i src0, src1; @@ -528,7 +528,7 @@ static void avc_chroma_hz_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res, dst + stride, 0, 1); } -static void avc_chroma_hz_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hz_4x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2 = stride << 1; @@ -553,7 +553,7 @@ static void avc_chroma_hz_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res, dst + stride_3, 0, 5); } -static void avc_chroma_hz_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hz_4x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2 = stride << 1; @@ -588,7 +588,7 @@ static void avc_chroma_hz_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res0, dst + stride_3, 0, 7); } -static void avc_chroma_hz_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hz_4w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -601,7 +601,7 @@ static void avc_chroma_hz_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -static void avc_chroma_hz_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_hz_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -614,7 +614,7 @@ static void avc_chroma_hz_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -static void avc_chroma_vt_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_vt_4x2_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { __m256i src0, src1, src2; @@ -635,7 +635,7 @@ static void avc_chroma_vt_4x2_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res, dst + stride, 0, 1); } -static void avc_chroma_vt_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_vt_4x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2 = stride << 1; @@ -664,7 +664,7 @@ static void avc_chroma_vt_4x4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res, dst + stride_3, 0, 5); } -static void avc_chroma_vt_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_vt_4x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { ptrdiff_t stride_2 = stride << 1; @@ -705,7 +705,7 @@ static void avc_chroma_vt_4x8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, __lasx_xvstelm_w(res0, dst + stride_3, 0, 7); } -static void avc_chroma_vt_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_vt_4w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -718,7 +718,7 @@ static void avc_chroma_vt_4w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -static void avc_chroma_vt_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avc_chroma_vt_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -729,7 +729,7 @@ static void avc_chroma_vt_8w_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -static void copy_width4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void copy_width4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t height) { uint32_t tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7; @@ -799,7 +799,7 @@ static void copy_width4_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -static void copy_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void copy_width8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t height) { if (8 == height) { @@ -809,7 +809,7 @@ static void copy_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0); @@ -825,7 +825,7 @@ void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, } } -void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0); @@ -841,7 +841,7 @@ void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, } } -static av_always_inline void avc_chroma_hv_and_aver_dst_8x4_lasx(uint8_t *src, +static av_always_inline void avc_chroma_hv_and_aver_dst_8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) @@ -885,7 +885,7 @@ static av_always_inline void avc_chroma_hv_and_aver_dst_8x4_lasx(uint8_t *src, __lasx_xvstelm_d(out, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_hv_and_aver_dst_8x8_lasx(uint8_t *src, +static av_always_inline void avc_chroma_hv_and_aver_dst_8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) @@ -957,7 +957,7 @@ static av_always_inline void avc_chroma_hv_and_aver_dst_8x8_lasx(uint8_t *src, __lasx_xvstelm_d(out1, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_hz_and_aver_dst_8x4_lasx(uint8_t *src, +static av_always_inline void avc_chroma_hz_and_aver_dst_8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -990,7 +990,7 @@ static av_always_inline void avc_chroma_hz_and_aver_dst_8x4_lasx(uint8_t *src, __lasx_xvstelm_d(out, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_hz_and_aver_dst_8x8_lasx(uint8_t *src, +static av_always_inline void avc_chroma_hz_and_aver_dst_8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1043,7 +1043,7 @@ static av_always_inline void avc_chroma_hz_and_aver_dst_8x8_lasx(uint8_t *src, __lasx_xvstelm_d(out1, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_vt_and_aver_dst_8x4_lasx(uint8_t *src, +static av_always_inline void avc_chroma_vt_and_aver_dst_8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1077,7 +1077,7 @@ static av_always_inline void avc_chroma_vt_and_aver_dst_8x4_lasx(uint8_t *src, __lasx_xvstelm_d(out, dst + stride_3x, 0, 3); } -static av_always_inline void avc_chroma_vt_and_aver_dst_8x8_lasx(uint8_t *src, +static av_always_inline void avc_chroma_vt_and_aver_dst_8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1132,7 +1132,7 @@ static av_always_inline void avc_chroma_vt_and_aver_dst_8x8_lasx(uint8_t *src, __lasx_xvstelm_d(out1, dst + stride_3x, 0, 3); } -static av_always_inline void avg_width8x8_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avg_width8x8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride) { __m256i src0, src1, src2, src3; @@ -1184,7 +1184,7 @@ static av_always_inline void avg_width8x8_lasx(uint8_t *src, uint8_t *dst, __lasx_xvstelm_d(dst0, dst + stride_3x, 0, 3); } -static av_always_inline void avg_width8x4_lasx(uint8_t *src, uint8_t *dst, +static av_always_inline void avg_width8x4_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride) { __m256i src0, src1, src2, src3; @@ -1213,7 +1213,7 @@ static av_always_inline void avg_width8x4_lasx(uint8_t *src, uint8_t *dst, __lasx_xvstelm_d(dst0, dst + stride_3x, 0, 3); } -static void avc_chroma_hv_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1230,7 +1230,7 @@ static void avc_chroma_hv_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_hz_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -1241,7 +1241,7 @@ static void avc_chroma_hz_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_vt_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_8w_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -1252,7 +1252,7 @@ static void avc_chroma_vt_and_aver_dst_8w_lasx(uint8_t *src, uint8_t *dst, } } -static void avg_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, +static void avg_width8_lasx(const uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t height) { if (8 == height) { @@ -1262,7 +1262,7 @@ static void avg_width8_lasx(uint8_t *src, uint8_t *dst, ptrdiff_t stride, } } -void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0); diff --git a/libavcodec/loongarch/h264chroma_lasx.h b/libavcodec/loongarch/h264chroma_lasx.h index 4aac8db8cb..633752035e 100644 --- a/libavcodec/loongarch/h264chroma_lasx.h +++ b/libavcodec/loongarch/h264chroma_lasx.h @@ -26,11 +26,11 @@ #include #include "libavcodec/h264.h" -void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc4_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc8_lasx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); #endif /* AVCODEC_LOONGARCH_H264CHROMA_LASX_H */ diff --git a/libavcodec/loongarch/vc1dsp_lasx.c b/libavcodec/loongarch/vc1dsp_lasx.c index 40b8668f2b..848fe4afb3 100644 --- a/libavcodec/loongarch/vc1dsp_lasx.c +++ b/libavcodec/loongarch/vc1dsp_lasx.c @@ -698,7 +698,7 @@ PUT_VC1_MSPEL_MC_LASX(3, 2); PUT_VC1_MSPEL_MC_LASX(3, 3); void ff_put_no_rnd_vc1_chroma_mc8_lasx(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { const int intA = (8 - x) * (8 - y); diff --git a/libavcodec/loongarch/vc1dsp_loongarch.h b/libavcodec/loongarch/vc1dsp_loongarch.h index 398631aecc..e5ccbcb768 100644 --- a/libavcodec/loongarch/vc1dsp_loongarch.h +++ b/libavcodec/loongarch/vc1dsp_loongarch.h @@ -73,7 +73,7 @@ FF_PUT_VC1_MSPEL_MC_H_LASX(2); FF_PUT_VC1_MSPEL_MC_H_LASX(3); void ff_put_no_rnd_vc1_chroma_mc8_lasx(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y); #endif /* AVCODEC_LOONGARCH_VC1DSP_LOONGARCH_H */ diff --git a/libavcodec/mips/h264chroma_mips.h b/libavcodec/mips/h264chroma_mips.h index 996384d005..c694e34b3f 100644 --- a/libavcodec/mips/h264chroma_mips.h +++ b/libavcodec/mips/h264chroma_mips.h @@ -22,26 +22,26 @@ #define AVCODEC_MIPS_H264CHROMA_MIPS_H #include "libavcodec/h264dec.h" -void ff_put_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y); -void ff_put_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y); -void ff_put_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y); -void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y); -void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y); -void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y); -void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); #endif /* AVCODEC_MIPS_H264CHROMA_MIPS_H */ diff --git a/libavcodec/mips/h264chroma_mmi.c b/libavcodec/mips/h264chroma_mmi.c index ec35c5a72e..fe05ccd671 100644 --- a/libavcodec/mips/h264chroma_mmi.c +++ b/libavcodec/mips/h264chroma_mmi.c @@ -26,7 +26,7 @@ #include "constants.h" #include "libavutil/mips/mmiutils.h" -void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) { double ftmp[12]; @@ -289,7 +289,7 @@ void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, } } -void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) { double ftmp[10]; @@ -497,7 +497,7 @@ void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, } } -void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) { double ftmp[8]; @@ -618,7 +618,7 @@ void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, } } -void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, +void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) { double ftmp[8]; diff --git a/libavcodec/mips/h264chroma_msa.c b/libavcodec/mips/h264chroma_msa.c index 4a68d9e134..141f52c2be 100644 --- a/libavcodec/mips/h264chroma_msa.c +++ b/libavcodec/mips/h264chroma_msa.c @@ -29,7 +29,7 @@ static const uint8_t chroma_mask_arr[16 * 5] = { 0, 1, 1, 2, 16, 17, 17, 18, 16, 17, 17, 18, 18, 19, 19, 20 }; -static void avc_chroma_hz_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { uint16_t out0, out1; @@ -60,7 +60,7 @@ static void avc_chroma_hz_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, SH(out1, dst); } -static void avc_chroma_hz_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3; @@ -88,7 +88,7 @@ static void avc_chroma_hz_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_H4(res, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hz_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -99,7 +99,7 @@ static void avc_chroma_hz_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_hz_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16i8 src0, src1; @@ -124,7 +124,7 @@ static void avc_chroma_hz_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W2(res, 0, 1, dst, stride); } -static void avc_chroma_hz_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, out; @@ -147,7 +147,7 @@ static void avc_chroma_hz_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W4(out, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hz_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, src4, src5, src6, src7, out0, out1; @@ -171,7 +171,7 @@ static void avc_chroma_hz_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hz_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -184,7 +184,7 @@ static void avc_chroma_hz_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_hz_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, out0, out1; @@ -207,7 +207,7 @@ static void avc_chroma_hz_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_D4(out0, out1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hz_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, src4, src5, src6, src7; @@ -240,7 +240,7 @@ static void avc_chroma_hz_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hz_nonmult_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_nonmult_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -289,7 +289,7 @@ static void avc_chroma_hz_nonmult_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_hz_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hz_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -302,7 +302,7 @@ static void avc_chroma_hz_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_vt_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { uint16_t out0, out1; @@ -334,7 +334,7 @@ static void avc_chroma_vt_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, SH(out1, dst); } -static void avc_chroma_vt_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, src4; @@ -362,7 +362,7 @@ static void avc_chroma_vt_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_H4(res, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_vt_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -373,7 +373,7 @@ static void avc_chroma_vt_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_vt_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2; @@ -397,7 +397,7 @@ static void avc_chroma_vt_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W2(res, 0, 1, dst, stride); } -static void avc_chroma_vt_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, src4; @@ -421,7 +421,7 @@ static void avc_chroma_vt_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W4(out, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_vt_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8; @@ -449,7 +449,7 @@ static void avc_chroma_vt_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_vt_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -462,7 +462,7 @@ static void avc_chroma_vt_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_vt_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, src4, out0, out1; @@ -483,7 +483,7 @@ static void avc_chroma_vt_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_D4(out0, out1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_vt_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8; @@ -515,7 +515,7 @@ static void avc_chroma_vt_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_vt_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_vt_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -526,7 +526,7 @@ static void avc_chroma_vt_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_hv_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -561,7 +561,7 @@ static void avc_chroma_hv_2x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, SH(out1, dst); } -static void avc_chroma_hv_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -595,7 +595,7 @@ static void avc_chroma_hv_2x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_H4(res, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hv_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1, int32_t height) @@ -609,7 +609,7 @@ static void avc_chroma_hv_2w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_hv_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -637,7 +637,7 @@ static void avc_chroma_hv_4x2_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W2(res, 0, 1, dst, stride); } -static void avc_chroma_hv_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -670,7 +670,7 @@ static void avc_chroma_hv_4x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W2(res1, 0, 1, dst + 2 * stride, stride); } -static void avc_chroma_hv_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -710,7 +710,7 @@ static void avc_chroma_hv_4x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_W8(res0, res1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hv_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1, int32_t height) @@ -727,7 +727,7 @@ static void avc_chroma_hv_4w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_hv_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -770,7 +770,7 @@ static void avc_chroma_hv_8x4_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_D4(out0, out1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hv_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1) { @@ -826,7 +826,7 @@ static void avc_chroma_hv_8x8_msa(uint8_t *src, uint8_t *dst, int32_t stride, ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hv_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avc_chroma_hv_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, uint32_t coef_ver0, uint32_t coef_ver1, int32_t height) @@ -840,7 +840,7 @@ static void avc_chroma_hv_8w_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -882,7 +882,7 @@ static void avc_chroma_hz_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst, SH(out1, dst); } -static void avc_chroma_hz_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -922,7 +922,7 @@ static void avc_chroma_hz_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst, ST_H4(dst0, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hz_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -933,7 +933,7 @@ static void avc_chroma_hz_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_hz_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -966,7 +966,7 @@ static void avc_chroma_hz_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst, ST_W2(dst_data, 0, 1, dst, stride); } -static void avc_chroma_hz_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -995,7 +995,7 @@ static void avc_chroma_hz_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst, ST_W4(out, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hz_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1027,7 +1027,7 @@ static void avc_chroma_hz_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst, ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hz_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -1040,7 +1040,7 @@ static void avc_chroma_hz_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_hz_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1070,7 +1070,7 @@ static void avc_chroma_hz_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst, ST_D4(dst0, dst1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hz_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1114,7 +1114,7 @@ static void avc_chroma_hz_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst, ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hz_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hz_and_aver_dst_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -1125,7 +1125,7 @@ static void avc_chroma_hz_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_vt_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1162,7 +1162,7 @@ static void avc_chroma_vt_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst, SH(out1, dst); } -static void avc_chroma_vt_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1204,7 +1204,7 @@ static void avc_chroma_vt_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst, ST_H4(res, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_vt_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -1215,7 +1215,7 @@ static void avc_chroma_vt_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_vt_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1247,7 +1247,7 @@ static void avc_chroma_vt_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst, ST_W2(res, 0, 1, dst, stride); } -static void avc_chroma_vt_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1277,7 +1277,7 @@ static void avc_chroma_vt_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst, ST_W4(out, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_vt_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1313,7 +1313,7 @@ static void avc_chroma_vt_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst, ST_W8(out0, out1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_vt_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -1326,7 +1326,7 @@ static void avc_chroma_vt_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_vt_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1355,7 +1355,7 @@ static void avc_chroma_vt_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst, ST_D4(out0, out1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_vt_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1) { @@ -1398,7 +1398,7 @@ static void avc_chroma_vt_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst, ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_vt_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_vt_and_aver_dst_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coeff0, uint32_t coeff1, int32_t height) { @@ -1409,7 +1409,7 @@ static void avc_chroma_vt_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_hv_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_2x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1451,7 +1451,7 @@ static void avc_chroma_hv_and_aver_dst_2x2_msa(uint8_t *src, uint8_t *dst, SH(out1, dst); } -static void avc_chroma_hv_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_2x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1496,7 +1496,7 @@ static void avc_chroma_hv_and_aver_dst_2x4_msa(uint8_t *src, uint8_t *dst, ST_H4(dst0, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hv_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_2w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1513,7 +1513,7 @@ static void avc_chroma_hv_and_aver_dst_2w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_hv_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_4x2_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1549,7 +1549,7 @@ static void avc_chroma_hv_and_aver_dst_4x2_msa(uint8_t *src, uint8_t *dst, ST_W2(dst0, 0, 1, dst, stride); } -static void avc_chroma_hv_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_4x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1588,7 +1588,7 @@ static void avc_chroma_hv_and_aver_dst_4x4_msa(uint8_t *src, uint8_t *dst, ST_W4(out, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hv_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_4x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1637,7 +1637,7 @@ static void avc_chroma_hv_and_aver_dst_4x8_msa(uint8_t *src, uint8_t *dst, ST_W8(res0, res1, 0, 1, 2, 3, 0, 1, 2, 3, dst, stride); } -static void avc_chroma_hv_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_4w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1657,7 +1657,7 @@ static void avc_chroma_hv_and_aver_dst_4w_msa(uint8_t *src, uint8_t *dst, } } -static void avc_chroma_hv_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_8x4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1705,7 +1705,7 @@ static void avc_chroma_hv_and_aver_dst_8x4_msa(uint8_t *src, uint8_t *dst, ST_D4(out0, out1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hv_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_8x8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1774,7 +1774,7 @@ static void avc_chroma_hv_and_aver_dst_8x8_msa(uint8_t *src, uint8_t *dst, ST_D8(out0, out1, out2, out3, 0, 1, 0, 1, 0, 1, 0, 1, dst, stride); } -static void avc_chroma_hv_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst, +static void avc_chroma_hv_and_aver_dst_8w_msa(const uint8_t *src, uint8_t *dst, int32_t stride, uint32_t coef_hor0, uint32_t coef_hor1, @@ -1791,7 +1791,7 @@ static void avc_chroma_hv_and_aver_dst_8w_msa(uint8_t *src, uint8_t *dst, } } -static void copy_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void copy_width4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, int32_t height) { uint32_t tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7; @@ -1814,7 +1814,7 @@ static void copy_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void copy_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void copy_width8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, int32_t height) { uint64_t src0, src1, src2, src3, src4, src5, src6, src7; @@ -1832,7 +1832,7 @@ static void copy_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avg_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avg_width4_msa(const uint8_t *src, uint8_t *dst, int32_t stride, int32_t height) { uint32_t tp0, tp1, tp2, tp3; @@ -1867,7 +1867,7 @@ static void avg_width4_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -static void avg_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride, +static void avg_width8_msa(const uint8_t *src, uint8_t *dst, int32_t stride, int32_t height) { uint64_t tp0, tp1, tp2, tp3, tp4, tp5, tp6, tp7; @@ -1903,7 +1903,7 @@ static void avg_width8_msa(uint8_t *src, uint8_t *dst, int32_t stride, } } -void ff_put_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0); @@ -1919,7 +1919,7 @@ void ff_put_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, } } -void ff_put_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0); @@ -1935,7 +1935,7 @@ void ff_put_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, } } -void ff_put_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { int32_t cnt; @@ -1958,7 +1958,7 @@ void ff_put_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, } } -void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0); @@ -1976,7 +1976,7 @@ void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, } } -void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0); @@ -1993,7 +1993,7 @@ void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, } } -void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int height, int x, int y) { int32_t cnt; diff --git a/libavcodec/mips/vc1dsp_mips.h b/libavcodec/mips/vc1dsp_mips.h index 356153cab6..8fcff26b14 100644 --- a/libavcodec/mips/vc1dsp_mips.h +++ b/libavcodec/mips/vc1dsp_mips.h @@ -179,16 +179,16 @@ void ff_vc1_v_loop_filter16_mmi(uint8_t *src, ptrdiff_t stride, int pq); void ff_vc1_h_loop_filter16_mmi(uint8_t *src, ptrdiff_t stride, int pq); void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y); void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y); void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y); void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y); void ff_vc1_inv_trans_8x8_msa(int16_t block[64]); diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c index 278aa566bc..290b47d697 100644 --- a/libavcodec/mips/vc1dsp_mmi.c +++ b/libavcodec/mips/vc1dsp_mmi.c @@ -2235,7 +2235,7 @@ DECLARE_FUNCTION(3, 3) void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { union mmi_intfloat64 A, B, C, D; @@ -2291,7 +2291,7 @@ void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, } void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { union mmi_intfloat64 A, B, C, D; @@ -2345,7 +2345,7 @@ void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, } void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { union mmi_intfloat64 A, B, C, D; @@ -2404,7 +2404,7 @@ void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, } void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { union mmi_intfloat64 A, B, C, D; diff --git a/libavcodec/ppc/h264chroma_template.c b/libavcodec/ppc/h264chroma_template.c index eda98c67ec..c64856bb14 100644 --- a/libavcodec/ppc/h264chroma_template.c +++ b/libavcodec/ppc/h264chroma_template.c @@ -109,7 +109,7 @@ #endif /* HAVE_BIGENDIAN */ #ifdef PREFIX_h264_chroma_mc8_altivec -static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, +static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, const uint8_t * src, ptrdiff_t stride, int h, int x, int y) { @@ -184,7 +184,7 @@ static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, /* this code assume that stride % 16 == 0 */ #ifdef PREFIX_no_rnd_vc1_chroma_mc8_altivec -static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t *dst, uint8_t *src, +static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) { diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c index a09179ae85..f0208b16ea 100644 --- a/libavcodec/rv40dsp.c +++ b/libavcodec/rv40dsp.c @@ -292,7 +292,7 @@ static const int rv40_bias[4][4] = { #define RV40_CHROMA_MC(OPNAME, OP)\ static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst /*align 8*/,\ - uint8_t *src /*align 1*/,\ + const uint8_t *src /*align 1*/,\ ptrdiff_t stride, int h, int x, int y)\ {\ const int A = (8-x) * (8-y);\ @@ -328,7 +328,7 @@ static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst /*align 8*/,\ }\ \ static void OPNAME ## rv40_chroma_mc8_c(uint8_t *dst/*align 8*/,\ - uint8_t *src/*align 1*/,\ + const uint8_t *src/*align 1*/,\ ptrdiff_t stride, int h, int x, int y)\ {\ const int A = (8-x) * (8-y);\ diff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c index 62c553bc01..62c8eb21fa 100644 --- a/libavcodec/vc1dsp.c +++ b/libavcodec/vc1dsp.c @@ -787,7 +787,7 @@ PUT_VC1_MSPEL(3, 3) ((A * src[a] + B * src[a + 1] + \ C * src[stride + a] + D * src[stride + a + 1] + 32 - 4) >> 6) static void put_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); @@ -812,7 +812,7 @@ static void put_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */, } } -static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, uint8_t *src, +static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); @@ -835,7 +835,7 @@ static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, uint8_t *src, #define avg2(a, b) (((a) + (b) + 1) >> 1) static void avg_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); @@ -861,7 +861,7 @@ static void avg_no_rnd_vc1_chroma_mc8_c(uint8_t *dst /* align 8 */, } static void avg_no_rnd_vc1_chroma_mc4_c(uint8_t *dst /* align 8 */, - uint8_t *src /* align 1 */, + const uint8_t *src /* align 1 */, ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm index e562efd69d..a5c53034a2 100644 --- a/libavcodec/x86/h264_chromamc.asm +++ b/libavcodec/x86/h264_chromamc.asm @@ -104,7 +104,7 @@ SECTION .text %define extra_regs 0 %endif ; rv40 ; void ff_put/avg_h264_chroma_mc8_*(uint8_t *dst /* align 8 */, -; uint8_t *src /* align 1 */, +; const uint8_t *src /* align 1 */, ; ptrdiff_t stride, int h, int mx, int my) cglobal %1_%2_chroma_mc8%3, 6, 7 + extra_regs, 0 mov r6d, r5d diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm index 34bc41969b..fdc4f407c7 100644 --- a/libavcodec/x86/h264_chromamc_10bit.asm +++ b/libavcodec/x86/h264_chromamc_10bit.asm @@ -57,7 +57,7 @@ SECTION .text %endmacro ;----------------------------------------------------------------------------- -; void ff_put/avg_h264_chroma_mc8(pixel *dst, pixel *src, ptrdiff_t stride, +; void ff_put/avg_h264_chroma_mc8(pixel *dst, const pixel *src, ptrdiff_t stride, ; int h, int mx, int my) ;----------------------------------------------------------------------------- %macro CHROMA_MC8 1 @@ -198,7 +198,7 @@ cglobal %1_h264_chroma_mc4_10, 6,6,7 %endmacro ;----------------------------------------------------------------------------- -; void ff_put/avg_h264_chroma_mc2(pixel *dst, pixel *src, ptrdiff_t stride, +; void ff_put/avg_h264_chroma_mc2(pixel *dst, const pixel *src, ptrdiff_t stride, ; int h, int mx, int my) ;----------------------------------------------------------------------------- %macro CHROMA_MC2 1 diff --git a/libavcodec/x86/h264chroma_init.c b/libavcodec/x86/h264chroma_init.c index 7c0f492178..b54afd4c08 100644 --- a/libavcodec/x86/h264chroma_init.c +++ b/libavcodec/x86/h264chroma_init.c @@ -24,34 +24,34 @@ #include "libavutil/x86/cpu.h" #include "libavcodec/h264chroma.h" -void ff_put_h264_chroma_mc8_rnd_mmx (uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc8_rnd_mmx (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc8_rnd_mmxext(uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc8_rnd_mmxext(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc4_mmx (uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc4_mmx (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc4_mmxext (uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc4_mmxext (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc2_mmxext (uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc2_mmxext (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc2_mmxext (uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc2_mmxext (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_h264_chroma_mc4_ssse3 (uint8_t *dst, uint8_t *src, +void ff_put_h264_chroma_mc4_ssse3 (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_h264_chroma_mc4_ssse3 (uint8_t *dst, uint8_t *src, +void ff_avg_h264_chroma_mc4_ssse3 (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); #define CHROMA_MC(OP, NUM, DEPTH, OPT) \ void ff_ ## OP ## _h264_chroma_mc ## NUM ## _ ## DEPTH ## _ ## OPT \ - (uint8_t *dst, uint8_t *src, \ + (uint8_t *dst, const uint8_t *src, \ ptrdiff_t stride, int h, int x, int y); CHROMA_MC(put, 2, 10, mmxext) diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c index a04c5a5449..ab9e644c60 100644 --- a/libavcodec/x86/rv40dsp_init.c +++ b/libavcodec/x86/rv40dsp_init.c @@ -40,14 +40,14 @@ static void op##_rv40_qpel##size##_mc33_##insn(uint8_t *dst, const uint8_t *src, } #if HAVE_X86ASM -void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src, +void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc8_mmxext(uint8_t *dst, uint8_t *src, +void ff_avg_rv40_chroma_mc8_mmxext(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, uint8_t *src, +void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc4_mmxext(uint8_t *dst, uint8_t *src, +void ff_avg_rv40_chroma_mc4_mmxext(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); #define DECLARE_WEIGHT(opt) \ diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index b1f68b098c..90b2f3624e 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -80,13 +80,13 @@ DECLARE_FUNCTION(avg_, 16, _sse2) #endif /* HAVE_X86ASM */ -void ff_put_vc1_chroma_mc8_nornd_mmx (uint8_t *dst, uint8_t *src, +void ff_put_vc1_chroma_mc8_nornd_mmx (uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_vc1_chroma_mc8_nornd_mmxext(uint8_t *dst, uint8_t *src, +void ff_avg_vc1_chroma_mc8_nornd_mmxext(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src, +void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src, +void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); void ff_vc1_inv_trans_4x4_dc_mmxext(uint8_t *dest, ptrdiff_t linesize, int16_t *block);