Revision 59006372 libavcodec/i386/dsputil_mmx.c

View differences:

libavcodec/i386/dsputil_mmx.c
1730 1730

  
1731 1731
WARPER8_16_SQ(hadamard8_diff_mmx, hadamard8_diff16_mmx)
1732 1732
WARPER8_16_SQ(hadamard8_diff_mmx2, hadamard8_diff16_mmx2)
1733

  
1734
static int ssd_int8_vs_int16_mmx(int8_t *pix1, int16_t *pix2, int size){
1735
    int sum;
1736
    long i=size;
1737
    asm volatile(
1738
        "pxor %%mm4, %%mm4 \n"
1739
        "1: \n"
1740
        "sub $8, %0 \n"
1741
        "movq (%2,%0), %%mm2 \n"
1742
        "movq (%3,%0,2), %%mm0 \n"
1743
        "movq 8(%3,%0,2), %%mm1 \n"
1744
        "punpckhbw %%mm2, %%mm3 \n"
1745
        "punpcklbw %%mm2, %%mm2 \n"
1746
        "psraw $8, %%mm3 \n"
1747
        "psraw $8, %%mm2 \n"
1748
        "psubw %%mm3, %%mm1 \n"
1749
        "psubw %%mm2, %%mm0 \n"
1750
        "pmaddwd %%mm1, %%mm1 \n"
1751
        "pmaddwd %%mm0, %%mm0 \n"
1752
        "paddd %%mm1, %%mm4 \n"
1753
        "paddd %%mm0, %%mm4 \n"
1754
        "jg 1b \n"
1755
        "movq %%mm4, %%mm3 \n"
1756
        "psrlq $32, %%mm3 \n"
1757
        "paddd %%mm3, %%mm4 \n"
1758
        "movd %%mm4, %1 \n"
1759
        :"+r"(i), "=r"(sum)
1760
        :"r"(pix1), "r"(pix2)
1761
    );
1762
    return sum;
1763
}
1764

  
1733 1765
#endif //CONFIG_ENCODERS
1734 1766

  
1735 1767
#define put_no_rnd_pixels8_mmx(a,b,c,d) put_pixels8_mmx(a,b,c,d)
......
3215 3247
        }
3216 3248
        c->add_8x8basis= add_8x8basis_mmx;
3217 3249

  
3250
        c->ssd_int8_vs_int16 = ssd_int8_vs_int16_mmx;
3251

  
3218 3252
#endif //CONFIG_ENCODERS
3219 3253

  
3220 3254
        c->h263_v_loop_filter= h263_v_loop_filter_mmx;

Also available in: Unified diff