shithub: openh264

Download patch

ref: 82b875c388d2f33036d2e32ed9a10643f21d9b8d
parent: 2d265877a9d59ee147c09ef24beb6c9516d9fc79
author: zhiliang wang <[email protected]>
date: Tue May 6 07:16:46 EDT 2014

Add func init on UT source code

--- 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 @@
     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) {
--- 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 @@
   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;