From 82b875c388d2f33036d2e32ed9a10643f21d9b8d Mon Sep 17 00:00:00 2001 From: zhiliang wang Date: Tue, 6 May 2014 11:16:46 +0800 Subject: [PATCH] Add func init on UT source code --- codec/encoder/core/src/sample.cpp | 3 +-- test/encoder/EncUT_Sample.cpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/codec/encoder/core/src/sample.cpp b/codec/encoder/core/src/sample.cpp index 4be7a4d7..bcc3465c 100644 --- a/codec/encoder/core/src/sample.cpp +++ b/codec/encoder/core/src/sample.cpp @@ -43,7 +43,6 @@ #include "mc.h" #include "cpu_core.h" -#include "get_intra_predictor.h" namespace WelsSVCEnc { int32_t WelsSampleSatd4x4_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSample2, int32_t iStride2) { @@ -151,7 +150,7 @@ int32_t WelsSampleSatdIntra4x4Combined3_c (uint8_t* pDec, int32_t iDecStride, ui iBestMode = 2; iBestCost = iCurCost; } - WelsInitFillingPredFuncs(WELS_CPU_SSE2); + WelsI4x4LumaPredH_c (uiLocalBuffer[1], pDec, iDecStride); iCurCost = WelsSampleSatd4x4_c (uiLocalBuffer[1], 4, pEnc, iEncStride) + iLambda1; if (iCurCost < iBestCost) { diff --git a/test/encoder/EncUT_Sample.cpp b/test/encoder/EncUT_Sample.cpp index 51cbc9cc..92d0ee32 100644 --- a/test/encoder/EncUT_Sample.cpp +++ b/test/encoder/EncUT_Sample.cpp @@ -7,6 +7,7 @@ #include "cpu.h" #include "sample.h" #include "sad_common.h" +#include "get_intra_predictor.h" using namespace WelsSVCEnc; #ifdef X86_ASM @@ -86,6 +87,7 @@ TEST(IntraSadSatdFuncTest, WelsSampleSatdThree4x4_sse2){ uint8_t* pDec = (uint8_t *)cMemoryAlign.WelsMalloc(iLineSizeDec<<5,"pDec"); uint8_t* pEnc = (uint8_t *)cMemoryAlign.WelsMalloc(iLineSizeEnc<<5,"pEnc"); uint8_t* pDst = (uint8_t *)cMemoryAlign.WelsMalloc(512,"pDst"); + WelsInitFillingPredFuncs(WELS_CPU_SSE2); srand((uint32_t)time(NULL)); for(int i=0;i<(iLineSizeDec<<5);i++) pDec[i]=rand()%256;