changeset 772:afcb19e80d04

Merged multicoreware/xhevc into default
author Deepthi Devaki Akkoorath <deepthidevaki@multicorewareinc.com>
date Fri, 19 Apr 2013 17:14:25 +0530
parents 45b7819d08eb (current diff) 8a517c789bbb (diff)
children 2996c71961a0
files
diffstat 1 files changed, 18 insertions(+-), 4 deletions(-) [+]
line wrap: on
line diff
--- a/source/Lib/TLibCommon/TComTrQuant.cpp	Fri Apr 19 14:44:49 2013 +0530
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp	Fri Apr 19 17:14:25 2013 +0530
@@ -1497,12 +1497,24 @@ Void TComTrQuant::xT(Int bitDepth, UInt 
 #else
     Int j;
     {
-        Short block[64 * 64];
-        Short coeff[64 * 64];
+#ifdef _WIN32
+#ifdef __MINGW32__
+        Short block[64 * 64] __attribute__((aligned(32)));
+        Short coeff[64 * 64] __attribute__((aligned(32)));
+#else
+        __declspec(align(32)) Short block[64 * 64];
+        __declspec(align(32)) Short coeff[64 * 64];
+#endif
+#else
+        Short block[64 * 64] __attribute__((aligned(32)));
+        Short coeff[64 * 64] __attribute__((aligned(32)));
+#endif
         {
             for (j = 0; j < iHeight; j++)
             {
-                memcpy(block + j * iWidth, piBlkResi + j * uiStride, iWidth * sizeof(Short));
+                for(int i = 0; i < iWidth; i++)
+                    block [j*iWidth + i] = (Short) piBlkResi [j*uiStride + i];                
+
             }
         }
         xTrMxN(bitDepth, block, coeff, iWidth, iHeight, uiMode);
@@ -1552,7 +1564,9 @@ Void TComTrQuant::xIT(Int bitDepth, UInt
         {
             for (j = 0; j < iHeight; j++)
             {
-                memcpy(pResidual + j * uiStride, block + j * iWidth, iWidth * sizeof(Short));
+                for(int i = 0; i < iWidth; i++)
+                    pResidual[j*uiStride + i] = (Pel) block[j*iWidth + i];      
+
             }
         }
         return;