1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +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:
Derek Buitenhuis 2012-09-07 09:39:12 -04:00 committed by Michael Niedermayer
parent d48ebfbdea
commit e62e455f7b
10 changed files with 27 additions and 27 deletions

View File

@ -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) \ #define MAKE_OP(OPNAME, SUFF, OPKIND, STORE) \
static void OPNAME ## _pixels ## SUFF ## _axp \ 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) \ int line_size, int h) \
{ \ { \
if ((size_t) pixels & 0x7) { \ if ((size_t) pixels & 0x7) { \
@ -222,7 +222,7 @@ static void OPNAME ## _pixels ## SUFF ## _axp \
} \ } \
\ \
static void OPNAME ## _pixels16 ## 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) \ int line_size, int h) \
{ \ { \
OPNAME ## _pixels ## SUFF ## _axp(block, pixels, line_size, h); \ OPNAME ## _pixels ## SUFF ## _axp(block, pixels, line_size, h); \

View File

@ -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, extern void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
int line_size); int line_size);
void get_pixels_mvi(DCTELEM *restrict block, void get_pixels_mvi(DCTELEM *av_restrict block,
const uint8_t *restrict pixels, int line_size); const uint8_t *av_restrict pixels, int line_size);
void diff_pixels_mvi(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, void diff_pixels_mvi(DCTELEM *block, const uint8_t *s1, const uint8_t *s2,
int stride); int stride);
int pix_abs8x8_mvi(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h); int pix_abs8x8_mvi(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h);

View File

@ -23,8 +23,8 @@
#include "dsputil_alpha.h" #include "dsputil_alpha.h"
#include "asm.h" #include "asm.h"
void get_pixels_mvi(DCTELEM *restrict block, void get_pixels_mvi(DCTELEM *av_restrict block,
const uint8_t *restrict pixels, int line_size) const uint8_t *av_restrict pixels, int line_size)
{ {
int h = 8; int h = 8;

View File

@ -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_avg_pixels8_armv6(uint8_t *, const uint8_t *, int, int);
void ff_add_pixels_clamped_armv6(const DCTELEM *block, void ff_add_pixels_clamped_armv6(const DCTELEM *block,
uint8_t *restrict pixels, uint8_t *av_restrict pixels,
int line_size); int line_size);
void ff_get_pixels_armv6(DCTELEM *block, const uint8_t *pixels, int stride); void ff_get_pixels_armv6(DCTELEM *block, const uint8_t *pixels, int stride);

View File

@ -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_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_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_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_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_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; int ff_bfin_z_sad16x16 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text;

View File

@ -518,7 +518,7 @@ DEFUN_END(pix_sum)
DEFUN(get_pixels,mL1, 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); [--sp] = (r7:4);
i3=r0; // dest i3=r0; // dest
i0=r1; // src0 i0=r1; // src0

View File

@ -51,7 +51,7 @@ static const AVClass class = {
#define LAMBDA_FRAC_BITS 10 #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; int i;
for (i = 0; i < 4; 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); 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; int i;
const uint16_t* pixels16 = (const uint16_t*)pixels; const uint16_t* pixels16 = (const uint16_t*)pixels;

View File

@ -353,7 +353,7 @@ static int sse16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
return s; 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){ const uint8_t *s2, int stride){
int i; 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 line_size)
{ {
int i; 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 line_size)
{ {
int i; 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 line_size)
{ {
int i; 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, static void put_signed_pixels_clamped_c(const DCTELEM *block,
uint8_t *restrict pixels, uint8_t *av_restrict pixels,
int line_size) int line_size)
{ {
int i, j; 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 line_size)
{ {
int i; 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 line_size)
{ {
int i; 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 line_size)
{ {
int i; int i;

View File

@ -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) \ #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, \ const uint8_t *_pixels, \
int line_size) \ int line_size) \
{ \ { \
const pixel *pixels = (const pixel *) _pixels; \ const pixel *pixels = (const pixel *) _pixels; \
dctcoef *restrict block = (dctcoef *) _block; \ dctcoef *av_restrict block = (dctcoef *) _block; \
int i; \ int i; \
\ \
/* read the pixels */ \ /* 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, \ DCTELEM *_block, \
int line_size) \ int line_size) \
{ \ { \
int i; \ int i; \
pixel *restrict pixels = (pixel *restrict)_pixels; \ pixel *av_restrict pixels = (pixel *av_restrict)_pixels; \
dctcoef *block = (dctcoef*)_block; \ dctcoef *block = (dctcoef*)_block; \
line_size /= sizeof(pixel); \ 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, \ DCTELEM *_block, \
int line_size) \ int line_size) \
{ \ { \
int i; \ int i; \
pixel *restrict pixels = (pixel *restrict)_pixels; \ pixel *av_restrict pixels = (pixel *av_restrict)_pixels; \
dctcoef *block = (dctcoef*)_block; \ dctcoef *block = (dctcoef*)_block; \
line_size /= sizeof(pixel); \ line_size /= sizeof(pixel); \
\ \

View File

@ -476,7 +476,7 @@ static int pix_sum_altivec(uint8_t * pix, int line_size)
return s; 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; int i;
vector unsigned char perm = vec_lvsl(0, pixels); 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) const uint8_t *s2, int stride)
{ {
int i; int i;