mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
Add LOCAL_ALIGNED() macro for declaring aligned local arrays
Originally committed as revision 21864 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2480c390bd
commit
d96cd42969
2
configure
vendored
2
configure
vendored
@ -1035,6 +1035,8 @@ HAVE_LIST="
|
|||||||
libdc1394_1
|
libdc1394_1
|
||||||
libdc1394_2
|
libdc1394_2
|
||||||
llrint
|
llrint
|
||||||
|
local_aligned_16
|
||||||
|
local_aligned_8
|
||||||
log2
|
log2
|
||||||
log2f
|
log2f
|
||||||
loongson
|
loongson
|
||||||
|
@ -700,6 +700,22 @@ static inline void emms(void)
|
|||||||
# define STRIDE_ALIGN 8
|
# define STRIDE_ALIGN 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define LOCAL_ALIGNED(a, t, v, s, ...) \
|
||||||
|
uint8_t la_##v[sizeof(t s __VA_ARGS__) + (a)]; \
|
||||||
|
t (*v) __VA_ARGS__ = (void *)FFALIGN((uintptr_t)la_##v, a)
|
||||||
|
|
||||||
|
#if HAVE_LOCAL_ALIGNED_8
|
||||||
|
# define LOCAL_ALIGNED_8((t, v, s, ...) DECLARE_ALIGNED_8(t, v) s __VA_ARGS__
|
||||||
|
#else
|
||||||
|
# define LOCAL_ALIGNED_8(t, v, s, ...) LOCAL_ALIGNED(8, t, v, s, __VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LOCAL_ALIGNED_16
|
||||||
|
# define LOCAL_ALIGNED_16((t, v, s, ...) DECLARE_ALIGNED_16(t, v) s __VA_ARGS__
|
||||||
|
#else
|
||||||
|
# define LOCAL_ALIGNED_16(t, v, s, ...) LOCAL_ALIGNED(16, t, v, s, __VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* PSNR */
|
/* PSNR */
|
||||||
void get_psnr(uint8_t *orig_image[3], uint8_t *coded_image[3],
|
void get_psnr(uint8_t *orig_image[3], uint8_t *coded_image[3],
|
||||||
int orig_linesize[3], int coded_linesize,
|
int orig_linesize[3], int coded_linesize,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user