shithub: openh264

Download patch

ref: a474e00d155f796c7aa9a1e2e2bcbb01f4358e90
parent: 894f073e4b64d66c9825c245b6f2c5da10494056
author: Martin Storsjö <martin@martin.st>
date: Fri Jun 27 17:00:03 EDT 2014

Fix a typo, Chorma -> Chroma

--- a/codec/encoder/core/inc/get_intra_predictor.h
+++ b/codec/encoder/core/inc/get_intra_predictor.h
@@ -63,16 +63,16 @@
 void WelsI4x4LumaPredHU_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
 
 
-void WelsIChormaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
-void WelsIChormaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
-void WelsIChormaPredPlane_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
-void WelsIChormaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
-void WelsIChormaPredDcLeft_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
-void WelsIChormaPredDcTop_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
-void WelsIChormaPredDcNA_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsIChromaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsIChromaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsIChromaPredPlane_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsIChromaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsIChromaPredDcLeft_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsIChromaPredDcTop_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsIChromaPredDcNA_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
 
-void WelsI16x16ChormaPredVer (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
-void WelsI16x16ChormaPredHor (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsI16x16ChromaPredVer (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
+void WelsI16x16ChromaPredHor (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
 
 void WelsI16x16LumaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
 void WelsI16x16LumaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
--- a/codec/encoder/core/src/get_intra_predictor.cpp
+++ b/codec/encoder/core/src/get_intra_predictor.cpp
@@ -418,7 +418,7 @@
 
 #define I8x8_PRED_STRIDE 8
 
-void WelsIChormaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
+void WelsIChromaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
   const uint64_t kuiSrc64 = LD64 (&pRef[-kiStride]);
 
   ST64 (pPred   , kuiSrc64);
@@ -431,7 +431,7 @@
   ST64 (pPred + 56, kuiSrc64);
 }
 
-void WelsIChormaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
+void WelsIChromaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
   int32_t iStridex7 = (kiStride << 3) - kiStride;
   int32_t iI8x8Stridex7 = (I8x8_PRED_STRIDE << 3) - I8x8_PRED_STRIDE;
   uint8_t i = 7;
@@ -447,7 +447,7 @@
 }
 
 
-void WelsIChormaPredPlane_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
+void WelsIChromaPredPlane_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
   int32_t iLTshift = 0, iTopshift = 0, iLeftshift = 0, iTopSum = 0, iLeftSum = 0;
   int32_t i, j;
   uint8_t* pTop = &pRef[-kiStride];
@@ -471,7 +471,7 @@
 }
 
 
-void WelsIChormaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
+void WelsIChromaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
   const int32_t kuiL1 = kiStride - 1;
   const int32_t kuiL2 = kuiL1 + kiStride;
   const int32_t kuiL3 = kuiL2 + kiStride;
@@ -503,7 +503,7 @@
   ST64 (pPred + 56, kuiBottomMean64);
 }
 
-void WelsIChormaPredDcLeft_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
+void WelsIChromaPredDcLeft_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
   const int32_t kuiL1	= kiStride - 1;
   const int32_t kuiL2	= kuiL1 + kiStride;
   const int32_t kuiL3	= kuiL2 + kiStride;
@@ -526,7 +526,7 @@
   ST64 (pPred + 56, kuiBottomMean64);
 }
 
-void WelsIChormaPredDcTop_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
+void WelsIChromaPredDcTop_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
   /*caculate the iMean value*/
   const uint8_t kuiMean1 = (pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] + 2) >> 2;
   const uint8_t kuiMean2 = (pRef[4 - kiStride] + pRef[5 - kiStride] + pRef[6 - kiStride] + pRef[7 - kiStride] + 2) >> 2;
@@ -543,7 +543,7 @@
   ST64 (pPred + 56, kuiMean64);
 }
 
-void WelsIChormaPredDcNA_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
+void WelsIChromaPredDcNA_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
   const uint64_t kuiDcValue64 = (uint64_t)0x8080808080808080ULL;
   ST64 (pPred   , kuiDcValue64);
   ST64 (pPred + 8 , kuiDcValue64);
