Changeset 98 in 3DVCSoftware for branches/HTM-3.1-LG/source
- Timestamp:
- 7 Aug 2012, 02:52:21 (12 years ago)
- Location:
- branches/HTM-3.1-LG/source/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-3.1-LG/source/Lib/TLibCommon/TComPrediction.cpp
r97 r98 539 539 // Do prediction 540 540 { 541 UInt uiSum0 = 0, uiSum1 = 0; 542 UInt uiMean0, uiMean1; 543 UInt uiCount0 = 0, uiCount1 = 0; 541 //UInt uiSum0 = 0, uiSum1 = 0; 542 Int iSum0 = 0, iSum1 = 0; 543 //UInt uiMean0, uiMean1; 544 Int iMean0, iMean1; 545 //UInt uiCount0 = 0, uiCount1 = 0; 546 Int iCount0 = 0, iCount1 = 0; 544 547 for( UInt ui = 0; ui < iWidth; ui++ ) 545 548 { 546 549 if( pbRegion[ ui ] == false ) 547 550 { 548 uiSum0 += (pSrc[ ui + 1 ]);549 uiCount0++;551 iSum0 += (pSrc[ ui + 1 ]); 552 iCount0++; 550 553 } 551 554 else 552 555 { 553 uiSum1 += (pSrc[ ui + 1 ]);554 uiCount1++;556 iSum1 += (pSrc[ ui + 1 ]); 557 iCount1++; 555 558 } 556 559 } … … 559 562 if( pbRegion[ ui * iWidth ] == false ) 560 563 { 561 uiSum0 += (pSrc[ (ui + 1) * srcStride ]);562 uiCount0++;564 iSum0 += (pSrc[ (ui + 1) * srcStride ]); 565 iCount0++; 563 566 } 564 567 else 565 568 { 566 uiSum1 += (pSrc[ (ui + 1) * srcStride ]);567 uiCount1++;569 iSum1 += (pSrc[ (ui + 1) * srcStride ]); 570 iCount1++; 568 571 } 569 572 } 570 if( uiCount0 == 0 )573 if( iCount0 == 0 ) 571 574 assert(false); 572 if( uiCount1 == 0 )575 if( iCount1 == 0 ) 573 576 assert(false); 574 uiMean0 = uiSum0 / uiCount0; // TODO : integer op.575 uiMean1 = uiSum1 / uiCount1;577 iMean0 = iSum0 / iCount0; // TODO : integer op. 578 iMean1 = iSum1 / iCount1; 576 579 #if LGE_EDGE_INTRA_DELTA_DC 577 580 if( bDelta ) … … 581 584 xDeltaDCQuantScaleUp( pcCU, iDeltaDC0 ); 582 585 xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 ); 583 uiMean0 = Clip( uiMean0 + iDeltaDC0 );584 uiMean1 = Clip( uiMean1 + iDeltaDC1 );586 iMean0 = Clip( iMean0 + iDeltaDC0 ); 587 iMean1 = Clip( iMean1 + iDeltaDC1 ); 585 588 } 586 589 #endif … … 590 593 { 591 594 if( pbRegion[ uii + ui * iWidth ] == false ) 592 pDst[ uii + ui * dstStride ] = uiMean0;595 pDst[ uii + ui * dstStride ] = iMean0; 593 596 else 594 pDst[ uii + ui * dstStride ] = uiMean1;597 pDst[ uii + ui * dstStride ] = iMean1; 595 598 } 596 599 } -
branches/HTM-3.1-LG/source/Lib/TLibEncoder/TEncSearch.cpp
r97 r98 6476 6476 { 6477 6477 UShort usAbs0=0, usAbs1=0, usAbs2=0; // 0 : left, 1 : current, 2 : right 6478 Bool bSign0=false, bSign1=false, bSign2=false;6478 //Bool bSign0=false, bSign1=false, bSign2=false; 6479 6479 if( x > 0 && *(pbEdgeXPtr-1) == true ) 6480 6480 { … … 6482 6482 { 6483 6483 usAbs0 = *(psDiffXPtr-1); 6484 bSign0 = true;6484 //bSign0 = true; 6485 6485 } 6486 6486 else 6487 6487 { 6488 6488 usAbs0 = (-1) * *(psDiffXPtr-1); 6489 bSign0 = false;6489 //bSign0 = false; 6490 6490 } 6491 6491 } … … 6495 6495 { 6496 6496 usAbs1 = *(psDiffXPtr); 6497 bSign1 = true;6497 //bSign1 = true; 6498 6498 } 6499 6499 else 6500 6500 { 6501 6501 usAbs1 = (-1) * *(psDiffXPtr); 6502 bSign1 = false;6502 //bSign1 = false; 6503 6503 } 6504 6504 } … … 6508 6508 { 6509 6509 usAbs2 = *(psDiffXPtr+1); 6510 bSign2 = true;6510 //bSign2 = true; 6511 6511 } 6512 6512 else 6513 6513 { 6514 6514 usAbs2 = (-1) * *(psDiffXPtr+1); 6515 bSign2 = false;6515 //bSign2 = false; 6516 6516 } 6517 6517 } … … 6555 6555 { 6556 6556 UShort usAbs0=0, usAbs1=0, usAbs2=0; // 0 : upper, 1 : current, 2 : bottom 6557 Bool bSign0=false, bSign1=false, bSign2=false;6557 //Bool bSign0=false, bSign1=false, bSign2=false; 6558 6558 if( y > 0 && *(pbEdgeYPtr-iWidth) == true ) 6559 6559 { … … 6561 6561 { 6562 6562 usAbs0 = *(psDiffYPtr-iWidth); 6563 bSign0 = true;6563 //bSign0 = true; 6564 6564 } 6565 6565 else 6566 6566 { 6567 6567 usAbs0 = (-1) * *(psDiffYPtr-iWidth); 6568 bSign0 = false;6568 //bSign0 = false; 6569 6569 } 6570 6570 } … … 6574 6574 { 6575 6575 usAbs1 = *(psDiffYPtr); 6576 bSign1 = true;6576 //bSign1 = true; 6577 6577 } 6578 6578 else 6579 6579 { 6580 6580 usAbs1 = (-1) * *(psDiffYPtr); 6581 bSign1 = false;6581 //bSign1 = false; 6582 6582 } 6583 6583 } … … 6587 6587 { 6588 6588 usAbs2 = *(psDiffYPtr+iWidth); 6589 bSign2 = true;6589 //bSign2 = true; 6590 6590 } 6591 6591 else 6592 6592 { 6593 6593 usAbs2 = (-1) * *(psDiffYPtr+iWidth); 6594 bSign2 = false;6594 //bSign2 = false; 6595 6595 } 6596 6596 }
Note: See TracChangeset for help on using the changeset viewer.