Changeset 313 in 3DVCSoftware for trunk/source/Lib
- Timestamp:
- 20 Mar 2013, 21:35:14 (12 years ago)
- Location:
- trunk/source/Lib
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r296 r313 81 81 UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int* iVSPIndexTrue, Int mrgCandIdx, DisInfo* pDInfo ) 82 82 { 83 #if MERL_VSP_C0152_BugFix_ForNoDepthCase 84 TComPic* pRefPicBaseDepth = NULL; 85 pRefPicBaseDepth = getSlice()->getRefPicBaseDepth(); 86 if(ucVspMergePos == VSP_MERGE_POS && pRefPicBaseDepth) //VSP can be used only when depth is used as input 87 #else 88 if( ucVspMergePos == VSP_MERGE_POS ) 89 #endif 83 90 if( ucVspMergePos == VSP_MERGE_POS ) 84 91 { … … 3596 3603 #if H3D_IVMP 3597 3604 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 3605 #if FCO_FIX 3606 const Int extraMergeCand = ( ( ( getSlice()->getIsDepth() && m_pcSlice->getTexturePic() ) || getSlice()->getSPS()->getMultiviewMvPredMode() )? 1 : 0 ); 3607 #else 3598 3608 const Int extraMergeCand = ( ( getSlice()->getIsDepth() || getSlice()->getSPS()->getMultiviewMvPredMode() )? 1 : 0 ); 3609 #endif 3599 3610 #else 3600 3611 const Int extraMergeCand = ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); … … 3651 3662 if(!bNoPdmMerge) 3652 3663 { 3664 #if FCO_DVP_REFINE_C0132_C0170 3665 if( !getPic()->getDepthCoded() ) 3666 #endif 3653 3667 getDisMvpCandNBDV(uiPUIdx, uiAbsPartIdx, &cDisInfo , true 3654 3668 #if MERL_VSP_C0152 … … 3657 3671 ); 3658 3672 } 3673 #if FCO_DVP_REFINE_C0132_C0170 3674 if(getPic()->getDepthCoded() ) 3675 { 3676 TComPic* pcCodedDepthMap = getPic()->getRecDepthMap(); 3677 TComMv cColMv; 3678 3679 cColMv.setZero(); 3680 estimateDVFromDM(uiPUIdx, pcCodedDepthMap, uiAbsPartIdx, &cColMv, false); 3681 3682 cDisInfo.iN = 1; 3683 cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() ); 3684 cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() ); 3685 cDisInfo.m_aVIdxCan[0] = 0; 3686 3687 } 3688 #endif 3659 3689 if(cDisInfo.iN==0) 3660 3690 { … … 3669 3699 3670 3700 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 3701 #if FCO_FIX 3702 if( m_pcSlice->getIsDepth() && m_pcSlice->getTexturePic() ) 3703 #else 3671 3704 if( m_pcSlice->getIsDepth()) 3705 #endif 3672 3706 { 3673 3707 UInt uiPartIdxCenter; … … 5140 5174 Int width = pcBaseViewDepthPicYuv->getWidth(); 5141 5175 Int height = pcBaseViewDepthPicYuv->getHeight(); 5142 5176 #if MTK_DVPREFINE_BVSP_BUG_FIX 5177 Int depthPosX = Clip3(0, width - iWidth, iBlkX + (mv->getHor()>>2)); 5178 Int depthPosY = Clip3(0, height - iHeight, iBlkY + (mv->getVer()>>2)); 5179 #else 5143 5180 Int depthPosX = Clip3(0, width - iWidth - 1, iBlkX + (mv->getHor()>>2)); 5144 5181 Int depthPosY = Clip3(0, height- iHeight - 1, iBlkY + (mv->getVer()>>2)); 5145 5182 #endif 5146 5183 Pel *depth = pcBaseViewDepthPicYuv->getLumaAddr() + depthPosX + depthPosY * depStride; 5147 5184 Pel maxDepth = 0; … … 5149 5186 if ( bSimpleDvpRefine ) 5150 5187 { 5188 #if MTK_DVPREFINE_BVSP_BUG_FIX 5189 Int depthStartPosX = Clip3(0, width - iWidth, iBlkX + (mv->getHor()>>2)); 5190 Int depthStartPosY = Clip3(0, height - iHeight, iBlkY + (mv->getVer()>>2)); 5191 Int depthEndPosX = Clip3(0, width - 1, iBlkX + iWidth - 1 + (mv->getHor()>>2)); 5192 Int depthEndPosY = Clip3(0, height - 1, iBlkY + iHeight - 1 + (mv->getVer()>>2)); 5193 #else 5151 5194 Int depthStartPosX = Clip3(0, width - iWidth - 1, iBlkX + (mv->getHor()>>2)); 5152 5195 Int depthStartPosY = Clip3(0, height- iHeight - 1, iBlkY + (mv->getVer()>>2)); 5153 5196 Int depthEndPosX = Clip3(0, width - iWidth - 1, iBlkX + iWidth + (mv->getHor()>>2)); 5154 5197 Int depthEndPosY = Clip3(0, height- iHeight - 1, iBlkY + iHeight + (mv->getVer()>>2)); 5198 #endif 5155 5199 Int iCenterX = (depthStartPosX + depthEndPosX) >> 1; 5156 5200 Int iCenterY = (depthStartPosY + depthEndPosY) >> 1; … … 6079 6123 DisInfo cDisInfo; 6080 6124 cDisInfo.iN = 0; 6125 #if FCO_DVP_REFINE_C0132_C0170 6126 if( !getPic()->getDepthCoded() ) 6127 #endif 6081 6128 getDisMvpCandNBDV(uiPartIdx, uiPartAddr, &cDisInfo, false 6082 6129 #if MERL_VSP_C0152 … … 6084 6131 #endif 6085 6132 ); 6133 #if FCO_DVP_REFINE_C0132_C0170 6134 if(getPic()->getDepthCoded() ) 6135 { 6136 TComPic* pcCodedDepthMap = getPic()->getRecDepthMap(); 6137 TComMv cColMv; 6138 6139 cColMv.setZero(); 6140 estimateDVFromDM(uiPartIdx, pcCodedDepthMap, uiPartAddr, &cColMv, false); 6141 6142 cDisInfo.iN = 1; 6143 cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() ); 6144 cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() ); 6145 cDisInfo.m_aVIdxCan[0] = 0; 6146 } 6147 #endif 6086 6148 if(cDisInfo.iN==0) 6087 6149 { … … 7921 7983 PartSize m_peSaved = getPartitionSize( 0 ); 7922 7984 m_pePartSize[0] = SIZE_2Nx2N; 7985 #if FCO_DVP_REFINE_C0132_C0170 7986 if(getPic()->getDepthCoded() ) 7987 { 7988 TComPic* pcCodedDepthMap = getPic()->getRecDepthMap(); 7989 TComMv cColMv; 7990 7991 cColMv.setZero(); 7992 estimateDVFromDM(0, pcCodedDepthMap, 0, &cColMv, false); 7993 7994 cDisInfo.iN = 1; 7995 cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() ); 7996 cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() ); 7997 cDisInfo.m_aVIdxCan[0] = 0; 7998 7999 } 8000 else 8001 #endif 7923 8002 getDisMvpCandNBDV( 0, 0, &cDisInfo, false ); 7924 8003 if( cDisInfo.iN == 0) -
trunk/source/Lib/TLibCommon/TComPic.cpp
r296 r313 59 59 #endif 60 60 #endif 61 #if FCO_DVP_REFINE_C0132_C0170 62 m_bDepthCoded = false; 63 m_pcRecDepthMap = NULL; 64 #endif 61 65 #if H3D_IVMP 62 66 m_pcOrgDepthMap = NULL; -
trunk/source/Lib/TLibCommon/TComPic.h
r296 r313 73 73 #endif 74 74 75 #if FCO_DVP_REFINE_C0132_C0170 76 Bool m_bDepthCoded; 77 TComPic* m_pcRecDepthMap; 78 #endif 79 75 80 #if LG_ZEROINTRADEPTHRESI_A0087 76 81 Int m_uiIntraPeriod; … … 171 176 Bool getCandPicCheckedFlag () { return m_checked;} 172 177 #endif 178 #endif 179 180 #if FCO_DVP_REFINE_C0132_C0170 181 void setRecDepthMap(TComPic * pRecPic) { m_pcRecDepthMap = pRecPic; } 182 TComPic * getRecDepthMap() { return m_pcRecDepthMap; } 183 void setDepthCoded(Bool flag) { m_bDepthCoded = flag; } 184 Bool getDepthCoded() { return m_bDepthCoded; } 173 185 #endif 174 186 -
trunk/source/Lib/TLibCommon/TComPicYuv.cpp
r56 r313 60 60 m_piPicOrgU = NULL; 61 61 m_piPicOrgV = NULL; 62 62 63 #if FIX_APPENCTOP_T_ONLY 64 m_cuOffsetY = NULL; 65 m_cuOffsetC = NULL; 66 m_buOffsetY = NULL; 67 m_buOffsetC = NULL; 68 #endif 69 63 70 m_bIsBorderExtended = false; 64 71 } … … 137 144 if( m_apiPicBufU ){ xFree( m_apiPicBufU ); m_apiPicBufU = NULL; } 138 145 if( m_apiPicBufV ){ xFree( m_apiPicBufV ); m_apiPicBufV = NULL; } 139 146 #if FIX_APPENCTOP_T_ONLY 147 if( m_cuOffsetY ) 148 { 149 #endif 140 150 delete[] m_cuOffsetY; 141 151 delete[] m_cuOffsetC; 142 152 delete[] m_buOffsetY; 143 153 delete[] m_buOffsetC; 154 #if FIX_APPENCTOP_T_ONLY 155 } 156 #endif 144 157 } 145 158 -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r296 r313 1066 1066 else 1067 1067 { 1068 #if FIX_LGE_WP_FOR_3D_C0223 1069 if ( ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType() == P_SLICE ) || 1070 ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() && pcCU->getSlice()->getSliceType() == B_SLICE ) ) 1071 #else 1068 1072 if ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() ) 1073 #endif 1069 1074 { 1070 1075 #if DEPTH_MAP_GENERATION … … 1100 1105 } 1101 1106 } 1102 1107 #if FIX_LGE_WP_FOR_3D_C0223 1108 if ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() && pcCU->getSlice()->getSliceType() == B_SLICE ) 1109 #else 1103 1110 if ( pcCU->getSlice()->getPPS()->getWPBiPredIdc() ) 1111 #endif 1104 1112 { 1105 1113 #if MERL_VSP_C0152 … … 1110 1118 xWeightedPredictionBi( pcCU, &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred ); 1111 1119 } 1120 #if FIX_LGE_WP_FOR_3D_C0223 1121 else if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType() == P_SLICE ) 1122 1123 { 1124 #if MERL_VSP_C0152 1125 if(pcCU->getVSPIndex(uiPartAddr)) 1126 m_acYuvPred[0].copyPartToPartYuv( rpcYuvPred, uiPartAddr, iWidth, iHeight ); 1127 else 1128 #endif 1129 xWeightedPredictionUni( pcCU, &m_acYuvPred[0], uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, rpcYuvPred, iPartIdx ); 1130 } 1131 #endif 1112 1132 else 1113 1133 { … … 1434 1454 Int dstStride = dstPic->getStride(); 1435 1455 Int depStride = pPicBaseDepth->getStride(); 1436 1456 #if MTK_DVPREFINE_BVSP_BUG_FIX 1457 Int depthPosX = Clip3(0, widthLuma - size_x, (posX/nTxtPerDepthX) + (mv->getHor()>>2)); 1458 Int depthPosY = Clip3(0, heightLuma- size_y, (posY/nTxtPerDepthY) + (mv->getVer()>>2)); 1459 #else 1437 1460 Int depthPosX = Clip3(0, widthLuma - size_x - 1, (posX/nTxtPerDepthX) + (mv->getHor()>>2)); 1438 1461 Int depthPosY = Clip3(0, heightLuma- size_y - 1, (posY/nTxtPerDepthY) + (mv->getVer()>>2)); 1439 1462 #endif 1440 1463 Pel *ref = refPic->getLumaAddr() + posX + posY * refStride; 1441 1464 Pel *dst = dstPic->getLumaAddr(partAddr); … … 1595 1618 depthPosX = posX * nDepthPerTxtX + (mv->getHor()>>2); //mv denotes the disparity for VSP 1596 1619 } 1620 #if MTK_DVPREFINE_BVSP_BUG_FIX 1621 depthPosX = Clip3(0, widthDepth - (size_x<<1), depthPosX); 1622 #else 1597 1623 depthPosX = Clip3(0, widthDepth - (size_x<<1) - 1, depthPosX); 1598 1624 #endif 1599 1625 if ( heightChroma > heightDepth ) 1600 1626 { … … 1609 1635 depthPosY = posY * nDepthPerTxtY + (mv->getVer()>>2); //mv denotes the disparity for VSP 1610 1636 } 1637 #if MTK_DVPREFINE_BVSP_BUG_FIX 1638 depthPosY = Clip3(0, heightDepth - (size_y<<1), depthPosY); 1639 #else 1611 1640 depthPosY = Clip3(0, heightDepth - (size_y<<1) - 1, depthPosY); 1641 #endif 1612 1642 1613 1643 Pel *refCb = refPic->getCbAddr() + posX + posY * refStride; -
trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp
r56 r313 81 81 wpScalingParam *wpCur = &(pcDtParam->wpCur[uiComp]); 82 82 Int w0 = wpCur->w, 83 84 85 86 83 offset = wpCur->offset, 84 shift = wpCur->shift, 85 round = wpCur->round; 86 87 87 UInt uiSum = 0; 88 88 #if HHI_INTERVIEW_SKIP 89 89 if( pcDtParam->pUsed ) 90 90 { 91 91 Pel* piUsed = pcDtParam->pUsed; 92 92 Int iStrideUsed = pcDtParam->iStrideUsed; 93 for( ; iRows != 0; iRows-- )94 {95 for (Int n = 0; n < iCols; n++ )96 {93 for( ; iRows != 0; iRows-- ) 94 { 95 for (Int n = 0; n < iCols; n++ ) 96 { 97 97 if( piUsed[n]) 98 98 { 99 pred = ( (w0*piCur[n] + round) >> shift ) + offset ; 100 //uiSum += abs( piOrg[n] - piCur[n] ); 101 uiSum += abs( piOrg[n] - pred ); 102 } 103 } 104 piOrg += iStrideOrg; 105 piCur += iStrideCur; 99 pred = ( (w0*piCur[n] + round) >> shift ) + offset ; 100 uiSum += abs( piOrg[n] - pred ); 101 } 102 } 103 piOrg += iStrideOrg; 104 piCur += iStrideCur; 106 105 piUsed += iStrideUsed; 107 } 108 #else 109 for( ; iRows != 0; iRows-- ) 110 { 111 for (Int n = 0; n < iCols; n++ ) 112 { 113 pred = ( (w0*piCur[n] + round) >> shift ) + offset ; 114 115 uiSum += abs( piOrg[n] - pred ); 116 } 117 piOrg += iStrideOrg; 118 piCur += iStrideCur; 119 } 120 #endif 121 #if HHI_INTERVIEW_SKIP 106 } 107 #if FIX_LGE_WP_FOR_3D_C0223 108 } 109 else 110 { 111 #endif 112 #if FIX_LGE_WP_FOR_3D_C0223 //comment of #else 113 //#else 114 #endif 115 #endif 116 for( ; iRows != 0; iRows-- ) 117 { 118 for (Int n = 0; n < iCols; n++ ) 119 { 120 pred = ( (w0*piCur[n] + round) >> shift ) + offset ; 121 uiSum += abs( piOrg[n] - pred ); 122 122 } 123 #endif 123 piOrg += iStrideOrg; 124 piCur += iStrideCur; 125 } 126 #if FIX_LGE_WP_FOR_3D_C0223 //comment of #endif 127 //#endif 128 #endif 129 #if HHI_INTERVIEW_SKIP 130 } 131 #endif 124 132 pcDtParam->uiComp = 255; // reset for DEBUG (assert test) 125 133 -
trunk/source/Lib/TLibCommon/TComResidualGenerator.cpp
r296 r313 614 614 Int iDesStrideC = pcYuv ->getCStride(); 615 615 #if MTK_RELEASE_DV_CONSTRAINT_C0129 616 #if FIX_CHROMA_RESIDUAL_C0129 617 Pel* pSrcSamplesU0= pcBaseRes->getCbAddr ( 0 ) + iCRefPosY0 * iSrcStrideC; 618 Pel* pSrcSamplesU1= pcBaseRes->getCbAddr ( 0 ) + iCRefPosY1 * iSrcStrideC; 619 Pel* pSrcSamplesV0= pcBaseRes->getCrAddr ( 0 ) + iCRefPosY0 * iSrcStrideC; 620 Pel* pSrcSamplesV1= pcBaseRes->getCrAddr ( 0 ) + iCRefPosY1 * iSrcStrideC; 621 #else 616 622 Pel* pSrcSamplesU0= pcBaseRes->getCbAddr ( 0 ) + ( iCRefPosY0 >> 1 ) * iSrcStrideC; 617 623 Pel* pSrcSamplesU1= pcBaseRes->getCbAddr ( 0 ) + ( iCRefPosY1 >> 1 ) * iSrcStrideC; 618 624 Pel* pSrcSamplesV0= pcBaseRes->getCrAddr ( 0 ) + ( iCRefPosY0 >> 1 ) * iSrcStrideC; 619 625 Pel* pSrcSamplesV1= pcBaseRes->getCrAddr ( 0 ) + ( iCRefPosY1 >> 1 ) * iSrcStrideC; 626 #endif 620 627 #else 621 628 Pel* pSrcSamplesU= pcBaseRes->getCbAddr ( 0 ) + ( uiYPos >> 1 ) * iSrcStrideC; -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r296 r313 1761 1761 1762 1762 Void 1763 #if FCO_FIX_SPS_CHANGE 1764 TComSPS::initMultiviewSPSDepth( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 1765 #else 1763 1766 TComSPS::initMultiviewSPSDepth( UInt uiViewId, Int iViewOrderIdx ) 1767 #endif 1764 1768 { 1765 1769 AOT( uiViewId == 0 && iViewOrderIdx != 0 ); … … 1769 1773 m_iViewOrderIdx = iViewOrderIdx; 1770 1774 m_bDepth = true; 1775 #if FCO_FIX_SPS_CHANGE 1776 m_uiCamParPrecision = ( m_uiViewId ? uiCamParPrecision : 0 ); 1777 m_bCamParInSliceHeader = ( m_uiViewId ? bCamParSlice : false ); 1778 #else 1771 1779 m_uiCamParPrecision = 0; 1772 1780 m_bCamParInSliceHeader = false; 1781 #endif 1773 1782 ::memset( m_aaiCodedScale, 0x00, sizeof( m_aaiCodedScale ) ); 1774 1783 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 1784 #if FCO_FIX_SPS_CHANGE 1785 #if !QC_MVHEVC_B0046 1786 if( !m_bCamParInSliceHeader ) 1787 { 1788 for( UInt uiBaseViewId = 0; uiBaseViewId < m_uiViewId; uiBaseViewId++ ) 1789 { 1790 m_aaiCodedScale [ 0 ][ uiBaseViewId ] = aaiScale [ uiBaseViewId ][ m_uiViewId ]; 1791 m_aaiCodedScale [ 1 ][ uiBaseViewId ] = aaiScale [ m_uiViewId ][ uiBaseViewId ]; 1792 m_aaiCodedOffset[ 0 ][ uiBaseViewId ] = aaiOffset[ uiBaseViewId ][ m_uiViewId ]; 1793 m_aaiCodedOffset[ 1 ][ uiBaseViewId ] = aaiOffset[ m_uiViewId ][ uiBaseViewId ]; 1794 } 1795 } 1796 #endif 1797 #endif 1798 1775 1799 } 1776 1800 -
trunk/source/Lib/TLibCommon/TComSlice.h
r296 r313 623 623 624 624 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 625 #if FCO_FIX_SPS_CHANGE 626 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 627 #else 625 628 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); 629 #endif 626 630 627 631 UInt getViewId () { return m_uiViewId; } -
trunk/source/Lib/TLibCommon/TypeDef.h
r296 r313 121 121 #define MTK_RELEASE_DV_CONSTRAINT_C0129 1 // JCT3V-C0129 122 122 #define MTK_SIMPLIFY_DVTC_C0135 1 // JCT3V-C0135 123 #define FIX_CHROMA_RESIDUAL_C0129 1 123 124 124 125 ///// ***** MOTION PARAMETER INHERITANCE ********* … … 166 167 #define HHI_DEPTH_INTRA_SEARCH_RAU_C0160 1 // JCT3V-C0160 change 1: full Intra search in depth random access units 167 168 #define FIX_POZNAN_CABAC_INIT_FLAG 1 169 #define FIX_LGE_WP_FOR_3D_C0223 1 // JCT3V-C0223 Weighted Prediction Bug-fix for 3D-HEVC. Caution! There is still crush using WP with Residual Prediction. 170 #define FIX_APPENCTOP_T_ONLY 1 // For Texture-only coding 168 171 169 172 ///// ***** FCO ********* … … 171 174 #if FLEX_CODING_ORDER_M23723 172 175 #define DISABLE_FCO_FOR_VSO 0 // Optional compile settings to disable VSO with FCO. 176 #define FCO_DVP_REFINE_C0132_C0170 0 // depth oriented disparity vector prediction from JCT3V-C0132 and JCT3V-C0170 177 #define FCO_FIX 0 // Bug fix for C0137 and C0152 on FCO 178 #define FCO_FIX_SPS_CHANGE 0 // Sending camera parameters in SPS of depth for depth to disparity conversion used by VSP and DoDVP 179 #else 180 #define DISABLE_FCO_FOR_VSO 0 // Optional compile settings to disable VSO with FCO. 181 #define FCO_DVP_REFINE_C0132_C0170 0 // depth oriented disparity vector prediction from JCT3V-C0132 and JCT3V-C0170 182 #define FCO_FIX 0 // Fixing bugs from HTM 6.0 which 183 #define FCO_FIX_SPS_CHANGE 0 // Fixing bugs from HTM 6.0 which 173 184 #endif 174 185 … … 176 187 #define MERL_VSP_C0152 1 // JCT3V-C0152: 1: enable VSP-related tools; 0: disable VSP-related tools 177 188 #if MERL_VSP_C0152 178 189 #define MERL_VSP_C0152_BugFix_ForNoDepthCase 1// MERL bugfix for test condition of no depth 179 190 /* 180 191 * Two macros are used to configure combinations of JCT3V-C0152 and JCT3V-C0131 … … 199 210 #define VSP_MERGE_POS 5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5. 200 211 #define LGE_SIMP_DVP_REFINE_C0112 1 // JCT3V-C0112: 1: simplification of refining disparity vector using a warped depth block 212 #define MTK_DVPREFINE_BVSP_BUG_FIX 1 201 213 202 214 #else // !MERL_VSP_C0152 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r296 r313 1501 1501 if( uiCode ) 1502 1502 { 1503 #if FCO_FIX_SPS_CHANGE 1504 UInt uiViewId, uiCamParPrecision; 1505 Int iVOI; 1506 Bool bCamParSlice; 1507 READ_UVLC( uiCode, "view_id" ); 1508 READ_SVLC( iCode, "view_order_idx" ); 1509 uiViewId = uiCode; 1510 iVOI = iCode; 1511 1512 if ( uiViewId == 0 ) 1513 { 1514 pcSPS->initMultiviewSPSDepth ( uiViewId, iVOI ); 1515 } 1516 else 1517 { 1518 READ_UVLC( uiCamParPrecision, "camera_parameter_precision" ); 1519 READ_FLAG( uiCode, "camera_parameter_in_slice_header" ); bCamParSlice = ( uiCode == 1 ); 1520 if( !bCamParSlice ) 1521 { 1522 for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ ) 1523 { 1524 READ_SVLC( iCode, "coded_scale" ); m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode; 1525 READ_SVLC( iCode, "coded_offset" ); m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode; 1526 READ_SVLC( iCode, "inverse_coded_scale_plus_coded_scale" ); m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ]; 1527 READ_SVLC( iCode, "inverse_coded_offset_plus_coded_offset" ); m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ]; 1528 } 1529 } 1530 pcSPS->initMultiviewSPSDepth( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 1531 1532 } 1533 #else 1503 1534 READ_UVLC( uiCode, "view_id" ); 1504 1535 READ_SVLC( iCode, "view_order_idx" ); 1505 1536 pcSPS->initMultiviewSPSDepth ( uiCode, iCode ); 1537 #endif 1506 1538 #if DEPTH_MAP_GENERATION 1539 #if FCO_FIX_SPS_CHANGE 1540 pcSPS->setPredDepthMapGeneration( uiViewId, true ); 1541 #else 1507 1542 pcSPS->setPredDepthMapGeneration( uiCode, true ); 1543 #endif 1508 1544 #endif 1509 1545 #if H3D_IVRP -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r296 r313 193 193 194 194 AOF( pcSlice->getSPS()->getViewId() < MAX_VIEW_NUM ); 195 #if !FCO_FIX // Under flexible coding order, depth may need the camera parameters 195 196 if ( pcSlice->getSPS()->isDepth () ) 196 197 { 197 198 return; 198 199 } 200 #endif 199 201 Bool bFirstAU = ( pcSlice->getPOC() == 0 ); 200 202 Bool bFirstSliceInAU = ( pcSlice->getPOC() != Int ( m_iLastPOC ) ); 201 203 Bool bFirstSliceInView = ( pcSlice->getSPS()->getViewId() != UInt( m_iLastViewId ) || bFirstSliceInAU ); 202 204 AOT( bFirstSliceInAU && pcSlice->getSPS()->getViewId() != 0 ); 205 #if FCO_FIX 206 #else 203 207 AOT( !bFirstSliceInAU && pcSlice->getSPS()->getViewId() < UInt( m_iLastViewId ) ); 208 #endif 204 209 AOT( !bFirstSliceInAU && pcSlice->getSPS()->getViewId() > UInt( m_iLastViewId + 1 ) ); 205 210 AOT( !bFirstAU && pcSlice->getSPS()->getViewId() > m_uiMaxViewId ); … … 1123 1128 } 1124 1129 1130 #if !FIX_LGE_WP_FOR_3D_C0223 1125 1131 if( pcSlice->getRefPicListCombinationFlag() && pcSlice->getPPS()->getWPBiPredIdc()==1 && pcSlice->getSliceType()==B_SLICE ) 1126 1132 { 1127 1133 pcSlice->setWpParamforLC(); 1128 1134 } 1135 #endif 1129 1136 pcSlice->setNoBackPredFlag( false ); 1130 1137 if ( pcSlice->getSliceType() == B_SLICE && !pcSlice->getRefPicListCombinationFlag()) … … 1171 1178 } 1172 1179 #endif 1180 1181 #if FCO_DVP_REFINE_C0132_C0170 1182 if(m_bFirstSliceInPicture) 1183 { 1184 pcPic->setDepthCoded(false); 1185 1186 if(m_viewId != 0) 1187 { 1188 if( m_isDepth == 0) 1189 { 1190 TComPic * recDepthMapBuffer; 1191 recDepthMapBuffer = m_tAppDecTop->getPicFromView( m_viewId, pcSlice->getPOC(), true ); 1192 pcPic->setRecDepthMap(recDepthMapBuffer); 1193 1194 if(recDepthMapBuffer != NULL) 1195 { 1196 pcPic->setDepthCoded(true); 1197 } 1198 } 1199 } 1200 } 1201 #endif 1202 1173 1203 1174 1204 #if MERL_VSP_C0152 // set BW LUT -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r296 r313 663 663 WRITE_UVLC( pcSPS->getViewId(), "view_id" ); 664 664 WRITE_SVLC( pcSPS->getViewOrderIdx(), "view_order_idx" ); 665 #if FCO_FIX_SPS_CHANGE 666 if ( pcSPS->getViewId() ) 667 { 668 WRITE_UVLC( pcSPS->getCamParPrecision(), "camera_parameter_precision" ); 669 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "camera_parameter_in_slice_header" ); 670 if( !pcSPS->hasCamParInSliceHeader() ) 671 { 672 for( UInt uiId = 0; uiId < pcSPS->getViewId(); uiId++ ) 673 { 674 WRITE_SVLC( pcSPS->getCodedScale ()[ uiId ], "coded_scale" ); 675 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiId ], "coded_offset" ); 676 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiId ] + pcSPS->getCodedScale ()[ uiId ], "inverse_coded_scale_plus_coded_scale" ); 677 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiId ] + pcSPS->getCodedOffset()[ uiId ], "inverse_coded_offset_plus_coded_offset" ); 678 } 679 } 680 } 681 #endif 665 682 } 666 683 else … … 1099 1116 } 1100 1117 #endif 1101 1118 1119 #if FIX_LGE_WP_FOR_3D_C0223 1120 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPredIdc() && pcSlice->getSliceType()==B_SLICE) ) 1121 #else 1102 1122 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPredIdc()==1 && pcSlice->getSliceType()==B_SLICE) ) 1123 #endif 1103 1124 { 1104 1125 xCodePredWeightTable( pcSlice ); -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r296 r313 726 726 m_uiStoredStartCUAddrForEncodingEntropySlice[uiStartCUAddrEntropySliceIdx++] = uiNextCUAddr; 727 727 728 #if FCO_DVP_REFINE_C0132_C0170 729 pcPic->setDepthCoded(false); 730 731 if(pcSlice->getViewId() != 0) 732 { 733 if(pcSlice->getSPS()->isDepth() == 0 ) 734 { 735 TComPic * recDepthMapBuffer; 736 recDepthMapBuffer = m_pcEncTop->getEncTop()->getPicFromView( pcSlice->getViewId(), pcSlice->getPOC(), true ); 737 pcSlice->getPic()->setRecDepthMap(recDepthMapBuffer); 738 if(recDepthMapBuffer->getReconMark()) 739 { 740 pcPic->setDepthCoded(true); 741 } 742 } 743 } 744 #endif 745 728 746 #if DEPTH_MAP_GENERATION 729 747 // init view component and predict virtual depth map -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r296 r313 60 60 m_pcBufferLowLatSbacCoders = NULL; 61 61 m_pcBufferLowLatBinCoderCABACs = NULL; 62 #if FCO_DVP_REFINE_C0132_C0170 63 m_pPicBaseTxt = NULL; 64 m_pPicBaseDepth = NULL; 65 #endif 62 66 } 63 67 … … 673 677 xCalcACDCParamSlice(pcSlice); 674 678 } 675 676 Bool bWp_explicit = (pcSlice->getSliceType()==P_SLICE && pcSlice->getPPS()->getUseWP()) || (pcSlice->getSliceType()==B_SLICE && pcSlice->getPPS()->getWPBiPredIdc()==1); 677 Bool bWp_implicit = (pcSlice->getSliceType()==B_SLICE && pcSlice->getPPS()->getWPBiPredIdc()==2); 678 679 if ( bWp_explicit || bWp_implicit ) 679 #if FIX_LGE_WP_FOR_3D_C0223 680 Bool bWp_explicit = (pcSlice->getSliceType()==P_SLICE && pcSlice->getPPS()->getUseWP()) || (pcSlice->getSliceType()==B_SLICE && pcSlice->getPPS()->getWPBiPredIdc()); 681 682 if ( bWp_explicit ) 680 683 { 681 684 //------------------------------------------------------------------------------ … … 686 689 printf("Weighted Prediction is not supported with slice mode determined by max number of bins.\n"); exit(0); 687 690 } 691 xEstimateWPParamSlice( pcSlice ); 692 pcSlice->initWpScaling(); 693 #if !FIX_LGE_WP_FOR_3D_C0223 // Interim fix for encoder/decoder mismatch of non-fade sequence 694 // check WP on/off 695 xCheckWPEnable( pcSlice ); 696 #endif 697 } 698 #else 699 700 Bool bWp_explicit = (pcSlice->getSliceType()==P_SLICE && pcSlice->getPPS()->getUseWP()) || (pcSlice->getSliceType()==B_SLICE && pcSlice->getPPS()->getWPBiPredIdc()==1); 701 Bool bWp_implicit = (pcSlice->getSliceType()==B_SLICE && pcSlice->getPPS()->getWPBiPredIdc()==2); 702 703 if ( bWp_explicit || bWp_implicit ) 704 { 705 //------------------------------------------------------------------------------ 706 // Weighted Prediction implemented at Slice level. SliceMode=2 is not supported yet. 707 //------------------------------------------------------------------------------ 708 if ( pcSlice->getSliceMode()==2 || pcSlice->getEntropySliceMode()==2 ) 709 { 710 printf("Weighted Prediction is not supported with slice mode determined by max number of bins.\n"); exit(0); 711 } 688 712 689 713 if( bWp_explicit ) … … 700 724 } 701 725 } 702 726 #endif 703 727 #if ADAPTIVE_QP_SELECTION 704 728 if( m_pcCfg->getUseAdaptQpSelect() ) -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r296 r313 712 712 if( m_isDepth ) 713 713 { 714 #if FCO_FIX_SPS_CHANGE 715 m_cSPS.initMultiviewSPSDepth ( m_viewId, m_iViewOrderIdx, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset ); 716 #else 714 717 m_cSPS.initMultiviewSPSDepth ( m_viewId, m_iViewOrderIdx ); 718 #endif 719 715 720 #if DEPTH_MAP_GENERATION 716 721 m_cSPS.setPredDepthMapGeneration( m_viewId, true );
Note: See TracChangeset for help on using the changeset viewer.