<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 17, 2013 at 10:53 AM, Min Chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"># HG changeset patch<br>
# User Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
</div># Date 1382025002 -28800<br>
# Node ID ecd0378bf284026478454495b32afed1fddffd26<br>
# Parent  03370e851f3b754d4a8531e8ade92fca43de5cc4<br>
asm: cvt32to16_shr_sse2<br></blockquote><div><br></div><div>awesome... except this patch is missing pixel-util.asm.  If you send it to me via e-mail or Skype I can fold it into this patch.</div><div><br></div><div>Also; patches which add assembly functions should remove the intrinsic function.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff -r 03370e851f3b -r ecd0378bf284 source/common/CMakeLists.txt<br>
--- a/source/common/CMakeLists.txt      Thu Oct 17 23:49:38 2013 +0800<br>
+++ b/source/common/CMakeLists.txt      Thu Oct 17 23:50:02 2013 +0800<br>
<div class="im">@@ -153,7 +153,7 @@<br>
         add_definitions(-DHAVE_ALIGNED_STACK=0)<br>
     endif()<br>
<br>
-    set(ASMS pixel-a.asm const-a.asm cpu-a.asm sad-a.asm mc-a.asm mc-a2.asm ipfilter8.asm)<br>
+    set(ASMS pixel-a.asm const-a.asm cpu-a.asm sad-a.asm mc-a.asm mc-a2.asm ipfilter8.asm pixel-util.asm)<br>
     if (X64)<br>
         add_definitions(-DARCH_X86_64=1)<br>
     else()<br>
</div>diff -r 03370e851f3b -r ecd0378bf284 source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp      Thu Oct 17 23:49:38 2013 +0800<br>
+++ b/source/common/x86/asm-primitives.cpp      Thu Oct 17 23:50:02 2013 +0800<br>
<div class="im">@@ -312,6 +312,8 @@<br>
         p.sa8d[BLOCK_8x8]   = x265_pixel_sa8d_8x8_sse2;<br>
         p.sa8d[BLOCK_16x16] = x265_pixel_sa8d_16x16_sse2;<br>
         SA8D_INTER_FROM_BLOCK(sse2);<br>
+<br>
+        p.cvt32to16_shr = x265_cvt32to16_shr_sse2;<br>
     }<br>
     if (cpuMask & X265_CPU_SSSE3)<br>
     {<br>
</div>diff -r 03370e851f3b -r ecd0378bf284 source/common/x86/pixel.h<br>
--- a/source/common/x86/pixel.h Thu Oct 17 23:49:38 2013 +0800<br>
+++ b/source/common/x86/pixel.h Thu Oct 17 23:50:02 2013 +0800<br>
<div class="HOEnZb"><div class="h5">@@ -201,6 +201,8 @@<br>
 uint64_t x265_pixel_sa8d_satd_16x16_xop(pixel *pix1, intptr_t stride1, pixel *pix2, intptr_t stride2);<br>
 uint64_t x265_pixel_sa8d_satd_16x16_avx2(pixel *pix1, intptr_t stride1, pixel *pix2, intptr_t stride2);<br>
<br>
+void x265_cvt32to16_shr_sse2(short *dst, int *src, intptr_t, int, int);<br>
+<br>
 #define DECL_SSD(width, suffix) \<br>
     int x265_pixel_ssd_ ## width ## x64_ ## suffix(pixel *, intptr_t, pixel *, intptr_t); \<br>
     int x265_pixel_ssd_ ## width ## x48_ ## suffix(pixel *, intptr_t, pixel *, intptr_t); \<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>