ref: 589e40aa6759c521b9264197353ced380b5840cb
parent: 76b488a60d1c86bd1dbe3196f0d5caa3be754268
parent: fb6379eeb174a396ad08846fdb0c8c307afa24ef
author: ruil2 <ruil2@cisco.com>
date: Mon Jul 7 13:39:37 EDT 2014
Merge pull request #1094 from huili2/ec_grey_replace_green use grey instead of green in EC without ref
--- a/codec/decoder/core/src/error_concealment.cpp
+++ b/codec/decoder/core/src/error_concealment.cpp
@@ -73,9 +73,9 @@
int32_t iStrideY = pDstPic->iLinesize[0];
int32_t iStrideUV = pDstPic->iLinesize[1];
if (pSrcPic == NULL) { //no ref pic, assign specific data to picture
- memset (pDstPic->pData[0], 0, uiHeightInPixelY * iStrideY);
- memset (pDstPic->pData[1], 0, (uiHeightInPixelY >> 1) * iStrideUV);
- memset (pDstPic->pData[2], 0, (uiHeightInPixelY >> 1) * iStrideUV);
+ memset (pDstPic->pData[0], 128, uiHeightInPixelY * iStrideY);
+ memset (pDstPic->pData[1], 128, (uiHeightInPixelY >> 1) * iStrideUV);
+ memset (pDstPic->pData[2], 128, (uiHeightInPixelY >> 1) * iStrideUV);
} else { //has ref pic here
memcpy (pDstPic->pData[0], pSrcPic->pData[0], uiHeightInPixelY * iStrideY);
memcpy (pDstPic->pData[1], pSrcPic->pData[1], (uiHeightInPixelY >> 1) * iStrideUV);
@@ -121,19 +121,19 @@
//Y component
pDstData = pDstPic->pData[0] + iMbY * 16 * iDstStride + iMbX * 16;
for (int32_t i = 0; i < 16; ++i) {
- memset (pDstData, 0, 16);
+ memset (pDstData, 128, 16);
pDstData += iDstStride;
}
//U component
pDstData = pDstPic->pData[1] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
for (int32_t i = 0; i < 8; ++i) {
- memset (pDstData, 0, 8);
+ memset (pDstData, 128, 8);
pDstData += iDstStride / 2;
}
//V component
pDstData = pDstPic->pData[2] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
for (int32_t i = 0; i < 8; ++i) {
- memset (pDstData, 0, 8);
+ memset (pDstData, 128, 8);
pDstData += iDstStride / 2;
}
} //
--- a/test/decoder/DecUT_ErrorConcealment.cpp
+++ b/test/decoder/DecUT_ErrorConcealment.cpp
@@ -163,19 +163,19 @@
//Y component
pDstData = pDstPic->pData[0] + iMbY * 16 * iDstStride + iMbX * 16;
for (i = 0; i < 16; ++i) {
- memset (pDstData, 0, 16);
+ memset (pDstData, 128, 16);
pDstData += iDstStride;
}
//U component
pDstData = pDstPic->pData[1] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
for (i = 0; i < 8; ++i) {
- memset (pDstData, 0, 8);
+ memset (pDstData, 128, 8);
pDstData += iDstStride / 2;
}
//V component
pDstData = pDstPic->pData[2] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
for (i = 0; i < 8; ++i) {
- memset (pDstData, 0, 8);
+ memset (pDstData, 128, 8);
pDstData += iDstStride / 2;
}
} //
@@ -238,7 +238,7 @@
DoErrorConFrameCopy (pECCtx->pCtx);
int32_t iLumaSize = pECCtx->iMbWidth * pECCtx->iMbHeight * 256;
- memset (pECCtx->sAncPic.pData[0], 0, iLumaSize * 3 / 2); //should be the same as known EC method, here all 0
+ memset (pECCtx->sAncPic.pData[0], 128, iLumaSize * 3 / 2); //should be the same as known EC method, here all 128
bOK = ComparePictureDataI420 (pECCtx->sAncPic.pData[0], pECCtx->sWelsPic.pData[0], pECCtx->iLinesize[0],
pECCtx->iMbHeight * 16);
EXPECT_EQ (bOK, true);