Merge pull request #1075 from HaiboZhu/Debug_InvHadamard_Chroma

Debug for chroma inv-hadamard dequant mismatch error
This commit is contained in:
huili2 2014-07-04 13:49:36 +08:00
commit ef0c3e2b91
3 changed files with 9 additions and 9 deletions

View File

@ -130,10 +130,10 @@ void WelsDequantIHadamard2x2Dc (int16_t* pDct, const uint16_t kuiMF) {
const int16_t kiSumD = pDct[1] + pDct[3];
const int16_t kiDelD = pDct[1] - pDct[3];
pDct[0] = (kiSumU + kiSumD) * kuiMF;
pDct[1] = (kiSumU - kiSumD) * kuiMF;
pDct[2] = (kiDelU + kiDelD) * kuiMF;
pDct[3] = (kiDelU - kiDelD) * kuiMF;
pDct[0] = ((kiSumU + kiSumD) * kuiMF) >> 1;
pDct[1] = ((kiSumU - kiSumD) * kuiMF) >> 1;
pDct[2] = ((kiDelU + kiDelD) * kuiMF) >> 1;
pDct[3] = ((kiDelU - kiDelD) * kuiMF) >> 1;
}
void WelsDequant4x4_c (int16_t* pRes, const uint16_t* kpMF) {

View File

@ -304,7 +304,7 @@ void WelsEncRecUV (SWelsFuncPtrList* pFuncList, SMB* pCurMb, SMbCache* pMbCac
}
if (uiNoneZeroCountMbDc > 0) {
WelsDequantIHadamard2x2Dc (aDct2x2, g_kuiDequantCoeff[kiQp][0] >> 1);
WelsDequantIHadamard2x2Dc (aDct2x2, g_kuiDequantCoeff[kiQp][0]);
if (2 != (pCurMb->uiCbp >> 4))
pCurMb->uiCbp |= (0x01 << 4) ;
pRes[0] = aDct2x2[0];

View File

@ -156,10 +156,10 @@ void WelsDequantHadamard2x2DcAnchor (int16_t* pDct, int16_t iMF) {
const int16_t iDelU = pDct[0] - pDct[2];
const int16_t iSumD = pDct[1] + pDct[3];
const int16_t iDelD = pDct[1] - pDct[3];
pDct[0] = (iSumU + iSumD) * iMF;
pDct[1] = (iSumU - iSumD) * iMF;
pDct[2] = (iDelU + iDelD) * iMF;
pDct[3] = (iDelU - iDelD) * iMF;
pDct[0] = ((iSumU + iSumD) * iMF)>>1;
pDct[1] = ((iSumU - iSumD) * iMF)>>1;
pDct[2] = ((iDelU + iDelD) * iMF)>>1;
pDct[3] = ((iDelU - iDelD) * iMF)>>1;
}
TEST (DecodeMbAuxTest, WelsDequantIHadamard2x2Dc) {
int16_t iDct[4], iRefDct[4];