Originally committed as revision 21864 to svn://svn.ffmpeg.org/ffmpeg/trunk
Måns Rullgård authored on 2010/02/18 05:36:12... | ... |
@@ -700,6 +700,22 @@ static inline void emms(void) |
700 | 700 |
# define STRIDE_ALIGN 8 |
701 | 701 |
#endif |
702 | 702 |
|
703 |
+#define LOCAL_ALIGNED(a, t, v, s, ...) \ |
|
704 |
+ uint8_t la_##v[sizeof(t s __VA_ARGS__) + (a)]; \ |
|
705 |
+ t (*v) __VA_ARGS__ = (void *)FFALIGN((uintptr_t)la_##v, a) |
|
706 |
+ |
|
707 |
+#if HAVE_LOCAL_ALIGNED_8 |
|
708 |
+# define LOCAL_ALIGNED_8((t, v, s, ...) DECLARE_ALIGNED_8(t, v) s __VA_ARGS__ |
|
709 |
+#else |
|
710 |
+# define LOCAL_ALIGNED_8(t, v, s, ...) LOCAL_ALIGNED(8, t, v, s, __VA_ARGS__) |
|
711 |
+#endif |
|
712 |
+ |
|
713 |
+#if HAVE_LOCAL_ALIGNED_16 |
|
714 |
+# define LOCAL_ALIGNED_16((t, v, s, ...) DECLARE_ALIGNED_16(t, v) s __VA_ARGS__ |
|
715 |
+#else |
|
716 |
+# define LOCAL_ALIGNED_16(t, v, s, ...) LOCAL_ALIGNED(16, t, v, s, __VA_ARGS__) |
|
717 |
+#endif |
|
718 |
+ |
|
703 | 719 |
/* PSNR */ |
704 | 720 |
void get_psnr(uint8_t *orig_image[3], uint8_t *coded_image[3], |
705 | 721 |
int orig_linesize[3], int coded_linesize, |