Originally committed as revision 23916 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -109,7 +109,7 @@ static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, int st |
| 109 | 109 |
const int lt= src[-1-1*stride]; |
| 110 | 110 |
LOAD_TOP_EDGE |
| 111 | 111 |
LOAD_TOP_RIGHT_EDGE |
| 112 |
- uint32_t v = PACK4UINT8((lt + 2*t0 + t1 + 2) >> 2, |
|
| 112 |
+ uint32_t v = PACK_4U8((lt + 2*t0 + t1 + 2) >> 2, |
|
| 113 | 113 |
(t0 + 2*t1 + t2 + 2) >> 2, |
| 114 | 114 |
(t1 + 2*t2 + t3 + 2) >> 2, |
| 115 | 115 |
(t2 + 2*t3 + t4 + 2) >> 2); |
| ... | ... |
@@ -146,12 +146,36 @@ if ((y) < (x)) {\
|
| 146 | 146 |
# define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s))) |
| 147 | 147 |
#endif |
| 148 | 148 |
|
| 149 |
-#ifndef PACK4x8 |
|
| 150 |
-# if HAVE_BIGENDIAN |
|
| 151 |
-# define PACK4UINT8(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) |
|
| 152 |
-# else |
|
| 153 |
-# define PACK4UINT8(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) |
|
| 149 |
+#if HAVE_BIGENDIAN |
|
| 150 |
+# ifndef PACK_2U8 |
|
| 151 |
+# define PACK_2U8(a,b) (((a) << 8) | (b)) |
|
| 154 | 152 |
# endif |
| 153 |
+# ifndef PACK_4U8 |
|
| 154 |
+# define PACK_4U8(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) |
|
| 155 |
+# endif |
|
| 156 |
+# ifndef PACK_2U16 |
|
| 157 |
+# define PACK_2U16(a,b) (((a) << 16) | (b)) |
|
| 158 |
+# endif |
|
| 159 |
+#else |
|
| 160 |
+# ifndef PACK_2U8 |
|
| 161 |
+# define PACK_2U8(a,b) (((b) << 8) | (a)) |
|
| 162 |
+# endif |
|
| 163 |
+# ifndef PACK_4U2 |
|
| 164 |
+# define PACK_4U8(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) |
|
| 165 |
+# endif |
|
| 166 |
+# ifndef PACK_2U16 |
|
| 167 |
+# define PACK_2U16(a,b) (((b) << 16) | (a)) |
|
| 168 |
+# endif |
|
| 169 |
+#endif |
|
| 170 |
+ |
|
| 171 |
+#ifndef PACK_2S8 |
|
| 172 |
+# define PACK_2S8(a,b) PACK_2U8((a)&255, (b)&255) |
|
| 173 |
+#endif |
|
| 174 |
+#ifndef PACK_4S8 |
|
| 175 |
+# define PACK_4S8(a,b,c,d) PACK_4U8((a)&255, (b)&255, (c)&255, (d)&255) |
|
| 176 |
+#endif |
|
| 177 |
+#ifndef PACK_2S16 |
|
| 178 |
+# define PACK_2S16(a,b) PACK_2U16((a)&0xffff, (b)&0xffff) |
|
| 155 | 179 |
#endif |
| 156 | 180 |
|
| 157 | 181 |
#endif /* AVCODEC_MATHOPS_H */ |