Revision 28748a91 libavcodec/i386/dsputil_mmx.c

View differences:

libavcodec/i386/dsputil_mmx.c
203 203
#undef DEF
204 204
#undef PAVGB
205 205

  
206
#define SBUTTERFLY(a,b,t,n,m)\
207
    "mov" #m " " #a ", " #t "         \n\t" /* abcd */\
208
    "punpckl" #n " " #b ", " #a "     \n\t" /* aebf */\
209
    "punpckh" #n " " #b ", " #t "     \n\t" /* cgdh */\
210

  
211
#define TRANSPOSE4(a,b,c,d,t)\
212
    SBUTTERFLY(a,b,t,wd,q) /* a=aebf t=cgdh */\
213
    SBUTTERFLY(c,d,b,wd,q) /* c=imjn b=kolp */\
214
    SBUTTERFLY(a,c,d,dq,q) /* a=aeim d=bfjn */\
215
    SBUTTERFLY(t,b,c,dq,q) /* t=cgko c=dhlp */
216

  
217 206
/***********************************/
218 207
/* standard MMX */
219 208

  
......
1545 1534
#define DIFF_PIXELS_4x8(p1,p2,stride,temp) DIFF_PIXELS_8(d, q,   %%mm,  p1, p2, stride, temp)
1546 1535
#define DIFF_PIXELS_8x8(p1,p2,stride,temp) DIFF_PIXELS_8(q, dqa, %%xmm, p1, p2, stride, temp)
1547 1536

  
1548
#ifdef ARCH_X86_64
1549
// permutes 01234567 -> 05736421
1550
#define TRANSPOSE8(a,b,c,d,e,f,g,h,t)\
1551
    SBUTTERFLY(a,b,%%xmm8,wd,dqa)\
1552
    SBUTTERFLY(c,d,b,wd,dqa)\
1553
    SBUTTERFLY(e,f,d,wd,dqa)\
1554
    SBUTTERFLY(g,h,f,wd,dqa)\
1555
    SBUTTERFLY(a,c,h,dq,dqa)\
1556
    SBUTTERFLY(%%xmm8,b,c,dq,dqa)\
1557
    SBUTTERFLY(e,g,b,dq,dqa)\
1558
    SBUTTERFLY(d,f,g,dq,dqa)\
1559
    SBUTTERFLY(a,e,f,qdq,dqa)\
1560
    SBUTTERFLY(%%xmm8,d,e,qdq,dqa)\
1561
    SBUTTERFLY(h,b,d,qdq,dqa)\
1562
    SBUTTERFLY(c,g,b,qdq,dqa)\
1563
    "movdqa %%xmm8, "#g"              \n\t"
1564
#else
1565
#define TRANSPOSE8(a,b,c,d,e,f,g,h,t)\
1566
    "movdqa "#h", "#t"                \n\t"\
1567
    SBUTTERFLY(a,b,h,wd,dqa)\
1568
    "movdqa "#h", 16"#t"              \n\t"\
1569
    "movdqa "#t", "#h"                \n\t"\
1570
    SBUTTERFLY(c,d,b,wd,dqa)\
1571
    SBUTTERFLY(e,f,d,wd,dqa)\
1572
    SBUTTERFLY(g,h,f,wd,dqa)\
1573
    SBUTTERFLY(a,c,h,dq,dqa)\
1574
    "movdqa "#h", "#t"                \n\t"\
1575
    "movdqa 16"#t", "#h"              \n\t"\
1576
    SBUTTERFLY(h,b,c,dq,dqa)\
1577
    SBUTTERFLY(e,g,b,dq,dqa)\
1578
    SBUTTERFLY(d,f,g,dq,dqa)\
1579
    SBUTTERFLY(a,e,f,qdq,dqa)\
1580
    SBUTTERFLY(h,d,e,qdq,dqa)\
1581
    "movdqa "#h", 16"#t"              \n\t"\
1582
    "movdqa "#t", "#h"                \n\t"\
1583
    SBUTTERFLY(h,b,d,qdq,dqa)\
1584
    SBUTTERFLY(c,g,b,qdq,dqa)\
1585
    "movdqa 16"#t", "#g"              \n\t"
1586
#endif
1587

  
1588 1537
#define LBUTTERFLY2(a1,b1,a2,b2)\
1589 1538
    "paddw " #b1 ", " #a1 "           \n\t"\
1590 1539
    "paddw " #b2 ", " #a2 "           \n\t"\

Also available in: Unified diff