mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
dsputil/me/pixels: Actually use av_restrict
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d48ebfbdea
commit
e62e455f7b
@ -211,7 +211,7 @@ static inline uint64_t avg4(uint64_t l1, uint64_t l2, uint64_t l3, uint64_t l4)
|
||||
|
||||
#define MAKE_OP(OPNAME, SUFF, OPKIND, STORE) \
|
||||
static void OPNAME ## _pixels ## SUFF ## _axp \
|
||||
(uint8_t *restrict block, const uint8_t *restrict pixels, \
|
||||
(uint8_t *av_restrict block, const uint8_t *av_restrict pixels, \
|
||||
int line_size, int h) \
|
||||
{ \
|
||||
if ((size_t) pixels & 0x7) { \
|
||||
@ -222,7 +222,7 @@ static void OPNAME ## _pixels ## SUFF ## _axp \
|
||||
} \
|
||||
\
|
||||
static void OPNAME ## _pixels16 ## SUFF ## _axp \
|
||||
(uint8_t *restrict block, const uint8_t *restrict pixels, \
|
||||
(uint8_t *av_restrict block, const uint8_t *av_restrict pixels, \
|
||||
int line_size, int h) \
|
||||
{ \
|
||||
OPNAME ## _pixels ## SUFF ## _axp(block, pixels, line_size, h); \
|
||||
|
@ -36,8 +36,8 @@ extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
|
||||
extern void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
|
||||
int line_size);
|
||||
|
||||
void get_pixels_mvi(DCTELEM *restrict block,
|
||||
const uint8_t *restrict pixels, int line_size);
|
||||
void get_pixels_mvi(DCTELEM *av_restrict block,
|
||||
const uint8_t *av_restrict pixels, int line_size);
|
||||
void diff_pixels_mvi(DCTELEM *block, const uint8_t *s1, const uint8_t *s2,
|
||||
int stride);
|
||||
int pix_abs8x8_mvi(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h);
|
||||
|
@ -23,8 +23,8 @@
|
||||
#include "dsputil_alpha.h"
|
||||
#include "asm.h"
|
||||
|
||||
void get_pixels_mvi(DCTELEM *restrict block,
|
||||
const uint8_t *restrict pixels, int line_size)
|
||||
void get_pixels_mvi(DCTELEM *av_restrict block,
|
||||
const uint8_t *av_restrict pixels, int line_size)
|
||||
{
|
||||
int h = 8;
|
||||
|
||||
|
@ -47,7 +47,7 @@ void ff_put_pixels8_y2_no_rnd_armv6(uint8_t *, const uint8_t *, int, int);
|
||||
void ff_avg_pixels8_armv6(uint8_t *, const uint8_t *, int, int);
|
||||
|
||||
void ff_add_pixels_clamped_armv6(const DCTELEM *block,
|
||||
uint8_t *restrict pixels,
|
||||
uint8_t *av_restrict pixels,
|
||||
int line_size);
|
||||
|
||||
void ff_get_pixels_armv6(DCTELEM *block, const uint8_t *pixels, int stride);
|
||||
|
@ -43,7 +43,7 @@ void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, DCTELEM *block);
|
||||
void ff_bfin_add_pixels_clamped (const DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text;
|
||||
void ff_bfin_put_pixels_clamped (const DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text;
|
||||
void ff_bfin_diff_pixels (DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride) attribute_l1_text;
|
||||
void ff_bfin_get_pixels (DCTELEM *restrict block, const uint8_t *pixels, int line_size) attribute_l1_text;
|
||||
void ff_bfin_get_pixels (DCTELEM *av_restrict block, const uint8_t *pixels, int line_size) attribute_l1_text;
|
||||
int ff_bfin_pix_norm1 (uint8_t * pix, int line_size) attribute_l1_text;
|
||||
int ff_bfin_z_sad8x8 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text;
|
||||
int ff_bfin_z_sad16x16 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text;
|
||||
|
@ -518,7 +518,7 @@ DEFUN_END(pix_sum)
|
||||
|
||||
|
||||
DEFUN(get_pixels,mL1,
|
||||
(DCTELEM *restrict block, const uint8_t *pixels, int line_size)):
|
||||
(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size)):
|
||||
[--sp] = (r7:4);
|
||||
i3=r0; // dest
|
||||
i0=r1; // src0
|
||||
|
@ -51,7 +51,7 @@ static const AVClass class = {
|
||||
|
||||
#define LAMBDA_FRAC_BITS 10
|
||||
|
||||
static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
|
||||
static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 4; i++) {
|
||||
@ -68,7 +68,7 @@ static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *restrict block, const uint8_t
|
||||
memcpy(block + 24, block - 32, sizeof(*block) * 8);
|
||||
}
|
||||
|
||||
static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
|
||||
static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size)
|
||||
{
|
||||
int i;
|
||||
const uint16_t* pixels16 = (const uint16_t*)pixels;
|
||||
|
@ -353,7 +353,7 @@ static int sse16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
|
||||
return s;
|
||||
}
|
||||
|
||||
static void diff_pixels_c(DCTELEM *restrict block, const uint8_t *s1,
|
||||
static void diff_pixels_c(DCTELEM *av_restrict block, const uint8_t *s1,
|
||||
const uint8_t *s2, int stride){
|
||||
int i;
|
||||
|
||||
@ -374,7 +374,7 @@ static void diff_pixels_c(DCTELEM *restrict block, const uint8_t *s1,
|
||||
}
|
||||
|
||||
|
||||
static void put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
static void put_pixels_clamped_c(const DCTELEM *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
@ -395,7 +395,7 @@ static void put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
}
|
||||
}
|
||||
|
||||
static void put_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
static void put_pixels_clamped4_c(const DCTELEM *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
@ -412,7 +412,7 @@ static void put_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels
|
||||
}
|
||||
}
|
||||
|
||||
static void put_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
static void put_pixels_clamped2_c(const DCTELEM *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
@ -428,7 +428,7 @@ static void put_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels
|
||||
}
|
||||
|
||||
static void put_signed_pixels_clamped_c(const DCTELEM *block,
|
||||
uint8_t *restrict pixels,
|
||||
uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i, j;
|
||||
@ -448,7 +448,7 @@ static void put_signed_pixels_clamped_c(const DCTELEM *block,
|
||||
}
|
||||
}
|
||||
|
||||
static void add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
static void add_pixels_clamped_c(const DCTELEM *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
@ -468,7 +468,7 @@ static void add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
}
|
||||
}
|
||||
|
||||
static void add_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
static void add_pixels_clamped4_c(const DCTELEM *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
@ -484,7 +484,7 @@ static void add_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels
|
||||
}
|
||||
}
|
||||
|
||||
static void add_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels,
|
||||
static void add_pixels_clamped2_c(const DCTELEM *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
|
@ -193,12 +193,12 @@ void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src, int linesize, i
|
||||
}
|
||||
|
||||
#define DCTELEM_FUNCS(dctcoef, suffix) \
|
||||
static void FUNCC(get_pixels ## suffix)(DCTELEM *restrict _block, \
|
||||
static void FUNCC(get_pixels ## suffix)(DCTELEM *av_restrict _block, \
|
||||
const uint8_t *_pixels, \
|
||||
int line_size) \
|
||||
{ \
|
||||
const pixel *pixels = (const pixel *) _pixels; \
|
||||
dctcoef *restrict block = (dctcoef *) _block; \
|
||||
dctcoef *av_restrict block = (dctcoef *) _block; \
|
||||
int i; \
|
||||
\
|
||||
/* read the pixels */ \
|
||||
@ -216,12 +216,12 @@ static void FUNCC(get_pixels ## suffix)(DCTELEM *restrict _block, \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
static void FUNCC(add_pixels8 ## suffix)(uint8_t *restrict _pixels, \
|
||||
static void FUNCC(add_pixels8 ## suffix)(uint8_t *av_restrict _pixels, \
|
||||
DCTELEM *_block, \
|
||||
int line_size) \
|
||||
{ \
|
||||
int i; \
|
||||
pixel *restrict pixels = (pixel *restrict)_pixels; \
|
||||
pixel *av_restrict pixels = (pixel *av_restrict)_pixels; \
|
||||
dctcoef *block = (dctcoef*)_block; \
|
||||
line_size /= sizeof(pixel); \
|
||||
\
|
||||
@ -239,12 +239,12 @@ static void FUNCC(add_pixels8 ## suffix)(uint8_t *restrict _pixels, \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
static void FUNCC(add_pixels4 ## suffix)(uint8_t *restrict _pixels, \
|
||||
static void FUNCC(add_pixels4 ## suffix)(uint8_t *av_restrict _pixels, \
|
||||
DCTELEM *_block, \
|
||||
int line_size) \
|
||||
{ \
|
||||
int i; \
|
||||
pixel *restrict pixels = (pixel *restrict)_pixels; \
|
||||
pixel *av_restrict pixels = (pixel *av_restrict)_pixels; \
|
||||
dctcoef *block = (dctcoef*)_block; \
|
||||
line_size /= sizeof(pixel); \
|
||||
\
|
||||
|
@ -476,7 +476,7 @@ static int pix_sum_altivec(uint8_t * pix, int line_size)
|
||||
return s;
|
||||
}
|
||||
|
||||
static void get_pixels_altivec(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
|
||||
static void get_pixels_altivec(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size)
|
||||
{
|
||||
int i;
|
||||
vector unsigned char perm = vec_lvsl(0, pixels);
|
||||
@ -502,7 +502,7 @@ static void get_pixels_altivec(DCTELEM *restrict block, const uint8_t *pixels, i
|
||||
}
|
||||
}
|
||||
|
||||
static void diff_pixels_altivec(DCTELEM *restrict block, const uint8_t *s1,
|
||||
static void diff_pixels_altivec(DCTELEM *av_restrict block, const uint8_t *s1,
|
||||
const uint8_t *s2, int stride)
|
||||
{
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user