[x265] [PATCH 2 of 2] pixel8.inc, pixelharness : Uncrustified

deepthidevaki at multicorewareinc.com deepthidevaki at multicorewareinc.com
Tue Jul 16 10:58:03 CEST 2013


# HG changeset patch
# User Deepthi Devaki
# Date 1373959339 -19800
# Node ID 8ec8829d5b6b578062005c19c5443d86a1382e5b
# Parent  9c5fc824649816f4c54b769e04ee6071cdb70d5d
pixel8.inc, pixelharness : Uncrustified.

diff -r 9c5fc8246498 -r 8ec8829d5b6b source/common/vec/pixel8.inc
--- a/source/common/vec/pixel8.inc	Tue Jul 16 12:48:34 2013 +0530
+++ b/source/common/vec/pixel8.inc	Tue Jul 16 12:52:19 2013 +0530
@@ -1942,22 +1942,24 @@
 {
     int x, y;
     Vec8s   tmp;
-    Vec4i   vw0(w0), vsrc, iofs(IF_INTERNAL_OFFS), ofs(offset), vround(round), vdst; 
+
+    Vec4i   vw0(w0), vsrc, iofs(IF_INTERNAL_OFFS), ofs(offset), vround(round), vdst;
     for (y = height - 1; y >= 0; y--)
     {
-        for (x = 0; x <= width-4; x+=4 )
-        {  
-            tmp  = load_partial(const_int(8), src+x);
+        for (x = 0; x <= width - 4; x += 4)
+        {
+            tmp  = load_partial(const_int(8), src + x);
             vsrc = extend_low(tmp);
             vdst = ((vw0 * (vsrc + iofs) + vround) >> shift) + ofs;
-            store_partial(const_int(4), dst+x, compress_unsafe(compress_saturated(vdst, vdst), 0));
+            store_partial(const_int(4), dst + x, compress_unsafe(compress_saturated(vdst, vdst), 0));
         }
-        if(width>x)
+
+        if (width > x)
         {
-            tmp  = load_partial(const_int(4), src+x);
+            tmp  = load_partial(const_int(4), src + x);
             vsrc = extend_low(tmp);
             vdst = ((vw0 * (vsrc + iofs) + vround) >> shift) + ofs;
-            compress_unsafe(compress_saturated(vdst, vdst), 0).store_partial(2, dst+x);
+            compress_unsafe(compress_saturated(vdst, vdst), 0).store_partial(2, dst + x);
         }
         src += srcStride;
         dst += dstStride;
@@ -2005,6 +2007,7 @@
         fenc += fencstride * 16;
         fref += frefstride * 16;
     }
+
     if (ly & 8)
     {
         unrollFunc_32_avx2<8>(fenc, fencstride, fref, frefstride, sad);
@@ -2210,6 +2213,7 @@
 void sad_avx2_x4_32(pixel *fenc, pixel *fref1, pixel *fref2, pixel *fref3, pixel *fref4, intptr_t frefstride, int *res)
 {
     Vec32uc m1, n1, n2, n3, n4;
+
     Vec8i sum1(0), sum2(0), sum3(0), sum4(0);
     Vec16s sad1(0), sad2(0), sad3(0), sad4(0);
     int max_iterators = (ly >> 4) << 4;
@@ -2282,6 +2286,7 @@
 void sad_avx2_x4_64(pixel *fenc, pixel *fref1, pixel *fref2, pixel *fref3, pixel *fref4, intptr_t frefstride, int *res)
 {
     Vec32uc m1, n1, n2, n3, n4;
+
     Vec8i sum1(0), sum2(0), sum3(0), sum4(0);
     Vec16s sad1(0), sad2(0), sad3(0), sad4(0);
     int max_iterators = (ly >> 3) << 3;
@@ -2371,4 +2376,5 @@
     res[2] = horizontal_add(sum3);
     res[3] = horizontal_add(sum4);
 }
-#endif
+
+#endif /* if INSTRSET >= 8 */
diff -r 9c5fc8246498 -r 8ec8829d5b6b source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp	Tue Jul 16 12:48:34 2013 +0530
+++ b/source/test/pixelharness.cpp	Tue Jul 16 12:52:19 2013 +0530
@@ -341,14 +341,15 @@
     int offset = (rand() % 256) - 128;
     for (int i = 0; i <= 100; i++)
     {
-        opt(sbuf1+j, opt_dest, 64, 64, width, height, w0, round, shift, offset, BIT_DEPTH);
-        ref(sbuf1+j, ref_dest, 64, 64, width, height, w0, round, shift, offset, BIT_DEPTH);
+        opt(sbuf1 + j, opt_dest, 64, 64, width, height, w0, round, shift, offset, BIT_DEPTH);
+        ref(sbuf1 + j, ref_dest, 64, 64, width, height, w0, round, shift, offset, BIT_DEPTH);
 
         if (memcmp(ref_dest, opt_dest, 64 * 64 * sizeof(pixel)))
             return false;
 
         j += 4;
     }
+
     return true;
 }
 
@@ -492,7 +493,7 @@
             return false;
         }
     }
-    
+
     if (opt.weightpUni)
     {
         if (!check_weightpUni(ref.weightpUni, opt.weightpUni))
@@ -502,7 +503,6 @@
         }
     }
 
-
     return true;
 }
 
@@ -609,6 +609,6 @@
     if (opt.weightpUni)
     {
         printf("WeightpUni");
-        REPORT_SPEEDUP(opt.weightpUni, ref.weightpUni, sbuf1, pbuf1, 64, 64, 32, 32, 128, 1<<9, 10, 100, BIT_DEPTH);
+        REPORT_SPEEDUP(opt.weightpUni, ref.weightpUni, sbuf1, pbuf1, 64, 64, 32, 32, 128, 1 << 9, 10, 100, BIT_DEPTH);
     }
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xhevc_deepthid-2.patch
Type: text/x-patch
Size: 4114 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130716/301d678b/attachment.bin>


More information about the x265-devel mailing list