[x265] [PATCH] asm: fix inconsistent crash due to unaligned NR buffer in denoiseDct SSE4 asm
dnyaneshwar at multicorewareinc.com
dnyaneshwar at multicorewareinc.com
Wed Nov 18 09:08:25 CET 2015
# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1447829883 -19800
# Wed Nov 18 12:28:03 2015 +0530
# Node ID 653430a3de3f9ba342922ee6ea46d4cf52c1eb39
# Parent e8f9a60d4cd9e73c9f2baf05c2ccda5af1892b46
asm: fix inconsistent crash due to unaligned NR buffer in denoiseDct SSE4 asm
Also, fixes warning C4316: object allocated on the heap may not be aligned 16
diff -r e8f9a60d4cd9 -r 653430a3de3f source/common/x86/dct8.asm
--- a/source/common/x86/dct8.asm Mon Nov 16 16:44:33 2015 +0530
+++ b/source/common/x86/dct8.asm Wed Nov 18 12:28:03 2015 +0530
@@ -2115,15 +2115,15 @@
mova m0, [r0]
pabsw m1, m0
- mova m2, [r1]
+ movu m2, [r1]
pmovsxwd m3, m1
paddd m2, m3
- mova [r1], m2
- mova m2, [r1 + 16]
+ movu [r1], m2
+ movu m2, [r1 + 16]
psrldq m3, m1, 8
pmovsxwd m4, m3
paddd m2, m4
- mova [r1 + 16], m2
+ movu [r1 + 16], m2
movu m3, [r2]
psubusw m1, m3
diff -r e8f9a60d4cd9 -r 653430a3de3f source/encoder/encoder.h
--- a/source/encoder/encoder.h Mon Nov 16 16:44:33 2015 +0530
+++ b/source/encoder/encoder.h Wed Nov 18 12:28:03 2015 +0530
@@ -79,7 +79,7 @@
{
public:
- ALIGN_VAR_16(uint32_t, m_residualSumEmergency[MAX_NUM_TR_CATEGORIES][MAX_NUM_TR_COEFFS]);
+ uint32_t m_residualSumEmergency[MAX_NUM_TR_CATEGORIES][MAX_NUM_TR_COEFFS];
uint32_t m_countEmergency[MAX_NUM_TR_CATEGORIES];
uint16_t (*m_offsetEmergency)[MAX_NUM_TR_CATEGORIES][MAX_NUM_TR_COEFFS];
More information about the x265-devel
mailing list