Fix a typo, Chorma -> Chroma
This commit is contained in:
parent
894f073e4b
commit
a474e00d15
@ -63,16 +63,16 @@ void WelsI4x4LumaPredVLTop_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStr
|
||||
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);
|
||||
|
@ -418,7 +418,7 @@ void WelsI4x4LumaPredHD_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride
|
||||
|
||||
#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 @@ void WelsIChormaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride)
|
||||
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 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 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 WelsIChormaPredPlane_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStri
|
||||
}
|
||||
|
||||
|
||||
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 @@ void WelsIChormaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride)
|
||||
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 @@ void WelsIChormaPredDcLeft_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStr
|
||||
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 @@ void WelsIChormaPredDcTop_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStri
|
||||
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 @@ void WelsInitIntraPredFuncs (SWelsFuncPtrList* pFuncList, const uint32_t kuiCpuF
|
||||
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;
|
||||
|
@ -169,17 +169,17 @@ int32_t WelsSampleSatdIntra4x4Combined3_c (uint8_t* pDec, int32_t iDecStride, ui
|
||||
|
||||
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) {
|
||||
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,16 +188,16 @@ int32_t WelsSampleSatdIntra8x8Combined3_c (uint8_t* pDecCb, int32_t iDecStride,
|
||||
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) {
|
||||
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 WelsSampleSadIntra8x8Combined3_c (uint8_t* pDecCb, int32_t iDecStride, u
|
||||
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,16 +226,16 @@ int32_t WelsSampleSadIntra8x8Combined3_c (uint8_t* pDecCb, int32_t iDecStride, u
|
||||
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) {
|
||||
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) {
|
||||
|
@ -457,14 +457,14 @@ TEST (GetIntraPredictorTest, TestGetI4x4LumaPredHD) {
|
||||
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++)
|
||||
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]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user