<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><pre><br>At 2015-03-02 22:25:29,rajesh@multicorewareinc.com wrote:
># HG changeset patch
># User Rajesh Paulraj<rajesh@multicorewareinc.com>
># Date 1425306286 -19800
># Mon Mar 02 19:54:46 2015 +0530
># Node ID b2897cf788eca68d2b5ef919d2de8c91fa759484
># Parent 70be3fa2ee550ec1b954c420e3c7a915589163a7
>asm-sse2: 16bpp code for filter_p2s[4x4](2.47x), filter_p2s[4x8](2.78x),
>filter_p2s[4x16](2.95x), filter_p2s[8x4](4.07x), filter_p2s[8x8](4.54x),
>filter_p2s[8x16](4.40x), filter_p2s[8x32](4.67x), filter_p2s[16x4](6.19x),
>filter_p2s[16x8](7.51x), filter_p2s[16x12](7.35x), filter_p2s[16x16](7.30x),
>filter_p2s[16x32](7.29x), filter_p2s[16x64](7.22x), filter_p2s[32x8](6.26x),
>filter_p2s[32x16](6.92x), filter_p2s[32x24](6.18x), filter_p2s[32x32](6.91x),
>filter_p2s[32x64](6.69x), filter_p2s[64x16](6.13x), filter_p2s[64x32](8.10x),
>filter_p2s[64x48](5.89x), filter_p2s[64x64](8.03x)
>
>diff -r 70be3fa2ee55 -r b2897cf788ec source/common/x86/asm-primitives.cpp
>--- a/source/common/x86/asm-primitives.cpp Mon Mar 02 10:52:59 2015 +0530
>+++ b/source/common/x86/asm-primitives.cpp Mon Mar 02 19:54:46 2015 +0530
>@@ -855,7 +855,29 @@
> PIXEL_AVG_W4(mmx2);
> LUMA_VAR(sse2);
>
>- p.luma_p2s = x265_luma_p2s_sse2;
>+ p.pu[LUMA_4x4].filter_p2s = x265_pixelToShort_4x4_sse2;
>+ p.pu[LUMA_4x8].filter_p2s = x265_pixelToShort_4x8_sse2;
>+ p.pu[LUMA_4x16].filter_p2s = x265_pixelToShort_4x16_sse2;
>+ p.pu[LUMA_8x4].filter_p2s = x265_pixelToShort_8x4_sse2;
>+ p.pu[LUMA_8x8].filter_p2s = x265_pixelToShort_8x8_sse2;
>+ p.pu[LUMA_8x16].filter_p2s = x265_pixelToShort_8x16_sse2;
>+ p.pu[LUMA_8x32].filter_p2s = x265_pixelToShort_8x32_sse2;
>+ p.pu[LUMA_16x4].filter_p2s = x265_pixelToShort_16x4_sse2;
>+ p.pu[LUMA_16x8].filter_p2s = x265_pixelToShort_16x8_sse2;
>+ p.pu[LUMA_16x12].filter_p2s = x265_pixelToShort_16x12_sse2;
>+ p.pu[LUMA_16x16].filter_p2s = x265_pixelToShort_16x16_sse2;
>+ p.pu[LUMA_16x32].filter_p2s = x265_pixelToShort_16x32_sse2;
>+ p.pu[LUMA_16x64].filter_p2s = x265_pixelToShort_16x64_sse2;
>+ p.pu[LUMA_32x8].filter_p2s = x265_pixelToShort_32x8_sse2;
>+ p.pu[LUMA_32x16].filter_p2s = x265_pixelToShort_32x16_sse2;
>+ p.pu[LUMA_32x24].filter_p2s = x265_pixelToShort_32x24_sse2;
>+ p.pu[LUMA_32x32].filter_p2s = x265_pixelToShort_32x32_sse2;
>+ p.pu[LUMA_32x64].filter_p2s = x265_pixelToShort_32x64_sse2;
>+ p.pu[LUMA_64x16].filter_p2s = x265_pixelToShort_64x16_sse2;
>+ p.pu[LUMA_64x32].filter_p2s = x265_pixelToShort_64x32_sse2;
>+ p.pu[LUMA_64x48].filter_p2s = x265_pixelToShort_64x48_sse2;
>+ p.pu[LUMA_64x64].filter_p2s = x265_pixelToShort_64x64_sse2;
>+
> p.chroma[X265_CSP_I420].p2s = x265_chroma_p2s_sse2;
> p.chroma[X265_CSP_I422].p2s = x265_chroma_p2s_sse2;
>
>diff -r 70be3fa2ee55 -r b2897cf788ec source/common/x86/ipfilter16.asm
>--- a/source/common/x86/ipfilter16.asm Mon Mar 02 10:52:59 2015 +0530
>+++ b/source/common/x86/ipfilter16.asm Mon Mar 02 19:54:46 2015 +0530
>@@ -5525,17 +5525,17 @@
> FILTER_VER_LUMA_SS 64, 16
> FILTER_VER_LUMA_SS 16, 64
>
>-;--------------------------------------------------------------------------------------------------
>-; void filterConvertPelToShort(pixel *src, intptr_t srcStride, int16_t *dst, int width, int height)
>-;--------------------------------------------------------------------------------------------------
>+;-----------------------------------------------------------------------------
>+; void pixelToShort(pixel *src, intptr_t srcStride, int16_t *dst)
>+;-----------------------------------------------------------------------------
>+%macro PIXEL_WH_4xN 2
> INIT_XMM sse2
>-cglobal luma_p2s, 3, 7, 5
>-
>+cglobal pixelToShort_%1x%2, 3, 7, 5<br>the function just for 4xN, the macro affect debug<br>
> add r1, r1
>
> ; load width and height
>- mov r3d, r3m
>- mov r4d, r4m
>+ mov r3d, %1<br>we may reduce a register since %1 always equal to 4<br>
>+ mov r4d, %2
>
> ; load constant
> mova m4, [tab_c_n8192]
>@@ -5585,5 +5585,267 @@
>
> sub r4d, 4
> jnz .loopH
>-
> RET
>+%endmacro
>+PIXEL_WH_4xN 4, 4
>+PIXEL_WH_4xN 4, 8
>+PIXEL_WH_4xN 4, 16
</pre></div>