diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-26 07:25:02 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-31 03:31:53 +0200 |
commit | abb85429f3424375f21bdd135656c2d88357b3d5 (patch) | |
tree | 208aa7d650abc4eae3d9c5b7653e7daf9a3b530d /libavcodec/ppc | |
parent | e7cb7c762abca7444ed3a5a2a839b10c05c455f3 (diff) | |
download | ffmpeg-abb85429f3424375f21bdd135656c2d88357b3d5.tar.gz |
avcodec/me_cmp: Constify me_cmp_func buffer parameters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r-- | libavcodec/ppc/me_cmp.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/ppc/me_cmp.c b/libavcodec/ppc/me_cmp.c index 17f9a4f016..90f21525d7 100644 --- a/libavcodec/ppc/me_cmp.c +++ b/libavcodec/ppc/me_cmp.c @@ -51,7 +51,7 @@ iv = vec_vsx_ld(1, pix);\ } #endif -static int sad16_x2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +static int sad16_x2_altivec(MpegEncContext *v, const uint8_t *pix1, const uint8_t *pix2, ptrdiff_t stride, int h) { int i; @@ -91,7 +91,7 @@ static int sad16_x2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int sad16_y2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +static int sad16_y2_altivec(MpegEncContext *v, const uint8_t *pix1, const uint8_t *pix2, ptrdiff_t stride, int h) { int i; @@ -102,7 +102,7 @@ static int sad16_y2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, vector unsigned int sad = (vector unsigned int) vec_splat_u32(0); vector signed int sumdiffs; - uint8_t *pix3 = pix2 + stride; + const uint8_t *pix3 = pix2 + stride; /* Due to the fact that pix3 = pix2 + stride, the pix3 of one * iteration becomes pix2 in the next iteration. We can use this @@ -141,12 +141,12 @@ static int sad16_y2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int sad16_xy2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +static int sad16_xy2_altivec(MpegEncContext *v, const uint8_t *pix1, const uint8_t *pix2, ptrdiff_t stride, int h) { int i; int __attribute__((aligned(16))) s = 0; - uint8_t *pix3 = pix2 + stride; + const uint8_t *pix3 = pix2 + stride; const vector unsigned char zero = (const vector unsigned char) vec_splat_u8(0); const vector unsigned short two = @@ -230,7 +230,7 @@ static int sad16_xy2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int sad16_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +static int sad16_altivec(MpegEncContext *v, const uint8_t *pix1, const uint8_t *pix2, ptrdiff_t stride, int h) { int i; @@ -265,7 +265,7 @@ static int sad16_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int sad8_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +static int sad8_altivec(MpegEncContext *v, const uint8_t *pix1, const uint8_t *pix2, ptrdiff_t stride, int h) { int i; @@ -309,7 +309,7 @@ static int sad8_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, /* Sum of Squared Errors for an 8x8 block, AltiVec-enhanced. * It's the sad8_altivec code above w/ squaring added. */ -static int sse8_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +static int sse8_altivec(MpegEncContext *v, const uint8_t *pix1, const uint8_t *pix2, ptrdiff_t stride, int h) { int i; @@ -354,7 +354,7 @@ static int sse8_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, /* Sum of Squared Errors for a 16x16 block, AltiVec-enhanced. * It's the sad16_altivec code above w/ squaring added. */ -static int sse16_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +static int sse16_altivec(MpegEncContext *v, const uint8_t *pix1, const uint8_t *pix2, ptrdiff_t stride, int h) { int i; @@ -392,8 +392,8 @@ static int sse16_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int hadamard8_diff8x8_altivec(MpegEncContext *s, uint8_t *dst, - uint8_t *src, ptrdiff_t stride, int h) +static int hadamard8_diff8x8_altivec(MpegEncContext *s, const uint8_t *dst, + const uint8_t *src, ptrdiff_t stride, int h) { int __attribute__((aligned(16))) sum; register const vector unsigned char vzero = @@ -518,8 +518,8 @@ static int hadamard8_diff8x8_altivec(MpegEncContext *s, uint8_t *dst, * On the 970, the hand-made RA is still a win (around 690 vs. around 780), * but xlc goes to around 660 on the regular C code... */ -static int hadamard8_diff16x8_altivec(MpegEncContext *s, uint8_t *dst, - uint8_t *src, ptrdiff_t stride, int h) +static int hadamard8_diff16x8_altivec(MpegEncContext *s, const uint8_t *dst, + const uint8_t *src, ptrdiff_t stride, int h) { int __attribute__((aligned(16))) sum; register vector signed short @@ -709,8 +709,8 @@ static int hadamard8_diff16x8_altivec(MpegEncContext *s, uint8_t *dst, return sum; } -static int hadamard8_diff16_altivec(MpegEncContext *s, uint8_t *dst, - uint8_t *src, ptrdiff_t stride, int h) +static int hadamard8_diff16_altivec(MpegEncContext *s, const uint8_t *dst, + const uint8_t *src, ptrdiff_t stride, int h) { int score = hadamard8_diff16x8_altivec(s, dst, src, stride, 8); |