Changeset 705 in SHVCSoftware for branches/SHM-6-dev/source/Lib
- Timestamp:
- 19 Apr 2014, 06:59:58 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibCommon/TComDataCU.cpp
r694 r705 3504 3504 Int topStartL = baseColPic->getSlice(0)->getSPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset(); 3505 3505 #if Q0200_CONFORMANCE_BL_SIZE 3506 leftStartL += baseColPic->getConformanceWindow().getWindowLeftOffset(); 3507 topStartL += baseColPic->getConformanceWindow().getWindowTopOffset(); 3506 Int chromaFormatIdc = baseColPic->getSlice(0)->getChromaFormatIdc(); 3507 leftStartL += baseColPic->getConformanceWindow().getWindowLeftOffset() * TComSPS::getWinUnitX( chromaFormatIdc ); 3508 topStartL += baseColPic->getConformanceWindow().getWindowTopOffset() * TComSPS::getWinUnitY( chromaFormatIdc ); 3508 3509 #endif 3509 3510 #else -
branches/SHM-6-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r703 r705 137 137 138 138 #if Q0200_CONFORMANCE_BL_SIZE 139 Int chromaFormatIdc = currSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc(); 139 140 const Window &confBL = currSlice->getBaseColPic(refLayerIdc)->getConformanceWindow(); 140 widthBL -= confBL.getWindowLeftOffset() + confBL.getWindowRightOffset(); 141 heightBL -= confBL.getWindowBottomOffset() + confBL.getWindowTopOffset(); 141 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 142 Int yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 143 144 widthBL -= ( confBL.getWindowLeftOffset() + confBL.getWindowRightOffset() ) * xScal; 145 heightBL -= ( confBL.getWindowBottomOffset() + confBL.getWindowTopOffset() ) * yScal; 142 146 #endif 143 147 #if P0312_VERT_PHASE_ADJ … … 301 305 Int addY = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) ); 302 306 #else 303 Int addX 304 Int addY 307 Int addX = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) ); 308 Int addY = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) ); 305 309 #endif 306 310 307 311 #if Q0120_PHASE_CALCULATION 308 Int deltaX 309 Int deltaY 310 #else 311 Int deltaX 312 Int deltaY 312 Int deltaX = (Int)phaseAlignFlag <<3; 313 Int deltaY = (((Int)phaseAlignFlag <<3)>>(Int)vertPhasePositionEnableFlag) + ((Int)vertPhasePositionFlag<<3); 314 #else 315 Int deltaX = 4 * phaseX; 316 Int deltaY = 4 * phaseY; 313 317 #endif 314 318 Int shiftXM4 = shiftX - 4; 315 319 Int shiftYM4 = shiftY - 4; 316 320 317 widthEL 318 heightEL 319 320 widthBL 321 heightBL 321 widthEL = pcUsPic->getWidth (); 322 heightEL = pcUsPic->getHeight(); 323 324 widthBL = pcBasePic->getWidth (); 325 heightBL = min<Int>( pcBasePic->getHeight(), heightEL ); 322 326 323 327 Int leftStartL = scalEL.getWindowLeftOffset(); … … 327 331 Int leftOffset = leftStartL > 0 ? leftStartL : 0; 328 332 #if Q0200_CONFORMANCE_BL_SIZE 329 leftStartL += confBL.getWindowLeftOffset() << 4;330 topStartL += confBL.getWindowTopOffset() << 4;333 leftStartL += ( confBL.getWindowLeftOffset() * xScal ) << 4; 334 topStartL += ( confBL.getWindowTopOffset() * yScal ) << 4; 331 335 #endif 332 336 #if N0214_INTERMEDIATE_BUFFER_16BITS … … 424 428 heightBL = pcBasePic->getHeight(); 425 429 #if Q0200_CONFORMANCE_BL_SIZE 426 widthBL -= confBL.getWindowLeftOffset() + confBL.getWindowRightOffset();427 heightBL -= confBL.getWindowBottomOffset() + confBL.getWindowTopOffset();430 widthBL -= ( confBL.getWindowLeftOffset() + confBL.getWindowRightOffset() ) * xScal; 431 heightBL -= ( confBL.getWindowBottomOffset() + confBL.getWindowTopOffset() ) * yScal; 428 432 #endif 429 433 widthEL = pcUsPic->getWidth () - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); … … 447 451 leftOffset = leftStartC > 0 ? leftStartC : 0; 448 452 #if Q0200_CONFORMANCE_BL_SIZE 449 leftStartC += ( confBL.getWindowLeftOffset() >> 1 ) << 4;450 topStartC += ( confBL.getWindowTopOffset() >> 1 ) << 4;453 leftStartC += ( ( confBL.getWindowLeftOffset() * xScal ) >> 1 ) << 4; 454 topStartC += ( ( confBL.getWindowTopOffset() * yScal ) >> 1 ) << 4; 451 455 #endif 452 456 shiftX = 16; -
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp
r704 r705 1556 1556 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight(); 1557 1557 #if Q0200_CONFORMANCE_BL_SIZE 1558 Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getConformanceWindow(); 1559 #if REPN_FORMAT_IN_VPS 1560 UInt chromaFormatIdc = pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc(); 1561 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 1562 Int yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 1563 confBL.setWindowBottomOffset(confBL.getWindowBottomOffset()*yScal); 1564 confBL.setWindowTopOffset(confBL.getWindowTopOffset()*yScal); 1565 confBL.setWindowLeftOffset(confBL.getWindowLeftOffset()*xScal); 1566 confBL.setWindowRightOffset(confBL.getWindowRightOffset()*xScal); 1567 #endif 1568 widthBL -= confBL.getWindowLeftOffset() + confBL.getWindowRightOffset(); 1569 heightBL -= confBL.getWindowTopOffset() + confBL.getWindowBottomOffset(); 1558 Int chromaFormatIdc = pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc(); 1559 const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getConformanceWindow(); 1560 widthBL -= ( confBL.getWindowLeftOffset() + confBL.getWindowRightOffset() ) * TComSPS::getWinUnitX( chromaFormatIdc ); 1561 heightBL -= ( confBL.getWindowTopOffset() + confBL.getWindowBottomOffset() ) * TComSPS::getWinUnitY( chromaFormatIdc ); 1570 1562 #endif 1571 1563 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); … … 1628 1620 } 1629 1621 pcSlice->setFullPelBaseRec ( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc) ); 1630 #if REPN_FORMAT_IN_VPS && Q0200_CONFORMANCE_BL_SIZE1631 confBL.setWindowBottomOffset(confBL.getWindowBottomOffset()/yScal);1632 confBL.setWindowTopOffset(confBL.getWindowTopOffset()/yScal);1633 confBL.setWindowLeftOffset(confBL.getWindowLeftOffset()/xScal);1634 confBL.setWindowRightOffset(confBL.getWindowRightOffset()/xScal);1635 #endif1636 1622 #endif 1637 1623 } -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r683 r705 509 509 if (conf.getWindowEnabledFlag()) 510 510 { 511 #if REPN_FORMAT_IN_VPS 512 WRITE_UVLC( conf.getWindowLeftOffset(), "conf_win_left_offset" ); 513 WRITE_UVLC( conf.getWindowRightOffset(), "conf_win_right_offset" ); 514 WRITE_UVLC( conf.getWindowTopOffset(), "conf_win_top_offset" ); 515 WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_bottom_offset" ); 516 #else 511 517 WRITE_UVLC( conf.getWindowLeftOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_left_offset" ); 512 518 WRITE_UVLC( conf.getWindowRightOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_right_offset" ); 513 519 WRITE_UVLC( conf.getWindowTopOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_top_offset" ); 514 520 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 521 #endif 515 522 } 516 523 -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r703 r705 1049 1049 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight(); 1050 1050 #if Q0200_CONFORMANCE_BL_SIZE 1051 const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getConformanceWindow(); 1052 widthBL -= confBL.getWindowLeftOffset() + confBL.getWindowRightOffset(); 1053 heightBL -= confBL.getWindowTopOffset() + confBL.getWindowBottomOffset(); 1051 Int chromaFormatIdc = pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc(); 1052 const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getConformanceWindow(); 1053 widthBL -= ( confBL.getWindowLeftOffset() + confBL.getWindowRightOffset() ) * TComSPS::getWinUnitX( chromaFormatIdc ); 1054 heightBL -= ( confBL.getWindowTopOffset() + confBL.getWindowBottomOffset() ) * TComSPS::getWinUnitY( chromaFormatIdc ); 1054 1055 #endif 1055 1056 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
Note: See TracChangeset for help on using the changeset viewer.