Revision f76543c9

View differences:

libavcodec/i386/dsputilenc_mmx.c
56 56
    );
57 57
}
58 58

  
59
static void get_pixels_sse2(DCTELEM *block, const uint8_t *pixels, int line_size)
60
{
61
    asm volatile(
62
        "pxor %%xmm7,      %%xmm7         \n\t"
63
        "movq (%0),        %%xmm0         \n\t"
64
        "movq (%0, %2),    %%xmm1         \n\t"
65
        "movq (%0, %2,2),  %%xmm2         \n\t"
66
        "movq (%0, %3),    %%xmm3         \n\t"
67
        "lea (%0,%2,4), %0                \n\t"
68
        "punpcklbw %%xmm7, %%xmm0         \n\t"
69
        "punpcklbw %%xmm7, %%xmm1         \n\t"
70
        "punpcklbw %%xmm7, %%xmm2         \n\t"
71
        "punpcklbw %%xmm7, %%xmm3         \n\t"
72
        "movdqa %%xmm0,      (%1)         \n\t"
73
        "movdqa %%xmm1,    16(%1)         \n\t"
74
        "movdqa %%xmm2,    32(%1)         \n\t"
75
        "movdqa %%xmm3,    48(%1)         \n\t"
76
        "movq (%0),        %%xmm0         \n\t"
77
        "movq (%0, %2),    %%xmm1         \n\t"
78
        "movq (%0, %2,2),  %%xmm2         \n\t"
79
        "movq (%0, %3),    %%xmm3         \n\t"
80
        "punpcklbw %%xmm7, %%xmm0         \n\t"
81
        "punpcklbw %%xmm7, %%xmm1         \n\t"
82
        "punpcklbw %%xmm7, %%xmm2         \n\t"
83
        "punpcklbw %%xmm7, %%xmm3         \n\t"
84
        "movdqa %%xmm0,    64(%1)         \n\t"
85
        "movdqa %%xmm1,    80(%1)         \n\t"
86
        "movdqa %%xmm2,    96(%1)         \n\t"
87
        "movdqa %%xmm3,   112(%1)         \n\t"
88
        : "+r" (pixels)
89
        : "r" (block), "r" ((x86_reg)line_size), "r" ((x86_reg)line_size*3)
90
    );
91
}
92

  
59 93
static inline void diff_pixels_mmx(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride)
60 94
{
61 95
    asm volatile(
......
1375 1409
        }
1376 1410

  
1377 1411
        if(mm_flags & MM_SSE2){
1412
            c->get_pixels = get_pixels_sse2;
1378 1413
            c->sum_abs_dctelem= sum_abs_dctelem_sse2;
1379 1414
            c->hadamard8_diff[0]= hadamard8_diff16_sse2;
1380 1415
            c->hadamard8_diff[1]= hadamard8_diff_sse2;

Also available in: Unified diff