<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 17, 2015 at 12:41 PM, <span dir="ltr"><<a href="mailto:sumalatha@multicorewareinc.com" target="_blank">sumalatha@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Sumalatha Polureddy<<a href="mailto:sumalatha@multicorewareinc.com" target="_blank">sumalatha@multicorewareinc.com</a>><br>
# Date 1434524988 -19800<br>
# Wed Jun 17 12:39:48 2015 +0530<br>
# Node ID 8774c63a4047fa5e54679237aeb88518740efa8d<br>
# Parent be0ed447922cc81e809d296e75424bb71822aea7<br>
asm: avx2 code for pixel_avg[16xN, 32xN] for 10 bpp<br>
<br>
sse2:<br>
avg_pp[32x32] 1662.52 3823.17<br>
avg_pp[32x16] 874.92 2046.83<br>
avg_pp[ 32x8] 479.38 1126.35<br>
avg_pp[32x24] 1245.13 3170.44<br>
avg_pp[32x64] 3187.47 7329.66<br>
avx2:<br>
avg_pp[32x32] 1584.80 3699.90<br>
avg_pp[32x16] 820.54 2264.90<br>
avg_pp[ 32x8] 450.56 975.42<br>
avg_pp[32x24] 1104.99 2727.65<br>
avg_pp[32x64] 3046.60 7310.93<br>
<br>
diff -r be0ed447922c -r 8774c63a4047 source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp Tue Jun 16 11:15:03 2015 +0530<br>
+++ b/source/common/x86/asm-primitives.cpp Wed Jun 17 12:39:48 2015 +0530<br>
@@ -1568,6 +1568,18 @@<br>
p.pu[LUMA_64x48].sad_x4 = PFX(pixel_sad_x4_64x48_avx2);<br>
p.pu[LUMA_64x64].sad_x4 = PFX(pixel_sad_x4_64x64_avx2);<br>
<br>
+ p.pu[LUMA_16x4].pixelavg_pp = PFX(pixel_avg_16x4_avx2);<br>
+ p.pu[LUMA_16x8].pixelavg_pp = PFX(pixel_avg_16x8_avx2);<br>
+ p.pu[LUMA_16x12].pixelavg_pp = PFX(pixel_avg_16x12_avx2);<br>
+ p.pu[LUMA_16x16].pixelavg_pp = PFX(pixel_avg_16x16_avx2);<br>
+ p.pu[LUMA_16x32].pixelavg_pp = PFX(pixel_avg_16x32_avx2);<br>
+ p.pu[LUMA_16x64].pixelavg_pp = PFX(pixel_avg_16x64_avx2);<br>
+ p.pu[LUMA_32x8].pixelavg_pp = PFX(pixel_avg_32x8_avx2);<br>
+ p.pu[LUMA_32x16].pixelavg_pp = PFX(pixel_avg_32x16_avx2);<br>
+ p.pu[LUMA_32x24].pixelavg_pp = PFX(pixel_avg_32x24_avx2);<br>
+ p.pu[LUMA_32x32].pixelavg_pp = PFX(pixel_avg_32x32_avx2);<br>
+ p.pu[LUMA_32x64].pixelavg_pp = PFX(pixel_avg_32x64_avx2);<br>
+<br>
p.pu[LUMA_16x4].convert_p2s = PFX(filterPixelToShort_16x4_avx2);<br>
p.pu[LUMA_16x8].convert_p2s = PFX(filterPixelToShort_16x8_avx2);<br>
p.pu[LUMA_16x12].convert_p2s = PFX(filterPixelToShort_16x12_avx2);<br>
diff -r be0ed447922c -r 8774c63a4047 source/common/x86/mc-a.asm<br>
--- a/source/common/x86/mc-a.asm Tue Jun 16 11:15:03 2015 +0530<br>
+++ b/source/common/x86/mc-a.asm Wed Jun 17 12:39:48 2015 +0530<br>
@@ -3528,6 +3528,49 @@<br>
AVG_WEIGHT 32, 8<br>
AVG_WEIGHT 48, 8<br>
AVG_WEIGHT 64, 8<br>
+<br>
+%define BIWEIGHT BIWEIGHT_SSSE3<br>
+%define BIWEIGHT_START BIWEIGHT_START_SSSE3<br>
+INIT_YMM avx2<br>
+cglobal pixel_avg_weight_w16<br>
+ BIWEIGHT_START<br>
+ AVG_START 5<br>
+.height_loop:<br>
+ movu m0, [t2]<br>
+ movu m1, [t4]<br>
+ SBUTTERFLY wd, 0, 1, 2<br>
+ pmaddwd m0, m3<br>
+ pmaddwd m1, m3<br>
+ pmulld m0, m4<br>
+ pmulld m1, m4<br>
+ packusdw m0, m1<br>
+ mova [t0], m0<br>
+ AVG_END<br>
+<br>
+cglobal pixel_avg_weight_w32<br>
+ BIWEIGHT_START<br>
+ AVG_START 5<br>
+.height_loop:<br>
+ movu m0, [t2]<br>
+ movu m1, [t4]<br>
+ SBUTTERFLY wd, 0, 1, 2<br>
+ pmaddwd m0, m3<br>
+ pmaddwd m1, m3<br>
+ pmulld m0, m4<br>
+ pmulld m1, m4<br>
+ packuswb m0, m1<br>
+ mova [t0], m0<br>
+ movu m0, [t2 + 32]<br>
+ movu m1, [t4 + 32]<br>
+ SBUTTERFLY wd, 0, 1, 2<br>
+ pmaddwd m0, m3<br>
+ pmaddwd m1, m3<br>
+ pmulld m0, m4<br>
+ pmulld m1, m4<br>
+ packusdw m0, m1<br>
+ mova [t0 + 32], m0<br>
+ AVG_END<br>
+<br>
%else ;!HIGH_BIT_DEPTH<br>
INIT_XMM sse2<br>
AVG_WEIGHT 8, 7<br>
@@ -4096,6 +4139,22 @@<br>
AVG_FUNC 12, movdqu, movdqa, movq<br>
AVGH 12, 16<br>
<br></blockquote><div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small;display:inline">>> this should be INIT_YMM avx2, are you calling same sse2 code here?<br></div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+INIT_XMM avx2<br>
+AVG_FUNC 16, movdqu, movdqa<br>
+AVGH 16, 64<br>
+AVGH 16, 32<br>
+AVGH 16, 16<br>
+AVGH 16, 12<br>
+AVGH 16, 8<br>
+AVGH 16, 4<br>
+<br>
+AVG_FUNC 32, movdqu, movdqa<br>
+AVGH 32, 64<br>
+AVGH 32, 32<br>
+AVGH 32, 24<br>
+AVGH 32, 16<br>
+AVGH 32, 8<br>
+<br>
%else ;!HIGH_BIT_DEPTH<br>
<br>
INIT_MMX mmx2<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>