Revision 5ba24e49 libavfilter/x86/yadif.c

View differences:

libavfilter/x86/yadif.c
38 38
            "movq      %%mm2, %%mm5 \n\t"\
39 39
            "pxor      %%mm3, %%mm4 \n\t"\
40 40
            "pavgb     %%mm3, %%mm5 \n\t"\
41
            "pand     %[pb1], %%mm4 \n\t"\
41
            "pand     "MANGLE(pb_1)", %%mm4 \n\t"\
42 42
            "psubusb   %%mm4, %%mm5 \n\t"\
43 43
            "psrlq     $8,    %%mm5 \n\t"\
44 44
            "punpcklbw %%mm7, %%mm5 \n\t" /* (cur[x-refs+j] + cur[x+refs-j])>>1 */\
......
68 68

  
69 69
#define CHECK2 /* pretend not to have checked dir=2 if dir=1 was bad.\
70 70
                  hurts both quality and speed, but matches the C version. */\
71
            "paddw    %[pw1], %%mm6 \n\t"\
71
            "paddw    "MANGLE(pw_1)", %%mm6 \n\t"\
72 72
            "psllw     $14,   %%mm6 \n\t"\
73 73
            "paddsw    %%mm6, %%mm2 \n\t"\
74 74
            "movq      %%mm0, %%mm3 \n\t"\
......
79 79
            "por       %%mm5, %%mm3 \n\t"\
80 80
            "movq      %%mm3, %%mm1 \n\t"
81 81

  
82
DECLARE_ASM_CONST(16, uint64_t, pw_1) = 0x0001000100010001ULL;
83
DECLARE_ASM_CONST(16, uint64_t, pb_1) = 0x0101010101010101ULL;
84

  
82 85
void ff_yadif_filter_line_mmx(uint8_t *dst,
83 86
                              uint8_t *prev, uint8_t *cur, uint8_t *next,
84 87
                              int w, int refs, int parity, int mode)
85 88
{
86
    static const uint64_t pw_1 = 0x0001000100010001ULL;
87
    static const uint64_t pb_1 = 0x0101010101010101ULL;
88 89
    uint64_t tmp0, tmp1, tmp2, tmp3;
89 90
    int x;
90 91

  
......
142 143
            "punpcklbw %%mm7, %%mm3 \n\t" /* ABS(cur[x-refs+1] - cur[x+refs+1]) */\
143 144
            "paddw     %%mm2, %%mm0 \n\t"\
144 145
            "paddw     %%mm3, %%mm0 \n\t"\
145
            "psubw    %[pw1], %%mm0 \n\t" /* spatial_score */\
146
            "psubw    "MANGLE(pw_1)", %%mm0 \n\t" /* spatial_score */\
146 147
\
147 148
            CHECK(-2,0)\
148 149
            CHECK1\
......
203 204
             [next] "r"(next),\
204 205
             [prefs]"r"((x86_reg)refs),\
205 206
             [mrefs]"r"((x86_reg)-refs),\
206
             [pw1]  "m"(pw_1),\
207
             [pb1]  "m"(pb_1),\
208 207
             [mode] "g"(mode)\
209 208
        );\
210 209
        __asm__ volatile("movd %%mm1, %0" :"=m"(*dst));\

Also available in: Unified diff