From 0298b3f5807a132e837fc86f65a8f6839d647b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 3 Jun 2015 09:45:06 +0300 Subject: [PATCH] Initialize enough samples in the new 4x8 tests This fixes valgrind warnings about tests using uninitialized data. --- test/encoder/EncUT_Sample.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/encoder/EncUT_Sample.cpp b/test/encoder/EncUT_Sample.cpp index 1490b731..a55498a8 100644 --- a/test/encoder/EncUT_Sample.cpp +++ b/test/encoder/EncUT_Sample.cpp @@ -207,9 +207,9 @@ TEST_F (SadSatdCFuncTest, WelsSampleSad8x4_c) { } TEST_F (SadSatdCFuncTest, WelsSampleSad4x8_c) { - for (int i = 0; i < (m_iStrideA << 2); i++) + for (int i = 0; i < (m_iStrideA << 3); i++) m_pPixSrcA[i] = rand() % 256; - for (int i = 0; i < (m_iStrideB << 2); i++) + for (int i = 0; i < (m_iStrideB << 3); i++) m_pPixSrcB[i] = rand() % 256; uint8_t* pPixA = m_pPixSrcA; uint8_t* pPixB = m_pPixSrcB; @@ -504,9 +504,9 @@ TEST_F (SadSatdCFuncTest, WelsSampleSadFour8x4_c) { } TEST_F (SadSatdCFuncTest, WelsSampleSadFour4x8_c) { - for (int i = 0; i < (m_iStrideA << 3); i++) + for (int i = 0; i < (m_iStrideA << 4); i++) m_pPixSrcA[i] = rand() % 256; - for (int i = 0; i < (m_iStrideB << 3); i++) + for (int i = 0; i < (m_iStrideB << 4); i++) m_pPixSrcB[i] = rand() % 256; uint8_t* pPixA = m_pPixSrcA; uint8_t* pPixB = m_pPixSrcB + m_iStrideB;