[Ffmpeg-cvslog] r6621 - in trunk/libavcodec/ppc: dsputil_altivec.h mpegvideo_altivec.c vc1dsp_altivec.c
gpoirier
subversion
Tue Oct 10 10:01:19 CEST 2006
Author: gpoirier
Date: Tue Oct 10 10:01:19 2006
New Revision: 6621
Modified:
trunk/libavcodec/ppc/dsputil_altivec.h
trunk/libavcodec/ppc/mpegvideo_altivec.c
trunk/libavcodec/ppc/vc1dsp_altivec.c
Log:
Move TRANSPOSE8 macro to dsputil_altivec.h.
(was duplicated in libavcodec/ppc/vc1dsp_altivec.c
nd libavcodec/ppc/mpegvideo_altivec.c, and will be
used in upcoming routines for h264_altivec.c)
Modified: trunk/libavcodec/ppc/dsputil_altivec.h
==============================================================================
--- trunk/libavcodec/ppc/dsputil_altivec.h (original)
+++ trunk/libavcodec/ppc/dsputil_altivec.h Tue Oct 10 10:01:19 2006
@@ -67,6 +67,40 @@
#define vcii(a,b,c,d) (const vector float){FLOAT_ ## a, FLOAT_ ## b, FLOAT_ ## c, FLOAT_ ## d}
#endif
+// Transpose 8x8 matrix of 16-bit elements (in-place)
+#define TRANSPOSE8(a,b,c,d,e,f,g,h) \
+do { \
+ vector signed short A1, B1, C1, D1, E1, F1, G1, H1; \
+ vector signed short A2, B2, C2, D2, E2, F2, G2, H2; \
+ \
+ A1 = vec_mergeh (a, e); \
+ B1 = vec_mergel (a, e); \
+ C1 = vec_mergeh (b, f); \
+ D1 = vec_mergel (b, f); \
+ E1 = vec_mergeh (c, g); \
+ F1 = vec_mergel (c, g); \
+ G1 = vec_mergeh (d, h); \
+ H1 = vec_mergel (d, h); \
+ \
+ A2 = vec_mergeh (A1, E1); \
+ B2 = vec_mergel (A1, E1); \
+ C2 = vec_mergeh (B1, F1); \
+ D2 = vec_mergel (B1, F1); \
+ E2 = vec_mergeh (C1, G1); \
+ F2 = vec_mergel (C1, G1); \
+ G2 = vec_mergeh (D1, H1); \
+ H2 = vec_mergel (D1, H1); \
+ \
+ a = vec_mergeh (A2, E2); \
+ b = vec_mergel (A2, E2); \
+ c = vec_mergeh (B2, F2); \
+ d = vec_mergel (B2, F2); \
+ e = vec_mergeh (C2, G2); \
+ f = vec_mergel (C2, G2); \
+ g = vec_mergeh (D2, H2); \
+ h = vec_mergel (D2, H2); \
+} while (0)
+
#endif /* HAVE_ALTIVEC */
#endif /* _DSPUTIL_ALTIVEC_ */
Modified: trunk/libavcodec/ppc/mpegvideo_altivec.c
==============================================================================
--- trunk/libavcodec/ppc/mpegvideo_altivec.c (original)
+++ trunk/libavcodec/ppc/mpegvideo_altivec.c Tue Oct 10 10:01:19 2006
@@ -52,39 +52,6 @@
d = vec_mergel(_trans_acl, _trans_bdl); \
} while (0)
-#define TRANSPOSE8(a,b,c,d,e,f,g,h) \
-do { \
- __typeof__(a) _A1, _B1, _C1, _D1, _E1, _F1, _G1, _H1; \
- __typeof__(a) _A2, _B2, _C2, _D2, _E2, _F2, _G2, _H2; \
- \
- _A1 = vec_mergeh (a, e); \
- _B1 = vec_mergel (a, e); \
- _C1 = vec_mergeh (b, f); \
- _D1 = vec_mergel (b, f); \
- _E1 = vec_mergeh (c, g); \
- _F1 = vec_mergel (c, g); \
- _G1 = vec_mergeh (d, h); \
- _H1 = vec_mergel (d, h); \
- \
- _A2 = vec_mergeh (_A1, _E1); \
- _B2 = vec_mergel (_A1, _E1); \
- _C2 = vec_mergeh (_B1, _F1); \
- _D2 = vec_mergel (_B1, _F1); \
- _E2 = vec_mergeh (_C1, _G1); \
- _F2 = vec_mergel (_C1, _G1); \
- _G2 = vec_mergeh (_D1, _H1); \
- _H2 = vec_mergel (_D1, _H1); \
- \
- a = vec_mergeh (_A2, _E2); \
- b = vec_mergel (_A2, _E2); \
- c = vec_mergeh (_B2, _F2); \
- d = vec_mergel (_B2, _F2); \
- e = vec_mergeh (_C2, _G2); \
- f = vec_mergel (_C2, _G2); \
- g = vec_mergeh (_D2, _H2); \
- h = vec_mergel (_D2, _H2); \
-} while (0)
-
// Loads a four-byte value (int or float) from the target address
// into every element in the target vector. Only works if the
Modified: trunk/libavcodec/ppc/vc1dsp_altivec.c
==============================================================================
--- trunk/libavcodec/ppc/vc1dsp_altivec.c (original)
+++ trunk/libavcodec/ppc/vc1dsp_altivec.c Tue Oct 10 10:01:19 2006
@@ -26,40 +26,6 @@
#include "dsputil_altivec.h"
-// Transpose 8x8 matrix of 16-bit elements. Borrowed from mpegvideo_altivec.c
-#define TRANSPOSE8(a,b,c,d,e,f,g,h) \
-do { \
- vector signed short A1, B1, C1, D1, E1, F1, G1, H1; \
- vector signed short A2, B2, C2, D2, E2, F2, G2, H2; \
- \
- A1 = vec_mergeh (a, e); \
- B1 = vec_mergel (a, e); \
- C1 = vec_mergeh (b, f); \
- D1 = vec_mergel (b, f); \
- E1 = vec_mergeh (c, g); \
- F1 = vec_mergel (c, g); \
- G1 = vec_mergeh (d, h); \
- H1 = vec_mergel (d, h); \
- \
- A2 = vec_mergeh (A1, E1); \
- B2 = vec_mergel (A1, E1); \
- C2 = vec_mergeh (B1, F1); \
- D2 = vec_mergel (B1, F1); \
- E2 = vec_mergeh (C1, G1); \
- F2 = vec_mergel (C1, G1); \
- G2 = vec_mergeh (D1, H1); \
- H2 = vec_mergel (D1, H1); \
- \
- a = vec_mergeh (A2, E2); \
- b = vec_mergel (A2, E2); \
- c = vec_mergeh (B2, F2); \
- d = vec_mergel (B2, F2); \
- e = vec_mergeh (C2, G2); \
- f = vec_mergel (C2, G2); \
- g = vec_mergeh (D2, H2); \
- h = vec_mergel (D2, H2); \
-} while (0)
-
// main steps of 8x8 transform
#define STEP8(s0, s1, s2, s3, s4, s5, s6, s7, vec_rnd) \
do { \
More information about the ffmpeg-cvslog
mailing list