Changeset 1487 in SHVCSoftware for branches/SHM-dev/source/Lib
- Timestamp:
- 24 Nov 2015, 03:13:36 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r1485 r1487 292 292 Void TComPic::copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut) 293 293 { 294 #if SCALABLE_REXT 295 Int upsampledRowWidthLuma = pcPicYuvOut->getStride(COMPONENT_Y); // 2 * pcPicYuvOut->getLumaMargin() + pcPicYuvOut->getWidth(); 296 copyOnetoOnePicture( 297 pcPicYuvIn->getAddr(COMPONENT_Y), 298 pcPicYuvOut->getAddr(COMPONENT_Y), 299 pcPicYuvOut->getWidth(COMPONENT_Y), 300 pcPicYuvOut->getHeight(COMPONENT_Y), 301 upsampledRowWidthLuma); 302 303 if(pcPicYuvOut->getChromaFormat() != CHROMA_400) 304 { 305 Int upsampledRowWidthChroma = pcPicYuvOut->getStride(COMPONENT_Cb); //2 * pcPicYuvOut->getChromaMargin() + (pcPicYuvOut->getWidth()>>1); 306 307 copyOnetoOnePicture( 308 pcPicYuvIn->getAddr(COMPONENT_Cr), 309 pcPicYuvOut->getAddr(COMPONENT_Cr), 310 pcPicYuvOut->getWidth(COMPONENT_Cr), 311 pcPicYuvOut->getHeight(COMPONENT_Cr), 312 upsampledRowWidthChroma); 313 copyOnetoOnePicture( 314 pcPicYuvIn->getAddr(COMPONENT_Cb), 315 pcPicYuvOut->getAddr(COMPONENT_Cb), 316 pcPicYuvOut->getWidth(COMPONENT_Cb), 317 pcPicYuvOut->getHeight(COMPONENT_Cb), 318 upsampledRowWidthChroma); 319 } 320 #else 294 321 Int upsampledRowWidthLuma = pcPicYuvOut->getStride(COMPONENT_Y); // 2 * pcPicYuvOut->getLumaMargin() + pcPicYuvOut->getWidth(); 295 322 Int upsampledRowWidthCroma = pcPicYuvOut->getStride(COMPONENT_Cb); //2 * pcPicYuvOut->getChromaMargin() + (pcPicYuvOut->getWidth()>>1); … … 313 340 pcPicYuvOut->getHeight(COMPONENT_Y)>>1, 314 341 upsampledRowWidthCroma); 342 #endif 315 343 } 316 344 -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r1431 r1487 85 85 if( !resamplingPhase.phasePresentFlag ) 86 86 { 87 #if SCALABLE_REXT 88 if(chromaFormatIdc == 3) 89 { 90 phaseVerChroma = 0; 91 } 92 else 93 { 94 #endif 87 95 Int refRegionHeight = heightBL - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset(); 88 96 phaseVerChroma = (4 * heightEL + (refRegionHeight >> 1)) / refRegionHeight - 4; 97 #if SCALABLE_REXT 98 } 99 #endif 89 100 } 90 101 … … 139 150 } 140 151 152 #if SCALABLE_REXT 153 if(chromaFormatIdc != 0) 154 { 155 #endif 141 156 widthEL >>= 1; 142 157 heightEL >>= 1; … … 177 192 piDstV += strideEL; 178 193 } 194 #if SCALABLE_REXT 195 } 196 #endif 179 197 } 180 198 else // general resampling process … … 290 308 //========== UV component upsampling =========== 291 309 310 #if SCALABLE_REXT 311 if(chromaFormatIdc != 0) 312 { 313 #endif 292 314 widthEL >>= 1; 293 315 heightEL >>= 1; … … 396 418 } 397 419 } 420 #if SCALABLE_REXT 421 } 422 #endif 398 423 } 399 424 pcUsPic->setBorderExtension(false); -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1486 r1487 48 48 49 49 #if SVC_EXTENSION 50 #define SCALABLE_REXT 1 51 #define FORMATIDX_CHECK 1 52 50 53 #define MAX_LAYERS 8 ///< max number of layers the codec is supposed to handle 51 54 … … 197 200 // This can be enabled by the makefile 198 201 #ifndef RExt__HIGH_BIT_DEPTH_SUPPORT 199 #define RExt__HIGH_BIT_DEPTH_SUPPORT 0///< 0 (default) use data type definitions for 8-10 bit video, 1 = use larger data types to allow for up to 16-bit video (originally developed as part of N0188)202 #define RExt__HIGH_BIT_DEPTH_SUPPORT 1 ///< 0 (default) use data type definitions for 8-10 bit video, 1 = use larger data types to allow for up to 16-bit video (originally developed as part of N0188) 200 203 #endif 201 204 … … 644 647 SCALABLEMAIN = 7, 645 648 SCALABLEMAIN10 = 8, 649 #if SCALABLE_REXT 650 SCALABLEREXT = 10 651 #endif 646 652 #endif 647 653 }; -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1464 r1487 681 681 } 682 682 683 #if SCALABLE_REXT 684 Void TDecCavlc::parseSPS(TComSPS* pcSPS, ParameterSetManager* pcParamSetManager) 685 #else 683 686 Void TDecCavlc::parseSPS(TComSPS* pcSPS) 687 #endif 684 688 { 685 689 #if ENC_DEC_TRACE … … 689 693 UInt uiCode; 690 694 READ_CODE( 4, uiCode, "sps_video_parameter_set_id"); pcSPS->setVPSId ( uiCode ); 691 695 #if SCALABLE_REXT 696 const TComVPS* pTmpVPS = pcParamSetManager->getVPS(pcSPS->getVPSId()); 697 #endif 692 698 #if SVC_EXTENSION 693 699 UInt uiTmp = 0; … … 742 748 pcSPS->setUpdateRepFormatIndex(uiCode); 743 749 } 750 #if SCALABLE_REXT 751 // If update_rep_format_flag is equal to 0, the variable repFormatIdx is set equal to vps_rep_format_idx[ LayerIdxInVps[ layerIdCurr ] ]. 752 else 753 { 754 Int iVPSRepFormatIdx = pTmpVPS->getVpsRepFormatIdx( pTmpVPS->getLayerIdxInVps( pcSPS->getLayerId() ) ); 755 pcSPS->setUpdateRepFormatIndex( iVPSRepFormatIdx ); 756 757 pcSPS->setChromaFormatIdc( pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getChromaFormatVpsIdc() ); 758 pcSPS->setPicWidthInLumaSamples( pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getPicWidthVpsInLumaSamples() ); 759 pcSPS->setPicHeightInLumaSamples( pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getPicHeightVpsInLumaSamples() ); 760 pcSPS->setBitDepth(CHANNEL_TYPE_LUMA, pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getBitDepthVpsLuma() ); 761 pcSPS->setBitDepth(CHANNEL_TYPE_CHROMA, pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getBitDepthVpsChroma() ); 762 Window &conf = pcSPS->getConformanceWindow(); 763 conf.setWindowLeftOffset( pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowLeftOffset() ); 764 conf.setWindowRightOffset( pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowRightOffset() ); 765 conf.setWindowTopOffset( pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowTopOffset() ); 766 conf.setWindowBottomOffset( pTmpVPS->getVpsRepFormat(iVPSRepFormatIdx)->getConformanceWindowVps().getWindowBottomOffset() ); 767 } 768 #endif 744 769 } 745 770 else … … 2166 2191 2167 2192 if (ptl->getProfileIdc() == Profile::MAINREXT || ptl->getProfileCompatibilityFlag(Profile::MAINREXT) || 2168 ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT || ptl->getProfileCompatibilityFlag(Profile::HIGHTHROUGHPUTREXT)) 2193 ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT || ptl->getProfileCompatibilityFlag(Profile::HIGHTHROUGHPUTREXT 2194 #if SCALABLE_REXT 2195 || ptl->getProfileIdc() == Profile::SCALABLEREXT 2196 #endif 2197 )) 2169 2198 { 2170 2199 UInt maxBitDepth=16; … … 2979 3008 ProfileTierLevel* ptl = vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL(); 2980 3009 numIncludedLayers++; 3010 #if SCALABLE_REXT 3011 // if scalable profile is Scalable Main 10 or Scalable Rext, dimension_id = 2 3012 const Profile::Name profileName = ( ptl->getProfileIdc() == Profile::SCALABLEMAIN10 || ptl->getProfileIdc() == Profile::SCALABLEREXT ) ? Profile::SCALABLEMAIN : ptl->getProfileIdc(); 3013 #else 2981 3014 const Profile::Name profileName = ptl->getProfileIdc() == Profile::SCALABLEMAIN10 ? Profile::SCALABLEMAIN : ptl->getProfileIdc(); 3015 #endif 2982 3016 2983 3017 for( Int p = 0; p < profiles.size(); p++ ) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r1295 r1487 76 76 Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); 77 77 Void parseVPS ( TComVPS* pcVPS ); 78 #if SCALABLE_REXT 79 Void parseSPS ( TComSPS* pcSPS, ParameterSetManager* pcParamSetManager ); 80 #else 78 81 Void parseSPS ( TComSPS* pcSPS ); 82 #endif 79 83 #if !SVC_EXTENSION 80 84 Void parsePPS ( TComPPS* pcPPS ); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecEntropy.h
r1295 r1487 70 70 71 71 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 72 #if SCALABLE_REXT 73 virtual Void parseSPS ( TComSPS* pcSPS, ParameterSetManager* pcParamSetManager ) = 0; 74 #else 72 75 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; 76 #endif 73 77 #if CGS_3D_ASYMLUT 74 78 virtual Void parsePPS ( TComPPS* pcPPS, TCom3DAsymLUT * pc3DAsymLUT , Int nLayerID ) = 0; … … 143 147 144 148 Void decodeVPS ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); } 149 #if SCALABLE_REXT 150 Void decodeSPS ( TComSPS* pcSPS, ParameterSetManager* pcParamSetManager ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, pcParamSetManager); } 151 #else 145 152 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 153 #endif 146 154 147 155 #if CGS_3D_ASYMLUT -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h
r1295 r1487 78 78 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); } 79 79 Void parseVPS ( TComVPS* /*pcVPS*/ ) {} 80 #if SCALABLE_REXT 81 Void parseSPS (TComSPS* /*pcSPS*/, ParameterSetManager* /*pcParamSetManager*/ ) {} 82 #else 80 83 Void parseSPS ( TComSPS* /*pcSPS*/ ) {} 84 #endif 81 85 #if CGS_3D_ASYMLUT 82 86 Void parsePPS ( TComPPS* /*pcPPS*/, TCom3DAsymLUT * /*pc3DAsymLUT*/, Int /*nLayerID*/ ) {} -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1486 r1487 1939 1939 sps->setLayerId(m_layerId); 1940 1940 #endif 1941 #if SCALABLE_REXT 1942 m_cEntropyDecoder.decodeSPS( sps, &m_parameterSetManager ); 1943 #else 1941 1944 m_cEntropyDecoder.decodeSPS( sps ); 1945 #endif 1942 1946 m_parameterSetManager.storeSPS(sps, naluData); 1943 1947 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp
r1440 r1487 218 218 if( rCuboidColorInfo.N > 0 ) 219 219 { 220 #if SCALABLE_REXT 221 dErrorLuma += xCalEstPelDist( rCuboidColorInfo.N , rCuboidColorInfo.Ys , rCuboidColorInfo.Yy , rCuboidColorInfo.Yu , rCuboidColorInfo.Yv , rCuboidColorInfo.ys , rCuboidColorInfo.us , rCuboidColorInfo.vs , rCuboidColorInfo.yy , rCuboidColorInfo.yu , rCuboidColorInfo.yv , rCuboidColorInfo.uu , rCuboidColorInfo.uv , rCuboidColorInfo.vv , rCuboidColorInfo.YY , 222 rCuboid.P[0].Y , rCuboid.P[1].Y , rCuboid.P[2].Y , rCuboid.P[3].Y ); 223 #else 220 224 dErrorLuma += xCalEstDist( rCuboidColorInfo.N , rCuboidColorInfo.Ys , rCuboidColorInfo.Yy , rCuboidColorInfo.Yu , rCuboidColorInfo.Yv , rCuboidColorInfo.ys , rCuboidColorInfo.us , rCuboidColorInfo.vs , rCuboidColorInfo.yy , rCuboidColorInfo.yu , rCuboidColorInfo.yv , rCuboidColorInfo.uu , rCuboidColorInfo.uv , rCuboidColorInfo.vv , rCuboidColorInfo.YY , 221 225 rCuboid.P[0].Y , rCuboid.P[1].Y , rCuboid.P[2].Y , rCuboid.P[3].Y ); 226 #endif 222 227 } 223 228 if( rCuboidColorInfoC.N > 0 ) 224 229 { 230 #if SCALABLE_REXT 231 dErrorChroma += xCalEstPelDist( rCuboidColorInfoC.N , rCuboidColorInfoC.Us , rCuboidColorInfoC.Uy , rCuboidColorInfoC.Uu , rCuboidColorInfoC.Uv , rCuboidColorInfoC.ys , rCuboidColorInfoC.us , rCuboidColorInfoC.vs , rCuboidColorInfoC.yy , rCuboidColorInfoC.yu , rCuboidColorInfoC.yv , rCuboidColorInfoC.uu , rCuboidColorInfoC.uv , rCuboidColorInfoC.vv , rCuboidColorInfoC.UU , 232 rCuboid.P[0].U , rCuboid.P[1].U , rCuboid.P[2].U , rCuboid.P[3].U ); 233 dErrorChroma += xCalEstPelDist( rCuboidColorInfoC.N , rCuboidColorInfoC.Vs , rCuboidColorInfoC.Vy , rCuboidColorInfoC.Vu , rCuboidColorInfoC.Vv , rCuboidColorInfoC.ys , rCuboidColorInfoC.us , rCuboidColorInfoC.vs , rCuboidColorInfoC.yy , rCuboidColorInfoC.yu , rCuboidColorInfoC.yv , rCuboidColorInfoC.uu , rCuboidColorInfoC.uv , rCuboidColorInfoC.vv , rCuboidColorInfoC.VV , 234 rCuboid.P[0].V , rCuboid.P[1].V , rCuboid.P[2].V , rCuboid.P[3].V ); 235 #else 225 236 dErrorChroma += xCalEstDist( rCuboidColorInfoC.N , rCuboidColorInfoC.Us , rCuboidColorInfoC.Uy , rCuboidColorInfoC.Uu , rCuboidColorInfoC.Uv , rCuboidColorInfoC.ys , rCuboidColorInfoC.us , rCuboidColorInfoC.vs , rCuboidColorInfoC.yy , rCuboidColorInfoC.yu , rCuboidColorInfoC.yv , rCuboidColorInfoC.uu , rCuboidColorInfoC.uv , rCuboidColorInfoC.vv , rCuboidColorInfoC.UU , 226 237 rCuboid.P[0].U , rCuboid.P[1].U , rCuboid.P[2].U , rCuboid.P[3].U ); 227 238 dErrorChroma += xCalEstDist( rCuboidColorInfoC.N , rCuboidColorInfoC.Vs , rCuboidColorInfoC.Vy , rCuboidColorInfoC.Vu , rCuboidColorInfoC.Vv , rCuboidColorInfoC.ys , rCuboidColorInfoC.us , rCuboidColorInfoC.vs , rCuboidColorInfoC.yy , rCuboidColorInfoC.yu , rCuboidColorInfoC.yv , rCuboidColorInfoC.uu , rCuboidColorInfoC.uv , rCuboidColorInfoC.vv , rCuboidColorInfoC.VV , 228 239 rCuboid.P[0].V , rCuboid.P[1].V , rCuboid.P[2].V , rCuboid.P[3].V ); 240 #endif 229 241 } 230 242 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.h
r1440 r1487 175 175 176 176 inline Double xCalEstDist( Double N, Double Ys, Double Yy, Double Yu, Double Yv, Double ys, Double us, Double vs, Double yy, Double yu, Double yv, Double uu, Double uv, Double vv, Double YY, Double a, Double b, Double c, Double d ); 177 177 #if SCALABLE_REXT 178 /* 179 former xCalEstDist(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Pel, Pel, Pel, Pel) 180 replaced by this fucntion because behaving differently than other xCalEstDist and was conflicting with xCalEstDist when RExt__HIGH_BIT_DEPTH_SUPPORT = 1 181 */ 182 inline Double xCalEstPelDist( Double N, Double Ys, Double Yy, Double Yu, Double Yv, Double ys, Double us, Double vs, Double yy, Double yu, Double yv, Double uu, Double uv, Double vv, Double YY, Pel nP0, Pel nP1, Pel nP3, Pel nP7 ); 183 #else 178 184 inline Double xCalEstDist( Double N, Double Ys, Double Yy, Double Yu, Double Yv, Double ys, Double us, Double vs, Double yy, Double yu, Double yv, Double uu, Double uv, Double vv, Double YY, Pel nP0, Pel nP1, Pel nP3, Pel nP7 ); 179 185 #endif 180 186 #if R0179_ENC_OPT_3DLUT_SIZE 181 187 Void xConsolidateData( SLUTSize *pCurLUTSize, SLUTSize *pMaxLUTSize ); … … 202 208 }; 203 209 204 Double TEnc3DAsymLUT::xCalEstDist( Double N, Double Ys, Double Yy, Double Yu, Double Yv, Double ys, Double us, Double vs, Double yy, Double yu, Double yv, Double uu, Double uv, Double vv, Double YY, Pel nP0, Pel nP1, Pel nP3, Pel nP7 ) 210 211 #if SCALABLE_REXT 212 /* 213 former xCalEstDist(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Pel, Pel, Pel, Pel) 214 replaced by this fucntion because behaving differently than other xCalEstDist and was conflicting with xCalEstDist when RExt__HIGH_BIT_DEPTH_SUPPORT = 1 215 */ 216 Double TEnc3DAsymLUT::xCalEstPelDist( Double N, Double Ys, Double Yy, Double Yu, Double Yv, Double ys, Double us, Double vs, Double yy, Double yu, Double yv, Double uu, Double uv, Double vv, Double YY, Pel nP0, Pel nP1, Pel nP3, Pel nP7 ) 205 217 { 206 218 const Int nOne = xGetNormCoeffOne(); … … 212 224 return( dError ); 213 225 }; 214 215 #endif 216 217 #endif 226 #else 227 Double TEnc3DAsymLUT::xCalEstDist( Double N, Double Ys, Double Yy, Double Yu, Double Yv, Double ys, Double us, Double vs, Double yy, Double yu, Double yv, Double uu, Double uv, Double vv, Double YY, Pel nP0, Pel nP1, Pel nP3, Pel nP7 ) 228 { 229 const Int nOne = xGetNormCoeffOne(); 230 Double a = 1.0 * nP0 / nOne; 231 Double b = 1.0 * nP1 / nOne; 232 Double c = 1.0 * nP3 / nOne; 233 Double d = nP7; 234 Double dError = N * d * d + 2 * b * c * uv + 2 * a * c * yv + 2 * a * b * yu - 2 * c * Yv - 2 * b * Yu - 2 * a * Yy + 2 * c * d * vs + 2 * b * d * us + 2 * a * d * ys + a * a * yy + c * c * vv + b * b * uu - 2 * d * Ys + YY; 235 return( dError ); 236 }; 237 #endif 238 239 #endif 240 241 #endif -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1464 r1487 1412 1412 WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), PTL_TRACE_TEXT("frame_only_constraint_flag" )); 1413 1413 1414 if (ptl->getProfileIdc() == Profile::MAINREXT || ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT ) 1414 if (ptl->getProfileIdc() == Profile::MAINREXT || ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT 1415 #if SCALABLE_REXT 1416 || ptl->getProfileIdc() == Profile::SCALABLEREXT 1417 #endif 1418 ) 1415 1419 { 1416 1420 const UInt bitDepthConstraint=ptl->getBitDepthConstraint(); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1483 r1487 5960 5960 TComMv& rcMvHalf, 5961 5961 TComMv& rcMvQter, 5962 UInt& ruiCost ) 5962 #if SCALABLE_REXT 5963 Distortion& ruiCost ) 5964 #else 5965 UInt& ruiCost ) 5966 #endif 5963 5967 { 5964 5968 assert(pcMvInt->getHor() == 0 && pcMvInt->getVer() == 0); … … 5995 5999 UInt uiLastMode = 0; 5996 6000 6001 #if SCALABLE_REXT 6002 Distortion uiCost[2] = { MAX_UINT, MAX_UINT }; //uni, rdCost 6003 Distortion uiCostTemp; 6004 Distortion biPDistTemp = MAX_INT; 6005 #else 5997 6006 UInt uiCost[2] = { MAX_UINT, MAX_UINT }; //uni, rdCost 5998 6007 UInt uiCostTemp; 5999 6008 UInt biPDistTemp = MAX_INT; 6009 #endif 6000 6010 UInt uiBitsTemp; 6001 6011 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h
r1469 r1487 480 480 TComMv& rcMvHalf, 481 481 TComMv& rcMvQter, 482 #if SCALABLE_REXT 483 Distortion& ruiCost ); 484 #else 482 485 UInt& ruiCost ); 486 #endif 483 487 #endif //SVC_EXTENSION 484 488
Note: See TracChangeset for help on using the changeset viewer.