@@ -685,13 +685,13 @@
   pFuncList->pfGetLumaI4x4Pred[I4_PRED_HU] = WelsI4x4LumaPredHU_c;
   pFuncList->pfGetLumaI4x4Pred[I4_PRED_HD] = WelsI4x4LumaPredHD_c;
 
-  pFuncList->pfGetChromaPred[C_PRED_DC] = WelsIChormaPredDc_c;
-  pFuncList->pfGetChromaPred[C_PRED_H] = WelsIChormaPredH_c;
-  pFuncList->pfGetChromaPred[C_PRED_V] = WelsIChormaPredV_c;
-  pFuncList->pfGetChromaPred[C_PRED_P] = WelsIChormaPredPlane_c;
-  pFuncList->pfGetChromaPred[C_PRED_DC_L] = WelsIChormaPredDcLeft_c;
-  pFuncList->pfGetChromaPred[C_PRED_DC_T] = WelsIChormaPredDcTop_c;
-  pFuncList->pfGetChromaPred[C_PRED_DC_128] = WelsIChormaPredDcNA_c;
+  pFuncList->pfGetChromaPred[C_PRED_DC] = WelsIChromaPredDc_c;
+  pFuncList->pfGetChromaPred[C_PRED_H] = WelsIChromaPredH_c;
+  pFuncList->pfGetChromaPred[C_PRED_V] = WelsIChromaPredV_c;
+  pFuncList->pfGetChromaPred[C_PRED_P] = WelsIChromaPredPlane_c;
+  pFuncList->pfGetChromaPred[C_PRED_DC_L] = WelsIChromaPredDcLeft_c;
+  pFuncList->pfGetChromaPred[C_PRED_DC_T] = WelsIChromaPredDcTop_c;
+  pFuncList->pfGetChromaPred[C_PRED_DC_128] = WelsIChromaPredDcNA_c;
 #ifdef HAVE_NEON
   if (kuiCpuFlag & WELS_CPU_NEON) {
     pFuncList->pfGetLumaI4x4Pred[I4_PRED_DDR] = WelsI4x4LumaPredDDR_neon;
--- a/codec/encoder/core/src/sample.cpp
+++ b/codec/encoder/core/src/sample.cpp
@@ -169,9 +169,9 @@
 
   return iBestCost;
 }
-extern void WelsIChormaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t iStride);
-extern void WelsIChormaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t iStride);
-extern void WelsIChormaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t iStride);
+extern void WelsIChromaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t iStride);
+extern void WelsIChromaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t iStride);
+extern void WelsIChromaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t iStride);
 
 int32_t WelsSampleSatdIntra8x8Combined3_c (uint8_t* pDecCb, int32_t iDecStride, uint8_t* pEncCb, int32_t iEncStride,
     int32_t* pBestMode, int32_t iLambda, uint8_t* pDstChroma, uint8_t* pDecCr, uint8_t* pEncCr) {
@@ -178,8 +178,8 @@
   int32_t iBestMode = -1;
   int32_t iCurCost, iBestCost = INT_MAX;
 
-  WelsIChormaPredV_c (pDstChroma, pDecCb, iDecStride);
-  WelsIChormaPredV_c (pDstChroma + 64, pDecCr, iDecStride);
+  WelsIChromaPredV_c (pDstChroma, pDecCb, iDecStride);
+  WelsIChromaPredV_c (pDstChroma + 64, pDecCr, iDecStride);
   iCurCost = WelsSampleSatd8x8_c (pDstChroma, 8, pEncCb, iEncStride);
   iCurCost += WelsSampleSatd8x8_c (pDstChroma + 64, 8, pEncCr, iEncStride) + iLambda * 2;
 
@@ -188,8 +188,8 @@
     iBestCost = iCurCost;
   }
 
-  WelsIChormaPredH_c (pDstChroma, pDecCb, iDecStride);
-  WelsIChormaPredH_c (pDstChroma + 64, pDecCr, iDecStride);
+  WelsIChromaPredH_c (pDstChroma, pDecCb, iDecStride);
+  WelsIChromaPredH_c (pDstChroma + 64, pDecCr, iDecStride);
   iCurCost = WelsSampleSatd8x8_c (pDstChroma, 8, pEncCb, iEncStride);
   iCurCost += WelsSampleSatd8x8_c (pDstChroma + 64, 8, pEncCr, iEncStride) + iLambda * 2;
   if (iCurCost < iBestCost) {
@@ -196,8 +196,8 @@
     iBestMode = 1;
     iBestCost = iCurCost;
   }
