Changeset 684 in SHVCSoftware for branches/SHM-6-dev
- Timestamp:
- 16 Apr 2014, 02:23:24 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h
r680 r684 1891 1891 #endif 1892 1892 #if Q0048_CGS_3D_ASYMLUT 1893 Int getCGSFlag() { return m_nCGSFlag; }1894 Void setCGSFlag(Int n) { m_nCGSFlag = n; }1893 Int getCGSFlag() { return m_nCGSFlag; } 1894 Void setCGSFlag(Int n) { m_nCGSFlag = n; } 1895 1895 Int getCGSOutputBitDepthY() { return m_nCGSOutputBitDepthY; } 1896 1896 Void setCGSOutputBitDepthY(Int n){ m_nCGSOutputBitDepthY = n; } -
branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
r683 r684 86 86 #define O0194_JOINT_US_BITSHIFT 1 ///< JCTVC-O0194: Joint Upsampling and bit-shift 87 87 #endif 88 #define Q0048_CGS_3D_ASYMLUT 1 88 #define Q0048_CGS_3D_ASYMLUT 1 ///< JCTVC-Q0048: Colour gamut scalability with look-up table 89 89 #if Q0048_CGS_3D_ASYMLUT 90 90 #define O0194_WEIGHTED_PREDICTION_CGS 0 -
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecEntropy.h
r677 r684 145 145 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 146 146 #endif 147 Void decodePPS ( TComPPS* pcPPS 147 148 148 #if Q0048_CGS_3D_ASYMLUT 149 , TCom3DAsymLUT * pc3DAsymLUT , Int nLayerID 149 Void decodePPS ( TComPPS* pcPPS, TCom3DAsymLUT * pc3DAsymLUT, Int nLayerID ) { m_pcEntropyDecoderIf->parsePPS(pcPPS, pc3DAsymLUT , nLayerID ); } 150 #else 151 Void decodePPS ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS ); } 150 152 #endif 151 ) { m_pcEntropyDecoderIf->parsePPS(pcPPS152 #if Q0048_CGS_3D_ASYMLUT153 , pc3DAsymLUT , nLayerID154 #endif155 ); }156 153 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager); } 157 154 -
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecTop.cpp
r683 r684 1553 1553 { 1554 1554 if(!m_pColorMappedPic) 1555 { 1555 1556 initAsymLut(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)); 1557 } 1556 1558 m_c3DAsymLUTPPS.colorMapping( pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), m_pColorMappedPic ); 1557 1559 pBaseColRec = m_pColorMappedPic; … … 1561 1563 if( pcPic->isSpatialEnhLayer(refLayerIdc) ) 1562 1564 { 1563 /*#if O0098_SCALED_REF_LAYER_ID1564 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));1565 #else1566 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);1567 #endif*/1568 1565 #if O0215_PHASE_ALIGNMENT 1569 1566 #if O0194_JOINT_US_BITSHIFT -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEnc3DAsymLUT.cpp
r683 r684 28 28 { 29 29 if( m_pColorInfo != NULL ) 30 { 30 31 destroy(); 32 } 33 31 34 TCom3DAsymLUT::create( nMaxOctantDepth , nInputBitDepth , nInputBitDepthC, nOutputBitDepth , nOutputBitDepthC, nMaxYPartNumLog2 ); 32 35 xAllocate3DArray( m_pColorInfo , xGetYSize() , xGetUSize() , xGetVSize() ); … … 48 51 { 49 52 if( m_dTotalFrameBit != 0 ) 53 { 50 54 printf( "\nTotal CGS bit: %d, %.2lf%%" , m_nTotalCGSBit , m_nTotalCGSBit * 100 / m_dTotalFrameBit ); 55 } 56 51 57 destroy(); 52 58 } … … 95 101 Int nP3 = Clip3( nMin , nMax , nP1 + nDeltaP13 ); 96 102 Int nP7 = Clip3( nMin , nMax , nP3 + nDeltaP37 ); 97 if ( nP0 & nMask ) 103 if ( nP0 & nMask ) 104 { 98 105 nP0 -= ( nP0 & nMask ); 99 if ( nP1 & nMask ) 106 } 107 if ( nP1 & nMask ) 108 { 100 109 nP1 -= ( nP1 & nMask ); 101 if ( nP3 & nMask ) 110 } 111 if ( nP3 & nMask ) 112 { 102 113 nP3 -= ( nP3 & nMask ); 103 if ( nP7 & nMask ) 114 } 115 if ( nP7 & nMask ) 116 { 104 117 nP7 -= ( nP7 & nMask ); 118 } 105 119 assert( !( nP0 & nMask ) && !( nP1 & nMask ) && !( nP3 & nMask ) && !( nP7 & nMask ) ); 106 120 Double dError = xxCalEstDist( N , Ys , Yy , Yu , Yv , ys , us , vs , yy , yu , yv , uu , uv , vv , YY , y0 , u0 , v0 , nLengthY , nLengthUV , nP0 , nP1 , nP3 , nP7 ); … … 154 168 y0 , u0 , v0 , nLengthY , nLengthUV , rCuboid.P[0].V , rCuboid.P[1].V , rCuboid.P[2].V , rCuboid.P[3].V ); 155 169 } 156 }170 } 157 171 } 158 172 } … … 184 198 } 185 199 else 200 { 186 201 break; 202 } 187 203 } 188 204 setResQuantBit( nBestResQuanBit ); 189 205 xSaveCuboids( m_pBestEncCuboid ); 206 190 207 return( dCurError ); 191 208 } … … 211 228 Int v0 = vIdx << xGetVShift2Idx(); 212 229 for( Int idxVertex = 0 ; idxVertex < 4 ; idxVertex++ ) 230 { 213 231 rCuboid.P[idxVertex] = xGetCuboidVertexPredAll( yIdx , uIdx , vIdx , idxVertex , pCurCuboid ); 232 } 214 233 215 234 if( rCuboidColorInfo.N > 0 ) … … 389 408 Int nPartNumLog2 = 4; 390 409 if( pSlice->getBaseColPic( pSlice->getInterLayerPredLayerIdc( 0 ) )->getSlice( 0 )->isIntra() ) 410 { 391 411 nPartNumLog2 = xGetMaxPartNumLog2(); 412 } 392 413 if( m_nPrevFrameBit[nSliceType][nSliceTempLevel] && pSlice->getPPS()->getCGSFlag() ) 393 414 { -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCfg.h
r677 r684 911 911 #endif 912 912 #if Q0048_CGS_3D_ASYMLUT 913 Void setCGSFlag(Int n) { m_nCGSFlag = n; }914 Int getCGSFlag() { return m_nCGSFlag; }915 Void setCGSMaxOctantDepth(Int n) { m_nCGSMaxOctantDepth = n; }916 Int getCGSMaxOctantDepth() { return m_nCGSMaxOctantDepth; }913 Void setCGSFlag(Int n) { m_nCGSFlag = n; } 914 Int getCGSFlag() { return m_nCGSFlag; } 915 Void setCGSMaxOctantDepth(Int n) { m_nCGSMaxOctantDepth = n; } 916 Int getCGSMaxOctantDepth() { return m_nCGSMaxOctantDepth; } 917 917 Void setCGSMaxYPartNumLog2(Int n) { m_nCGSMaxYPartNumLog2 = n; } 918 918 Int getCGSMaxYPartNumLog2() { return m_nCGSMaxYPartNumLog2; } 919 Void setCGSLUTBit(Int n) { m_nCGSLUTBit = n; }920 Int getCGSLUTBit() { return m_nCGSLUTBit; }919 Void setCGSLUTBit(Int n) { m_nCGSLUTBit = n; } 920 Int getCGSLUTBit() { return m_nCGSLUTBit; } 921 921 #endif 922 922 #endif -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
r677 r684 79 79 } 80 80 81 Void TEncEntropy::encodePPS( TComPPS* pcPPS82 81 #if Q0048_CGS_3D_ASYMLUT 83 , TEnc3DAsymLUT * pc3DAsymLUT 82 Void TEncEntropy::encodePPS( TComPPS* pcPPS, TEnc3DAsymLUT * pc3DAsymLUT ) 83 { 84 m_pcEntropyCoderIf->codePPS( pcPPS, pc3DAsymLUT ); 85 return; 86 } 87 #else 88 Void TEncEntropy::encodePPS( TComPPS* pcPPS ) 89 { 90 m_pcEntropyCoderIf->codePPS( pcPPS ); 91 return; 92 } 84 93 #endif 85 )86 {87 m_pcEntropyCoderIf->codePPS( pcPPS88 #if Q0048_CGS_3D_ASYMLUT89 , pc3DAsymLUT90 #endif91 );92 return;93 }94 94 95 95 Void TEncEntropy::encodeSPS( TComSPS* pcSPS ) -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r683 r684 981 981 if( pcPic->isSpatialEnhLayer(refLayerIdc)) 982 982 { 983 /*#if O0098_SCALED_REF_LAYER_ID984 Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));985 #else986 Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);987 #endif*/988 983 #if P0312_VERT_PHASE_ADJ 989 984 //when PhasePositionEnableFlag is equal to 1, set vertPhasePositionFlag to 0 if BL is top field and 1 if bottom … … 3432 3427 #if Q0048_CGS_3D_ASYMLUT 3433 3428 pcPic->setFrameBit( (Int)uibits ); 3434 if( m_layerId && pcSlice->getPPS()->getCGSFlag()) 3429 if( m_layerId && pcSlice->getPPS()->getCGSFlag() ) 3430 { 3435 3431 m_Enc3DAsymLUTPicUpdate.updatePicCGSBits( pcSlice , m_Enc3DAsymLUTPPS.getPPSBit() ); 3432 } 3436 3433 #endif 3437 3434 } … … 4159 4156 pSlice->setCGSOverWritePPS( dErrorUpdatedPPS < dFactor * dErrorPPS ); 4160 4157 if( pSlice->getCGSOverWritePPS() ) 4158 { 4161 4159 m_Enc3DAsymLUTPPS.copy3DAsymLUT( &m_Enc3DAsymLUTPicUpdate ); 4160 } 4162 4161 } 4163 4162 pSlice->getPPS()->setCGSOutputBitDepthY( m_Enc3DAsymLUTPPS.getOutputBitDepthY() );
Note: See TracChangeset for help on using the changeset viewer.