Ticket #1278: fix_1278.patch
File fix_1278.patch, 1.6 KB (added by barrouxg, 10 years ago) |
---|
-
source/Lib/TLibEncoder/TEncGOP.cpp
2397 2439 const Pel* pOrg = (conversion!=IPCOLOURSPACE_UNCHANGED) ? pcPic ->getPicYuvTrueOrg()->getAddr(ch) : pcPic ->getPicYuvOrg()->getAddr(ch); 2398 2440 Pel* pRec = picd.getAddr(ch); 2399 2441 const Int iStride = pcPicD->getStride(ch); 2400 2442 2401 2443 const Int iWidth = pcPicD->getWidth (ch) - (m_pcEncTop->getPad(0) >> pcPic->getComponentScaleX(ch)); 2402 const Int iHeight = pcPicD->getHeight(ch) - ( m_pcEncTop->getPad(1) >> pcPic->getComponentScaleY(ch));2444 const Int iHeight = pcPicD->getHeight(ch) - ((m_pcEncTop->getPad(1) >> (pcPic->isField()?1:0)) >> pcPic->getComponentScaleY(ch)); 2403 2445 2404 2446 Int iSize = iWidth*iHeight; 2405 2447 2406 2448 UInt64 uiSSDtemp=0; 2407 2449 for(Int y = 0; y < iHeight; y++ ) … … 2534 2576 assert(apcPicRecFields[0]->getWidth(ch)==apcPicRecFields[1]->getWidth(ch)); 2535 2577 assert(apcPicRecFields[0]->getHeight(ch)==apcPicRecFields[1]->getHeight(ch)); 2536 2578 2537 2579 UInt64 uiSSDtemp=0; 2538 2580 const Int iWidth = apcPicRecFields[0]->getWidth (ch) - (m_pcEncTop->getPad(0) >> apcPicRecFields[0]->getComponentScaleX(ch)); 2539 const Int iHeight = apcPicRecFields[0]->getHeight(ch) - ( m_pcEncTop->getPad(1) >> apcPicRecFields[0]->getComponentScaleY(ch));2581 const Int iHeight = apcPicRecFields[0]->getHeight(ch) - ((m_pcEncTop->getPad(1) >> 1) >> apcPicRecFields[0]->getComponentScaleY(ch)); 2540 2582 2541 2583 Int iSize = iWidth*iHeight; 2542 2584 2543 2585 for(UInt fieldNum=0; fieldNum<2; fieldNum++) 2544 2586 {