Changeset 705 in SHVCSoftware for branches/SHM-6-dev
- Timestamp:
- 19 Apr 2014, 06:59:58 (11 years ago)
- Location:
- branches/SHM-6-dev/source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r694 r705 1223 1223 if( i >= m_acLayerCfg[layer].m_numSamplePredRefLayers ) 1224 1224 { 1225 printf( "NumSamplePredRefLayers : The number of columns whose width are defined is larger than the allowed number of columns.\n");1225 printf( "NumSamplePredRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer ); 1226 1226 exit( EXIT_FAILURE ); 1227 1227 } … … 1232 1232 if( i < m_acLayerCfg[layer].m_numSamplePredRefLayers ) 1233 1233 { 1234 printf( "NumSamplePredRefLayers : The width of some columns is not defined.\n");1234 printf( "NumSamplePredRefLayers%d: The width of some columns is not defined.\n", layer ); 1235 1235 exit( EXIT_FAILURE ); 1236 1236 } … … 1254 1254 if( i >= m_acLayerCfg[layer].m_numMotionPredRefLayers ) 1255 1255 { 1256 printf( "NumMotionPredRefLayers : The number of columns whose width are defined is larger than the allowed number of columns.\n");1256 printf( "NumMotionPredRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer ); 1257 1257 exit( EXIT_FAILURE ); 1258 1258 } … … 1263 1263 if( i < m_acLayerCfg[layer].m_numMotionPredRefLayers ) 1264 1264 { 1265 printf( "NumMotionPredRefLayers : The width of some columns is not defined.\n");1265 printf( "NumMotionPredRefLayers%d: The width of some columns is not defined.\n", layer ); 1266 1266 exit( EXIT_FAILURE ); 1267 1267 } … … 1293 1293 if( i >= m_acLayerCfg[layer].m_numActiveRefLayers ) 1294 1294 { 1295 printf( "NumActiveRefLayers : The number of columns whose width are defined is larger than the allowed number of columns.\n");1295 printf( "NumActiveRefLayers%d: The number of columns whose width are defined is larger than the allowed number of columns.\n", layer ); 1296 1296 exit( EXIT_FAILURE ); 1297 1297 } … … 1302 1302 if( i < m_acLayerCfg[layer].m_numActiveRefLayers ) 1303 1303 { 1304 printf( "NumActiveRefLayers : The width of some columns is not defined.\n");1304 printf( "NumActiveRefLayers%d: The width of some columns is not defined.\n", layer ); 1305 1305 exit( EXIT_FAILURE ); 1306 1306 } -
branches/SHM-6-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r644 r705 171 171 } 172 172 #endif 173 #if REPN_FORMAT_IN_VPS 174 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confLeft + m_confRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confTop + m_confBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate ); 175 #else 173 176 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate ); 177 #endif 174 178 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 175 179 #if O0194_DIFFERENT_BITDEPTH_EL_BL … … 229 233 m_aiPad[0] = m_confRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth; 230 234 m_iSourceWidth += m_confRight; 235 #if REPN_FORMAT_IN_VPS 236 m_confRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 237 #endif 231 238 } 232 239 if (m_iSourceHeight % minCuSize) … … 239 246 m_aiPad[1] = m_confBottom << 1; 240 247 } 248 #if REPN_FORMAT_IN_VPS 249 m_confBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 250 #endif 241 251 } 242 252 break; … … 249 259 m_confRight = m_aiPad[0]; 250 260 m_confBottom = m_aiPad[1]; 261 #if REPN_FORMAT_IN_VPS 262 m_confRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 263 m_confBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 264 #endif 251 265 break; 252 266 } … … 331 345 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 332 346 347 #if !REPN_FORMAT_IN_VPS 333 348 xConfirmPara( m_confLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 334 349 xConfirmPara( m_confRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 335 350 xConfirmPara( m_confTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 336 351 xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 352 #endif 337 353 338 354 #if LAYER_CTB -
branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp
r697 r705 1326 1326 if(vps->getMaxLayers() > MAX_REF_LAYERS) 1327 1327 { 1328 for(UInt layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++)1328 for(UInt layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1329 1329 { 1330 1330 assert( vps->getNumRefLayers(vps->getLayerIdInNuh(layerCtr)) <= MAX_REF_LAYERS); -
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.