Changeset 540 in SHVCSoftware for trunk/source/Lib/TLibCommon/TComPicSym.cpp
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-4.1-dev (added) merged: 501-539 /trunk merged: 499
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-4.1-dev/source (added) merged: 502-522,524-533,535,537-539
- Property svn:mergeinfo changed
-
trunk/source/Lib/TLibCommon/TComPicSym.cpp
r442 r540 67 67 ,m_puiTileIdxMap(NULL) 68 68 ,m_puiInverseCUOrderMap(NULL) 69 #if HM_CLEANUP_SAO 70 ,m_saoBlkParams(NULL) 71 #endif 69 72 {}; 70 73 … … 127 130 m_puiInverseCUOrderMap[i] = i; 128 131 } 132 133 #if HM_CLEANUP_SAO 134 m_saoBlkParams = new SAOBlkParam[m_uiNumCUsInFrame]; 135 #else 129 136 m_saoParam = NULL; 137 #endif 130 138 } 131 139 … … 183 191 m_puiInverseCUOrderMap = NULL; 184 192 193 #if HM_CLEANUP_SAO 194 if(m_saoBlkParams) 195 { 196 delete[] m_saoBlkParams; m_saoBlkParams = NULL; 197 } 198 #else 185 199 if (m_saoParam) 186 200 { … … 189 203 m_saoParam = NULL; 190 204 } 205 #endif 191 206 } 192 207 … … 332 347 } 333 348 349 350 #if HM_CLEANUP_SAO 351 Void TComPicSym::deriveLoopFilterBoundaryAvailibility(Int ctu, 352 Bool& isLeftAvail, 353 Bool& isRightAvail, 354 Bool& isAboveAvail, 355 Bool& isBelowAvail, 356 Bool& isAboveLeftAvail, 357 Bool& isAboveRightAvail, 358 Bool& isBelowLeftAvail, 359 Bool& isBelowRightAvail 360 ) 361 { 362 363 isLeftAvail = (ctu % m_uiWidthInCU != 0); 364 isRightAvail = (ctu % m_uiWidthInCU != m_uiWidthInCU-1); 365 isAboveAvail = (ctu >= m_uiWidthInCU ); 366 isBelowAvail = (ctu < m_uiNumCUsInFrame - m_uiWidthInCU); 367 isAboveLeftAvail = (isAboveAvail && isLeftAvail); 368 isAboveRightAvail= (isAboveAvail && isRightAvail); 369 isBelowLeftAvail = (isBelowAvail && isLeftAvail); 370 isBelowRightAvail= (isBelowAvail && isRightAvail); 371 372 Bool isLoopFiltAcrossTilePPS = getCU(ctu)->getSlice()->getPPS()->getLoopFilterAcrossTilesEnabledFlag(); 373 374 { 375 TComDataCU* ctuCurr = getCU(ctu); 376 TComDataCU* ctuLeft = isLeftAvail ?getCU(ctu-1):NULL; 377 TComDataCU* ctuRight = isRightAvail?getCU(ctu+1):NULL; 378 TComDataCU* ctuAbove = isAboveAvail?getCU(ctu-m_uiWidthInCU):NULL; 379 TComDataCU* ctuBelow = isBelowAvail?getCU(ctu+m_uiWidthInCU):NULL; 380 TComDataCU* ctuAboveLeft = isAboveLeftAvail ? getCU(ctu-m_uiWidthInCU-1):NULL; 381 TComDataCU* ctuAboveRigtht= isAboveRightAvail? getCU(ctu-m_uiWidthInCU+1):NULL; 382 TComDataCU* ctuBelowLeft = isBelowLeftAvail ? getCU(ctu+m_uiWidthInCU-1):NULL; 383 TComDataCU* ctuBelowRight = isBelowRightAvail? getCU(ctu+m_uiWidthInCU+1):NULL; 384 385 { 386 //left 387 if(ctuLeft != NULL) 388 { 389 isLeftAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuLeft->getSlice()->getSliceCurStartCUAddr())?ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true; 390 } 391 //above 392 if(ctuAbove != NULL) 393 { 394 isAboveAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuAbove->getSlice()->getSliceCurStartCUAddr())?ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true; 395 } 396 //right 397 if(ctuRight != NULL) 398 { 399 isRightAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuRight->getSlice()->getSliceCurStartCUAddr())?ctuRight->getSlice()->getLFCrossSliceBoundaryFlag():true; 400 } 401 //below 402 if(ctuBelow != NULL) 403 { 404 isBelowAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuBelow->getSlice()->getSliceCurStartCUAddr())?ctuBelow->getSlice()->getLFCrossSliceBoundaryFlag():true; 405 } 406 //above-left 407 if(ctuAboveLeft != NULL) 408 { 409 isAboveLeftAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuAboveLeft->getSlice()->getSliceCurStartCUAddr())?ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag():true; 410 } 411 //below-right 412 if(ctuBelowRight != NULL) 413 { 414 isBelowRightAvail = (ctuCurr->getSlice()->getSliceCurStartCUAddr() != ctuBelowRight->getSlice()->getSliceCurStartCUAddr())?ctuBelowRight->getSlice()->getLFCrossSliceBoundaryFlag():true; 415 } 416 417 418 //above-right 419 if(ctuAboveRigtht != NULL) 420 { 421 Int curSliceStartTS = getCUOrderMap(ctuCurr->getSlice()->getSliceCurStartCUAddr()/m_uiNumPartitions); 422 Int aboveRigthtSliceStartTS = getCUOrderMap(ctuAboveRigtht->getSlice()->getSliceCurStartCUAddr()/m_uiNumPartitions); 423 424 isAboveRightAvail = (curSliceStartTS == aboveRigthtSliceStartTS)?(true): 425 ( 426 (curSliceStartTS > aboveRigthtSliceStartTS)?(ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag()) 427 :(ctuAboveRigtht->getSlice()->getLFCrossSliceBoundaryFlag()) 428 ); 429 } 430 //below-left 431 if(ctuBelowLeft != NULL) 432 { 433 Int curSliceStartTS = getCUOrderMap(ctuCurr->getSlice()->getSliceCurStartCUAddr()/m_uiNumPartitions); 434 Int belowLeftSliceStartTS = getCUOrderMap(ctuBelowLeft->getSlice()->getSliceCurStartCUAddr()/m_uiNumPartitions); 435 436 isBelowLeftAvail = (curSliceStartTS == belowLeftSliceStartTS)?(true): 437 ( 438 (curSliceStartTS > belowLeftSliceStartTS)?(ctuCurr->getSlice()->getLFCrossSliceBoundaryFlag()) 439 :(ctuBelowLeft->getSlice()->getLFCrossSliceBoundaryFlag()) 440 ); 441 } 442 } 443 444 if(!isLoopFiltAcrossTilePPS) 445 { 446 isLeftAvail = (!isLeftAvail ) ?false:(getTileIdxMap( ctuLeft->getAddr() ) == getTileIdxMap( ctu )); 447 isAboveAvail = (!isAboveAvail ) ?false:(getTileIdxMap( ctuAbove->getAddr() ) == getTileIdxMap( ctu )); 448 isRightAvail = (!isRightAvail ) ?false:(getTileIdxMap( ctuRight->getAddr() ) == getTileIdxMap( ctu )); 449 isBelowAvail = (!isBelowAvail ) ?false:(getTileIdxMap( ctuBelow->getAddr() ) == getTileIdxMap( ctu )); 450 isAboveLeftAvail = (!isAboveLeftAvail ) ?false:(getTileIdxMap( ctuAboveLeft->getAddr() ) == getTileIdxMap( ctu )); 451 isAboveRightAvail= (!isAboveRightAvail) ?false:(getTileIdxMap( ctuAboveRigtht->getAddr() ) == getTileIdxMap( ctu )); 452 isBelowLeftAvail = (!isBelowLeftAvail ) ?false:(getTileIdxMap( ctuBelowLeft->getAddr() ) == getTileIdxMap( ctu )); 453 isBelowRightAvail= (!isBelowRightAvail) ?false:(getTileIdxMap( ctuBelowRight->getAddr() ) == getTileIdxMap( ctu )); 454 } 455 } 456 457 } 458 #else 334 459 Void TComPicSym::allocSaoParam(TComSampleAdaptiveOffset *sao) 335 460 { … … 337 462 sao->allocSaoParam(m_saoParam); 338 463 } 464 #endif 339 465 340 466 TComTile::TComTile()
Note: See TracChangeset for help on using the changeset viewer.