History

avcodec/ppc/vc1dsp_altivec: add POWER LE support to vc1_inv_trans_8x4_altivec()

Rong Yan committed 11 years ago

Commit 36cd2bc1 parent af14ae81 file · +10 −3Browse files

Unified · Split

libavcodec/ppc/vc1dsp_altivec.c+10−3
@@ -304,16 +304,23 @@ static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, int16_t *block) · 303 unmodified lines
304304 src2 = vec_pack(s2, sA);
305305 src3 = vec_pack(s3, sB);
306306
307+#if HAVE_BIGENDIAN
307308 p0 = vec_lvsl (0, dest);
308309 p1 = vec_lvsl (stride, dest);
309310 p = vec_splat_u8 (-1);
310311 perm0 = vec_mergeh (p, p0);
311312 perm1 = vec_mergeh (p, p1);
313+#define GET_TMP2(dst, p) \
314+ tmp = vec_ld (0, dest); \
315+ tmp2 = (vector signed short)vec_perm (tmp, vec_splat_u8(0), p);
316+#else
317+#define GET_TMP2(dst,p) \
318+ tmp = vec_vsx_ld (0, dst); \
319+ tmp2 = (vector signed short)vec_mergeh (tmp, vec_splat_u8(0));
320+#endif
312321
313322 #define ADD(dest,src,perm) \
314− /* *(uint64_t *)&tmp = *(uint64_t *)dest; */ \
315− tmp = vec_ld (0, dest); \
316− tmp2 = (vector signed short)vec_perm (tmp, vec_splat_u8(0), perm); \
323+ GET_TMP2(dest, perm); \
317324 tmp3 = vec_adds (tmp2, src); \
318325 tmp = vec_packsu (tmp3, tmp3); \
319326 vec_ste ((vector unsigned int)tmp, 0, (unsigned int *)dest); \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t