Changeset 1143 in 3DVCSoftware
- Timestamp:
- 25 Feb 2015, 05:14:58 (10 years ago)
- Location:
- branches/HTM-13.1-dev2-Sharp
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev2-Sharp/source/Lib/TLibCommon/TComRom.cpp
r1133 r1143 739 739 assert( uiWidth == uiHeight ); 740 740 741 #if SHARP_DMM_CLEAN_K0042 742 Int posStart = 0, posEnd = 0; 743 #else 741 744 UChar uhStartX = 0, uhStartY = 0, uhEndX = 0, uhEndY = 0; 742 745 Int iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0; 746 #endif 743 747 744 748 UInt uiBlockSize = 0; … … 752 756 for( UInt uiOri = 0; uiOri < 6; uiOri++ ) 753 757 { 758 #if !SHARP_DMM_CLEAN_K0042 754 759 // init the edge line parameters for each of the 6 wedgelet types 755 760 switch( uiOri ) … … 762 767 case( 5 ): { uhStartX = (uiBlockSize-1); uhStartY = 0; uhEndX = 0; uhEndY = 0; iStepStartX = 0; iStepStartY = +1; iStepEndX = 0; iStepEndY = +1; break; } 763 768 } 764 769 #endif 770 771 #if SHARP_DMM_CLEAN_K0042 772 posEnd = racWedgeList.size(); 773 if (uiOri == 0 || uiOri == 4) 774 { 775 #endif 765 776 for( Int iK = 0; iK < uiBlockSize; iK += (uiWidth>=16 ?2:1)) 766 777 { 767 778 for( Int iL = 0; iL < uiBlockSize; iL += ((uiWidth>=16 && uiOri<4)?2:1) ) 768 779 { 780 #if SHARP_DMM_CLEAN_K0042 781 Int xS = iK; 782 Int yS = 0; 783 Int xE = (uiOri == 0) ? 0 : iL; 784 Int yE = (uiOri == 0) ? iL : uiBlockSize - 1; 785 cTempWedgelet.setWedgelet( xS, yS, xE, yE, uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 786 #else 769 787 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 788 #endif 770 789 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 771 790 } 772 791 } 792 #if SHARP_DMM_CLEAN_K0042 793 } 794 else 795 { 796 for (Int pos = posStart; pos < posEnd; pos++) 797 { 798 cTempWedgelet.generateWedgePatternByRotate(racWedgeList[pos], uiOri); 799 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 800 } 801 } 802 posStart = posEnd; 803 #endif 773 804 } 774 805 -
branches/HTM-13.1-dev2-Sharp/source/Lib/TLibCommon/TComWedgelet.cpp
r1084 r1143 177 177 } 178 178 179 #if SHARP_DMM_CLEAN_K0042 180 Void TComWedgelet::generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate) 181 { 182 Int stride = m_uiWidth; 183 Int sinc, offsetI, offsetJ; 184 185 sinc = 1; 186 offsetI = ( sinc) < 0 ? stride-1 : 0; // 0 187 offsetJ = (-sinc) < 0 ? stride-1 : 0; // stride - 1 188 189 for (Int y = 0; y < stride; y++) 190 { 191 for (Int x = 0; x < stride; x++) 192 { 193 Int i = offsetI + sinc * y; // y 194 Int j = offsetJ - sinc * x; // stride - 1 - x 195 m_pbPattern[(y * stride) + x] = !rcWedge.m_pbPattern[(j * stride) + i]; 196 } 197 } 198 Int blocksize = rcWedge.m_uiWidth * (rcWedge.m_eWedgeRes == HALF_PEL ? 2 : 1); 199 Int offsetX = (-sinc) < 0 ? blocksize - 1 : 0; 200 Int offsetY = ( sinc) < 0 ? blocksize - 1 : 0; 201 m_uhXs = offsetX - sinc * rcWedge.m_uhYs; 202 m_uhYs = offsetY + sinc * rcWedge.m_uhXs; 203 m_uhXe = offsetX - sinc * rcWedge.m_uhYe; 204 m_uhYe = offsetY + sinc * rcWedge.m_uhXe; 205 m_uhOri = rotate; 206 m_eWedgeRes = rcWedge.m_eWedgeRes; 207 m_bIsCoarse = rcWedge.m_bIsCoarse; 208 m_uiAng = rcWedge.m_uiAng; 209 m_uiWidth = rcWedge.m_uiWidth; 210 m_uiHeight = rcWedge.m_uiHeight; 211 } 212 #endif 213 179 214 Void TComWedgelet::xGenerateWedgePattern() 180 215 { … … 193 228 xDrawEdgeLine( uhXs, uhYs, uhXe, uhYe, pbTempPattern, iTempStride ); 194 229 230 #if SHARP_DMM_CLEAN_K0042 231 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 232 Int endPos = uhYe>>shift; 233 for (Int y = 0; y <= endPos; y++) 234 { 235 for (Int x = 0; x < m_uiWidth && pbTempPattern[(y * m_uiWidth) + x] == 0; x++) 236 { 237 pbTempPattern[(y * m_uiWidth) + x] = true; 238 } 239 } 240 for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) 241 { 242 m_pbPattern[k] = pbTempPattern[k]; 243 }; 244 #else 195 245 switch( m_uhOri ) 196 246 { … … 252 302 break; 253 303 } 304 #endif 254 305 255 306 if( pbTempPattern ) … … 294 345 for( Int x = x0; x <= x1; x++ ) 295 346 { 347 #if SHARP_DMM_CLEAN_K0042 348 Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0; 349 Int stride = iPatternStride >> shift; 350 if( steep ) { pbPattern[((x>>shift) * stride) + (y>>shift)] = true; } 351 else { pbPattern[((y>>shift) * stride) + (x>>shift)] = true; } 352 #else 296 353 if( steep ) { pbPattern[(x * iPatternStride) + y] = true; } 297 354 else { pbPattern[(y * iPatternStride) + x] = true; } 355 #endif 298 356 299 357 error += deltaerr; -
branches/HTM-13.1-dev2-Sharp/source/Lib/TLibCommon/TComWedgelet.h
r1084 r1143 124 124 Bool* getScaledPattern(UInt uiWidth); 125 125 126 #if SHARP_DMM_CLEAN_K0042 127 Void generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate); 128 #endif 126 129 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); 127 130 Void findClosestAngle(); -
branches/HTM-13.1-dev2-Sharp/source/Lib/TLibCommon/TypeDef.h
r1142 r1143 350 350 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 351 351 // LG_ZEROINTRADEPTHRESI_A0087 352 #define SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 352 353 353 354 #define TICKET083_IVPFLAG_FIX 1
Note: See TracChangeset for help on using the changeset viewer.