[FFmpeg-cvslog] avcodec/videodsp: Constify buf in VideoDSPContext.prefetch
Andreas Rheinhardt
git at videolan.org
Sun Jul 31 05:02:42 EEST 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Jul 26 04:50:55 2022 +0200| [af43da3e4d861cd408292aefed0dea2121d5521a] | committer: Andreas Rheinhardt
avcodec/videodsp: Constify buf in VideoDSPContext.prefetch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af43da3e4d861cd408292aefed0dea2121d5521a
---
libavcodec/aarch64/videodsp_init.c | 2 +-
libavcodec/arm/videodsp_init_armv5te.c | 2 +-
libavcodec/loongarch/videodsp_init.c | 2 +-
libavcodec/mips/videodsp_init.c | 2 +-
libavcodec/ppc/videodsp.c | 2 +-
libavcodec/videodsp.c | 2 +-
libavcodec/videodsp.h | 2 +-
libavcodec/x86/videodsp_init.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavcodec/aarch64/videodsp_init.c b/libavcodec/aarch64/videodsp_init.c
index 6f667a6d3e..1f77a918d7 100644
--- a/libavcodec/aarch64/videodsp_init.c
+++ b/libavcodec/aarch64/videodsp_init.c
@@ -21,7 +21,7 @@
#include "libavutil/aarch64/cpu.h"
#include "libavcodec/videodsp.h"
-void ff_prefetch_aarch64(uint8_t *mem, ptrdiff_t stride, int h);
+void ff_prefetch_aarch64(const uint8_t *mem, ptrdiff_t stride, int h);
av_cold void ff_videodsp_init_aarch64(VideoDSPContext *ctx, int bpc)
{
diff --git a/libavcodec/arm/videodsp_init_armv5te.c b/libavcodec/arm/videodsp_init_armv5te.c
index 1ea1f3438d..eaa8c5bbf8 100644
--- a/libavcodec/arm/videodsp_init_armv5te.c
+++ b/libavcodec/arm/videodsp_init_armv5te.c
@@ -23,7 +23,7 @@
#include "libavcodec/videodsp.h"
#include "videodsp_arm.h"
-void ff_prefetch_arm(uint8_t *mem, ptrdiff_t stride, int h);
+void ff_prefetch_arm(const uint8_t *mem, ptrdiff_t stride, int h);
av_cold void ff_videodsp_init_armv5te(VideoDSPContext *ctx, int bpc)
{
diff --git a/libavcodec/loongarch/videodsp_init.c b/libavcodec/loongarch/videodsp_init.c
index 6cbb7763ff..92ade4f846 100644
--- a/libavcodec/loongarch/videodsp_init.c
+++ b/libavcodec/loongarch/videodsp_init.c
@@ -22,7 +22,7 @@
#include "libavcodec/videodsp.h"
#include "libavutil/attributes.h"
-static void prefetch_loongarch(uint8_t *mem, ptrdiff_t stride, int h)
+static void prefetch_loongarch(const uint8_t *mem, ptrdiff_t stride, int h)
{
register const uint8_t *p = mem;
diff --git a/libavcodec/mips/videodsp_init.c b/libavcodec/mips/videodsp_init.c
index 07c23bcf7e..89409fc8fd 100644
--- a/libavcodec/mips/videodsp_init.c
+++ b/libavcodec/mips/videodsp_init.c
@@ -24,7 +24,7 @@
#include "libavutil/mips/asmdefs.h"
#include "libavcodec/videodsp.h"
-static void prefetch_mips(uint8_t *mem, ptrdiff_t stride, int h)
+static void prefetch_mips(const uint8_t *mem, ptrdiff_t stride, int h)
{
register const uint8_t *p = mem;
diff --git a/libavcodec/ppc/videodsp.c b/libavcodec/ppc/videodsp.c
index 915702252e..a7ab5a6a42 100644
--- a/libavcodec/ppc/videodsp.c
+++ b/libavcodec/ppc/videodsp.c
@@ -21,7 +21,7 @@
#include "libavutil/attributes.h"
#include "libavcodec/videodsp.h"
-static void prefetch_ppc(uint8_t *mem, ptrdiff_t stride, int h)
+static void prefetch_ppc(const uint8_t *mem, ptrdiff_t stride, int h)
{
register const uint8_t *p = mem;
do {
diff --git a/libavcodec/videodsp.c b/libavcodec/videodsp.c
index 90dc1aacbd..bdff2e76f5 100644
--- a/libavcodec/videodsp.c
+++ b/libavcodec/videodsp.c
@@ -32,7 +32,7 @@
#include "videodsp_template.c"
#undef BIT_DEPTH
-static void just_return(uint8_t *buf, ptrdiff_t stride, int h)
+static void just_return(const uint8_t *buf, ptrdiff_t stride, int h)
{
}
diff --git a/libavcodec/videodsp.h b/libavcodec/videodsp.h
index b5219d236c..e8960b609d 100644
--- a/libavcodec/videodsp.h
+++ b/libavcodec/videodsp.h
@@ -72,7 +72,7 @@ typedef struct VideoDSPContext {
* @param stride distance between two lines of buf (in bytes)
* @param h number of lines to prefetch
*/
- void (*prefetch)(uint8_t *buf, ptrdiff_t stride, int h);
+ void (*prefetch)(const uint8_t *buf, ptrdiff_t stride, int h);
} VideoDSPContext;
void ff_videodsp_init(VideoDSPContext *ctx, int bpc);
diff --git a/libavcodec/x86/videodsp_init.c b/libavcodec/x86/videodsp_init.c
index a14c9635fb..ae9db95624 100644
--- a/libavcodec/x86/videodsp_init.c
+++ b/libavcodec/x86/videodsp_init.c
@@ -215,7 +215,7 @@ static av_noinline void emulated_edge_mc_avx2(uint8_t *buf, const uint8_t *src,
#endif /* HAVE_AVX2_EXTERNAL */
#endif /* HAVE_X86ASM */
-void ff_prefetch_mmxext(uint8_t *buf, ptrdiff_t stride, int h);
+void ff_prefetch_mmxext(const uint8_t *buf, ptrdiff_t stride, int h);
av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc)
{
More information about the ffmpeg-cvslog
mailing list