-  WelsIChormaPredDc_c (pDstChroma, pDecCb, iDecStride);
-  WelsIChormaPredDc_c (pDstChroma + 64, pDecCr, iDecStride);
+  WelsIChromaPredDc_c (pDstChroma, pDecCb, iDecStride);
+  WelsIChromaPredDc_c (pDstChroma + 64, pDecCr, iDecStride);
   iCurCost = WelsSampleSatd8x8_c (pDstChroma, 8, pEncCb, iEncStride);
   iCurCost += WelsSampleSatd8x8_c (pDstChroma + 64, 8, pEncCr, iEncStride);
   if (iCurCost < iBestCost) {
@@ -216,8 +216,8 @@
   int32_t iBestMode = -1;
   int32_t iCurCost, iBestCost = INT_MAX;
 
-  WelsIChormaPredV_c (pDstChroma, pDecCb, iDecStride);
-  WelsIChormaPredV_c (pDstChroma + 64, pDecCr, iDecStride);
+  WelsIChromaPredV_c (pDstChroma, pDecCb, iDecStride);
+  WelsIChromaPredV_c (pDstChroma + 64, pDecCr, iDecStride);
   iCurCost = WelsSampleSad8x8_c (pDstChroma, 8, pEncCb, iEncStride);
   iCurCost += WelsSampleSad8x8_c (pDstChroma + 64, 8, pEncCr, iEncStride) + iLambda * 2;
 
@@ -226,8 +226,8 @@
     iBestCost = iCurCost;
   }
 
-  WelsIChormaPredH_c (pDstChroma, pDecCb, iDecStride);
-  WelsIChormaPredH_c (pDstChroma + 64, pDecCr, iDecStride);
+  WelsIChromaPredH_c (pDstChroma, pDecCb, iDecStride);
+  WelsIChromaPredH_c (pDstChroma + 64, pDecCr, iDecStride);
   iCurCost = WelsSampleSad8x8_c (pDstChroma, 8, pEncCb, iEncStride);
   iCurCost += WelsSampleSad8x8_c (pDstChroma + 64, 8, pEncCr, iEncStride) + iLambda * 2;
   if (iCurCost < iBestCost) {
@@ -234,8 +234,8 @@
     iBestMode = 1;
     iBestCost = iCurCost;
   }
-  WelsIChormaPredDc_c (pDstChroma, pDecCb, iDecStride);
-  WelsIChormaPredDc_c (pDstChroma + 64, pDecCr, iDecStride);
+  WelsIChromaPredDc_c (pDstChroma, pDecCb, iDecStride);
+  WelsIChromaPredDc_c (pDstChroma + 64, pDecCr, iDecStride);
   iCurCost = WelsSampleSad8x8_c (pDstChroma, 8, pEncCb, iEncStride);
   iCurCost += WelsSampleSad8x8_c (pDstChroma + 64, 8, pEncCr, iEncStride);
   if (iCurCost < iBestCost) {
--- a/test/encoder/EncUT_GetIntraPredictor.cpp
+++ b/test/encoder/EncUT_GetIntraPredictor.cpp
@@ -457,7 +457,7 @@
   delete []pPred;
 }
 
-TEST (GetIntraPredictorTest, TestGetIChormaPredV) {
+TEST (GetIntraPredictorTest, TestGetIChromaPredV) {
   uint8_t* pPred = new uint8_t[64];
   uint8_t* pRef  = new uint8_t[64];
   for (int i = 0; i < 64; i++)
@@ -464,7 +464,7 @@
     pRef[i] = rand() % 256 + 1;
 
   const int32_t kiStride = 0;
-  WelsIChormaPredV_c (pPred, pRef, kiStride);
+  WelsIChromaPredV_c (pPred, pRef, kiStride);
 
   for (int i = 0; i < 8; i++)
     EXPECT_EQ (LD32 (&pPred[8 * i]), LD32 (&pRef[-kiStride]));