Changeset 627 in SHVCSoftware
- Timestamp:
- 12 Mar 2014, 22:06:13 (11 years ago)
- Location:
- branches/SHM-5.1-dev/source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-5.1-dev/source/App/TAppDecoder/TAppDecTop.cpp
r626 r627 1245 1245 { 1246 1246 Int targetOutputLsIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx(); 1247 TComVPS *vps ;1247 TComVPS *vps = NULL; 1248 1248 1249 1249 if( targetOutputLsIdx == 0 ) // Only base layer is output -
branches/SHM-5.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r624 r627 385 385 string cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 386 386 Int* cfg_numScaledRefLayerOffsets[MAX_LAYERS]; 387 #if P0312_VERT_PHASE_ADJ 388 string cfg_vertPhasePositionEnableFlag[MAX_LAYERS]; 389 #endif 387 390 388 391 #if O0098_SCALED_REF_LAYER_ID … … 393 396 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 394 397 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 398 #if P0312_VERT_PHASE_ADJ 399 string* cfg_vertPhasePositionEnableFlagPtr[MAX_LAYERS]; 400 #endif 401 395 402 #if RC_SHVC_HARMONIZATION 396 403 Bool* cfg_RCEnableRateControl [MAX_LAYERS]; … … 457 464 cfg_scaledRefLayerRightOffsetPtr [layer] = &cfg_scaledRefLayerRightOffset[layer] ; 458 465 cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer]; 466 #if P0312_VERT_PHASE_ADJ 467 cfg_vertPhasePositionEnableFlagPtr [layer] = &cfg_vertPhasePositionEnableFlag[layer] ; 468 #endif 459 469 } 460 470 #if RC_SHVC_HARMONIZATION … … 569 579 " bottom-right luma sample of the EL picture, in units of two luma samples") 570 580 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 571 " bottom-right luma sample of the EL picture, in units of two luma samples") 581 " bottom-right luma sample of the EL picture, in units of two luma samples") 582 #if P0312_VERT_PHASE_ADJ 583 ("VertPhasePositionEnableFlag%d", cfg_vertPhasePositionEnableFlagPtr,string(""), MAX_LAYERS, "VertPhasePositionEnableFlag for layer %d") 584 #endif 572 585 #if O0194_DIFFERENT_BITDEPTH_EL_BL 573 586 ("InputBitDepth%d", cfg_InputBitDepthY, 8, MAX_LAYERS, "Bit-depth of input file for layer %d") … … 1072 1085 assert( strcmp(cfg_scaledRefLayerId[layer].c_str(), "")); 1073 1086 #endif 1087 #if P0312_VERT_PHASE_ADJ 1074 1088 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") || 1075 1089 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") || 1076 1090 strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "") || 1077 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") 1078 ); 1091 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") || 1092 strcmp(cfg_vertPhasePositionEnableFlag[layer].c_str(),"") ); 1093 #else 1094 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") || 1095 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") || 1096 strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "") || 1097 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") ); 1098 #endif 1079 1099 } 1080 1100 … … 1152 1172 } 1153 1173 } 1174 #if P0312_VERT_PHASE_ADJ 1175 // VertPhasePositionEnableFlag // 1176 if(strcmp(cfg_vertPhasePositionEnableFlag[layer].c_str(), "")) 1177 { 1178 cfgStringToArray( &tempArray, cfg_vertPhasePositionEnableFlag[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "VertPhasePositionEnableFlag"); 1179 if(tempArray) 1180 { 1181 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1182 { 1183 m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] = tempArray[i]; 1184 } 1185 delete [] tempArray; tempArray = NULL; 1186 } 1187 } 1188 #endif 1154 1189 } 1155 1190 #if VPS_EXTN_DIRECT_REF_LAYERS -
branches/SHM-5.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r540 r627 60 60 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 61 61 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 62 #if P0312_VERT_PHASE_ADJ 63 ::memset(m_vertPhasePositionEnableFlag, 0, sizeof(m_vertPhasePositionEnableFlag)); 64 #endif 62 65 } 63 66 -
branches/SHM-5.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r588 r627 97 97 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 98 98 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 99 #if P0312_VERT_PHASE_ADJ 100 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; 101 #endif 102 99 103 #if O0194_DIFFERENT_BITDEPTH_EL_BL 100 104 Int m_inputBitDepthY; ///< bit-depth of input file (luma component) -
branches/SHM-5.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r624 r627 570 570 m_acTEncTop[layer].setScaledRefLayerId(i, m_acLayerCfg[layer].m_scaledRefLayerId[i]); 571 571 #endif 572 #if P0312_VERT_PHASE_ADJ 573 m_acTEncTop[layer].setVertPhasePositionEnableFlag( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i]); 574 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 575 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i], m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i], false); 576 #else 572 577 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 573 578 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 579 #endif 574 580 } 575 581 } -
branches/SHM-5.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r625 r627 125 125 m_interLayerPredEnabledFlag = 0; 126 126 ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) ); 127 #if P0312_VERT_PHASE_ADJ 128 ::memset( m_vertPhasePositionFlag, 0, sizeof(m_vertPhasePositionFlag) ); 129 #endif 127 130 #endif //SVC_EXTENSION 128 131 … … 1122 1125 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; 1123 1126 memcpy( m_interLayerPredLayerIdc, pSrc->m_interLayerPredLayerIdc, sizeof( m_interLayerPredLayerIdc ) ); 1127 #if P0312_VERT_PHASE_ADJ 1128 memcpy( m_vertPhasePositionFlag, pSrc->m_vertPhasePositionFlag, sizeof( m_vertPhasePositionFlag ) ); 1129 #endif 1124 1130 #endif 1125 1131 m_pcSPS = pSrc->m_pcSPS; -
branches/SHM-5.1-dev/source/Lib/TLibCommon/TComSlice.h
r625 r627 627 627 Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 628 628 #endif 629 630 #if P0312_VERT_PHASE_ADJ 631 Bool m_vpsVuiVertPhaseInUseFlag; 632 #endif 633 629 634 #if P0300_ALT_OUTPUT_LAYER_FLAG 630 635 Bool m_altOutputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1]; … … 1008 1013 Int getBaseLayerPSCompatibilityFlag (Int layer) { return m_baseLayerPSCompatibilityFlag[layer];} 1009 1014 #endif 1015 1016 #if P0312_VERT_PHASE_ADJ 1017 Bool getVpsVuiVertPhaseInUseFlag() { return m_vpsVuiVertPhaseInUseFlag; } 1018 Void setVpsVuiVertPhaseInUseFlag(Bool x) { m_vpsVuiVertPhaseInUseFlag = x; } 1019 #endif 1020 1010 1021 #if P0300_ALT_OUTPUT_LAYER_FLAG 1011 1022 Bool getAltOuputLayerFlag(Int idx) { return m_altOutputLayerFlag[idx]; } … … 1115 1126 Int m_winTopOffset; 1116 1127 Int m_winBottomOffset; 1128 #if P0312_VERT_PHASE_ADJ 1129 Bool m_vertPhasePositionEnableFlag; 1130 Bool m_vertPhasePositionFlag; 1131 #endif 1117 1132 public: 1118 1133 Window() … … 1122 1137 , m_winTopOffset (0) 1123 1138 , m_winBottomOffset (0) 1139 #if P0312_VERT_PHASE_ADJ 1140 , m_vertPhasePositionEnableFlag(false) 1141 , m_vertPhasePositionFlag(false) 1142 #endif 1124 1143 { } 1125 1144 1126 1145 Bool getWindowEnabledFlag() const { return m_enabledFlag; } 1127 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; } 1146 #if P0312_VERT_PHASE_ADJ 1147 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = m_vertPhasePositionFlag = false;} 1148 #else 1149 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0;} 1150 #endif 1128 1151 Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } 1129 1152 Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; } … … 1135 1158 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } 1136 1159 1160 #if P0312_VERT_PHASE_ADJ 1161 Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag ; } 1162 Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; } 1163 1164 Bool getVertPhasePositionFlag() const { return m_vertPhasePositionEnableFlag ? m_vertPhasePositionFlag: 0; } 1165 Void setVertPhasePositionFlag(Bool val) { m_vertPhasePositionFlag = val; } 1166 1167 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom , Bool vertPhasePositionEnableFlag = 0, Bool phasePosFlag = 0) 1168 #else 1137 1169 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) 1170 #endif 1138 1171 { 1139 1172 m_enabledFlag = true; … … 1142 1175 m_winTopOffset = offsetLTop; 1143 1176 m_winBottomOffset = offsetLBottom; 1177 #if P0312_VERT_PHASE_ADJ 1178 m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag; 1179 m_vertPhasePositionFlag = phasePosFlag; 1180 #endif 1144 1181 } 1145 1182 }; … … 1393 1430 UInt m_layerId; 1394 1431 UInt m_numScaledRefLayerOffsets; 1432 #if P0312_VERT_PHASE_ADJ 1433 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; 1434 #endif 1395 1435 #if O0098_SCALED_REF_LAYER_ID 1396 1436 UInt m_scaledRefLayerId[MAX_LAYERS]; … … 1549 1589 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1550 1590 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 1591 #if P0312_VERT_PHASE_ADJ 1592 Bool getVertPhasePositionEnableFlag(Int x) { return m_vertPhasePositionEnableFlag[x]; } 1593 Void setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b; } 1594 #endif 1551 1595 #if O0098_SCALED_REF_LAYER_ID 1552 1596 UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } … … 1944 1988 Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures 1945 1989 Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; 1990 #if P0312_VERT_PHASE_ADJ 1991 Bool m_vertPhasePositionFlag[MAX_VPS_LAYER_ID_PLUS1]; 1992 #endif 1946 1993 #if POC_RESET_FLAG 1947 1994 Bool m_bPocResetFlag; … … 2224 2271 Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} 2225 2272 2273 #if P0312_VERT_PHASE_ADJ 2274 Int getVertPhasePositionFlag (UInt layerIdx) { return m_vertPhasePositionFlag[layerIdx];} 2275 Void setVertPhasePositionFlag (Bool b, UInt layerIdx) { m_vertPhasePositionFlag[layerIdx] = b; } 2276 #endif 2277 2226 2278 Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } 2227 2279 Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } -
branches/SHM-5.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r498 r627 126 126 Int heightEL = pcUsPic->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 127 127 Int strideEL = pcUsPic->getStride(); 128 129 #if P0312_VERT_PHASE_ADJ 130 Bool vertPhasePositionEnableFlag = scalEL.getVertPhasePositionEnableFlag(); 131 Bool vertPhasePositionFlag = scalEL.getVertPhasePositionFlag(); 132 if (vertPhasePositionFlag) 133 { 134 assert (vertPhasePositionEnableFlag); 135 } 136 #endif 128 137 129 138 Pel* piTempBufY = pcTempPic->getLumaAddr(); … … 219 228 #if O0215_PHASE_ALIGNMENT //for Luma, if Phase 0, then both PhaseX and PhaseY should be 0. If symmetric: both PhaseX and PhaseY should be 2 220 229 Int phaseX = 2*phaseAlignFlag; 230 #if P0312_VERT_PHASE_ADJ 231 Int phaseY = (vertPhasePositionEnableFlag?(vertPhasePositionFlag *4):(2*phaseAlignFlag)); 232 #else 221 233 Int phaseY = 2*phaseAlignFlag; 234 #endif 222 235 #else 223 236 Int phaseX = 0; 237 #if P0312_VERT_PHASE_ADJ 238 Int phaseY = (vertPhasePositionEnableFlag?(vertPhasePositionFlag *4):(0)); 239 #else 224 240 Int phaseY = 0; 241 #endif 225 242 #endif 226 243 … … 363 380 364 381 #if O0215_PHASE_ALIGNMENT 382 Int phaseXC = phaseAlignFlag; 383 #if P0312_VERT_PHASE_ADJ 384 Int phaseYC = vertPhasePositionEnableFlag ? (vertPhasePositionFlag * 4):(phaseAlignFlag + 1); 385 #else 386 Int phaseYC = phaseAlignFlag + 1; 387 #endif 388 #else 365 389 Int phaseXC = 0; 390 #if P0312_VERT_PHASE_ADJ 391 Int phaseYC = vertPhasePositionEnableFlag ? (vertPhasePositionFlag * 4): 1;; 392 #else 366 393 Int phaseYC = 1; 367 394 #endif 395 #endif 396 368 397 #if ROUNDING_OFFSET 369 addX = ( ( (phaseXC+phaseAlignFlag) * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) ); 370 addY = ( ( (phaseYC+phaseAlignFlag) * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) ); 371 #else 372 addX = ( ( ( widthBL * (phaseXC+phaseAlignFlag) ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) ); 373 addY = ( ( ( heightBL * (phaseYC+phaseAlignFlag) ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) ); 374 #endif 375 376 deltaX = 4 * (phaseXC+phaseAlignFlag); 377 deltaY = 4 * (phaseYC+phaseAlignFlag); 378 #else 379 phaseX = 0; 380 phaseY = 1; 381 382 #if ROUNDING_OFFSET 383 addX = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) ); 384 addY = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) ); 385 #else 386 addX = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) ); 387 addY = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) ); 388 #endif 389 390 deltaX = 4 * phaseX; 391 deltaY = 4 * phaseY; 392 #endif 398 addX = ( ( phaseXC * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) ); 399 addY = ( ( phaseYC * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) ); 400 #else 401 addX = ( ( ( widthBL * (phaseXC) ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) ); 402 addY = ( ( ( heightBL * (phaseYC) ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) ); 403 #endif 404 405 deltaX = 4 * phaseXC; 406 deltaY = 4 * phaseYC; 393 407 394 408 shiftXM4 = shiftX - 4; -
branches/SHM-5.1-dev/source/Lib/TLibCommon/TypeDef.h
r625 r627 50 50 #define O0137_MAX_LAYERID 1 ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1 51 51 52 #define P0312_VERT_PHASE_ADJ 1 ///< JCTVC-P0312: vertical phase adjustment in re-sampling process (BoG report) 52 53 #define P0130_EOB 1 ///< JCTVC-P0130, set layer Id of EOB NALU to be fixed to 0 53 54 #define P0307_REMOVE_VPS_VUI_OFFSET 1 ///< JCTVC-P0307, remove implementation related to VPS VUI offset signalling -
branches/SHM-5.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r625 r627 859 859 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 860 860 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 861 #if P0312_VERT_PHASE_ADJ 862 READ_FLAG( uiCode, "vert_phase_pos_enable_flag" );scaledWindow.setVertPhasePositionEnableFlag (uiCode); pcSPS->setVertPhasePositionEnableFlag(i,uiCode); 863 #endif 861 864 } 862 865 } … … 1938 1941 } 1939 1942 } 1943 #endif 1944 1945 #if P0312_VERT_PHASE_ADJ 1946 READ_FLAG( uiCode, "vps_vui_vert_phase_in_use_flag" ); vps->setVpsVuiVertPhaseInUseFlag(uiCode); 1940 1947 #endif 1941 1948 … … 2486 2493 #endif 2487 2494 #endif 2495 #if P0312_VERT_PHASE_ADJ 2496 for(Int i = 0; i < rpcSlice->getSPS()->getNumScaledRefLayerOffsets(); i++) 2497 { 2498 if (rpcSlice->getSPS()->getVertPhasePositionEnableFlag(rpcSlice->getInterLayerPredLayerIdc(i))) 2499 { 2500 READ_FLAG( uiCode, "phase_pos_flag" ); rpcSlice->setVertPhasePositionFlag( uiCode? true: false, i); 2501 } 2502 } 2503 #endif 2488 2504 2489 2505 if(sps->getUseSAO()) -
branches/SHM-5.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r625 r627 1467 1467 #endif 1468 1468 1469 #if P0312_VERT_PHASE_ADJ 1470 #if O0098_SCALED_REF_LAYER_ID 1471 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 1472 #else 1473 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1474 #endif 1475 #else 1469 1476 #if O0098_SCALED_REF_LAYER_ID 1470 1477 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 1471 1478 #else 1472 1479 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1480 #endif 1473 1481 #endif 1474 1482 … … 1493 1501 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1494 1502 #endif*/ 1503 #if P0312_VERT_PHASE_ADJ 1504 scalEL.setVertPhasePositionFlag (pcSlice->getVertPhasePositionFlag(i)); 1505 #endif 1495 1506 #if O0215_PHASE_ALIGNMENT 1496 1507 #if O0194_JOINT_US_BITSHIFT -
branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r625 r627 663 663 WRITE_SVLC( scaledWindow.getWindowRightOffset() >> 1, "scaled_ref_layer_right_offset" ); 664 664 WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" ); 665 #if P0312_VERT_PHASE_ADJ 666 WRITE_FLAG( scaledWindow.getVertPhasePositionEnableFlag(), "vert_phase_pos_enable_flag" ); 667 #endif 665 668 } 666 669 } … … 1458 1461 } 1459 1462 } 1463 #endif 1464 1465 #if P0312_VERT_PHASE_ADJ 1466 WRITE_FLAG( vps->getVpsVuiVertPhaseInUseFlag(), "vps_vui_vert_phase_in_use_flag" ); 1460 1467 #endif 1461 1468 … … 1839 1846 } 1840 1847 } 1848 #if P0312_VERT_PHASE_ADJ 1849 for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 1850 { 1851 if (pcSlice->getSPS()->getVertPhasePositionEnableFlag(pcSlice->getInterLayerPredLayerIdc(i))) 1852 { 1853 WRITE_FLAG( pcSlice->getVertPhasePositionFlag(i), "phase_pos_flag" ); 1854 } 1855 } 1856 #endif 1841 1857 #endif //SVC_EXTENSION 1842 1858 -
branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncCfg.h
r595 r627 386 386 387 387 Window &getConformanceWindow() { return m_conformanceWindow; } 388 #if P0312_VERT_PHASE_ADJ 389 Void setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom, false, false); } 390 #else 388 391 Void setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom); } 392 #endif 389 393 390 394 Void setFramesToBeEncoded ( Int i ) { m_framesToBeEncoded = i; } -
branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r620 r627 771 771 } 772 772 773 #if P0312_VERT_PHASE_ADJ 774 #if O0098_SCALED_REF_LAYER_ID 775 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 776 #else 777 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 778 #endif 779 #else 773 780 #if O0098_SCALED_REF_LAYER_ID 774 781 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); … … 776 783 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc); 777 784 #endif 785 #endif 778 786 779 787 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); … … 797 805 Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 798 806 #endif*/ 807 #if P0312_VERT_PHASE_ADJ 808 //when PhasePositionEnableFlag is equal to 1, set vertPhasePositionFlag to 0 if BL is top field and 1 if bottom 809 if (scalEL.getVertPhasePositionEnableFlag()) 810 { 811 pcSlice->setVertPhasePositionFlag(pcSlice->getPOC()%2, i); 812 scalEL.setVertPhasePositionFlag (pcSlice->getVertPhasePositionFlag(i)); 813 } 814 #endif 799 815 #if O0215_PHASE_ALIGNMENT 800 816 #if O0194_JOINT_US_BITSHIFT -
branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r595 r627 902 902 #endif 903 903 m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i]; 904 #if P0312_VERT_PHASE_ADJ 905 m_cSPS.setVertPhasePositionEnableFlag(i,m_scaledRefLayerWindow[i].getVertPhasePositionEnableFlag()); 906 #endif 904 907 } 905 908 #endif //SVC_EXTENSION -
branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncTop.h
r595 r627 139 139 #endif 140 140 Window m_scaledRefLayerWindow[MAX_LAYERS]; 141 #if P0312_VERT_PHASE_ADJ 142 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; 143 #endif 141 144 #if POC_RESET_FLAG 142 145 Int m_pocAdjustmentValue; … … 226 229 #endif 227 230 Window& getScaledRefLayerWindow(Int x) { return m_scaledRefLayerWindow[x]; } 231 #if P0312_VERT_PHASE_ADJ 232 Void setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b; } 233 UInt getVertPhasePositionEnableFlag(Int x) { return m_vertPhasePositionEnableFlag[x]; } 234 #endif 235 228 236 TComPic** getIlpList() { return m_cIlpPic; } 229 237 #if REF_IDX_MFM
Note: See TracChangeset for help on using the changeset viewer.