Changeset 303 in 3DVCSoftware for branches/HTM-6.0-Mediatek/source
- Timestamp:
- 8 Mar 2013, 16:13:08 (12 years ago)
- Location:
- branches/HTM-6.0-Mediatek/source
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-6.0-Mediatek/source/App/TAppEncoder/TAppEncTop.cpp
r296 r303 429 429 m_cVPS.setDependentLayer ( layerId-1, layerId); 430 430 #endif 431 #if FCO_FIX_SPS_CHANGE 432 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 433 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 434 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( m_cCameraData.getCodedScale () ); 435 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( m_cCameraData.getCodedOffset () ); 436 #else 431 437 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( 0 ); 432 438 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( false ); 433 439 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( 0 ); 434 440 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( 0 ); 441 #endif 435 442 436 443 //====== Coding Structure ======== … … 970 977 { 971 978 Int iNumEncoded = 0; 979 972 980 #if !QC_MVHEVC_B0046 973 981 UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId ); … … 977 985 } 978 986 #endif 987 979 988 980 989 #if FLEX_CODING_ORDER_M23723 … … 994 1003 assert(isdigit(m_pchMVCJointCodingOrder[i])); 995 1004 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1005 #if (FCO_FIX && MERL_VSP_C0152) 1006 Int iCurPoc = m_acTEncTopList[iViewIdx]->getFrameId(gopId); 1007 if( iCurPoc < m_acTEncTopList[iViewIdx]->getFrameToBeEncoded() && iViewIdx!=0 ) 1008 { 1009 TComPic* pcBaseTxtPic = getPicFromView( 0, m_acTEncTopList[iViewIdx]->getFrameId(gopId), false ); //get base view reconstructed texture 1010 TComPic* pcBaseDepthPic = getPicFromView( 0, m_acTEncTopList[iViewIdx]->getFrameId(gopId), true ); //get base view reconstructed depth 1011 TEncSlice* pEncSlice = m_acTEncTopList[iViewIdx]->getSliceEncoder(); 1012 pEncSlice->setRefPicBaseTxt(pcBaseTxtPic); 1013 pEncSlice->setRefPicBaseDepth(pcBaseDepthPic); 1014 } 1015 setBWVSPLUT( iViewIdx, gopId, false); 1016 #endif 996 1017 997 1018 m_acTEncTopList[iViewIdx]->encode( eos[iViewIdx], pcPicYuvOrg, *m_picYuvRec[iViewIdx], outputAccessUnits, iNumEncoded, gopId ); … … 1008 1029 assert(isdigit(m_pchMVCJointCodingOrder[i])); 1009 1030 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1031 1010 1032 #if SAIT_VSO_EST_A0033 1011 1033 if( m_bUseVSO && iNextPoc < m_iFrameToBeEncoded ) … … 1014 1036 m_acTEncDepthTopList[iViewIdx]->setDispCoeff( m_cCameraData.getDispCoeff() ); 1015 1037 } 1038 #endif 1039 #if (FCO_FIX && MERL_VSP_C0152) 1040 Int iCurPocDepth = m_acTEncDepthTopList[iViewIdx]->getFrameId(gopId); 1041 if( iCurPocDepth < m_acTEncDepthTopList[iViewIdx]->getFrameToBeEncoded() && iViewIdx!=0 ) 1042 { 1043 TComPic* pcBaseDepthPic = getPicFromView( 0, m_acTEncDepthTopList[iViewIdx]->getFrameId(gopId), true ); 1044 TEncSlice* pcSlice = (TEncSlice*) m_acTEncDepthTopList[iViewIdx]->getSliceEncoder(); 1045 pcSlice->setRefPicBaseDepth(pcBaseDepthPic); 1046 } 1047 setBWVSPLUT( iViewIdx, gopId, true); 1016 1048 #endif 1017 1049 m_acTEncDepthTopList[iViewIdx]->encode( depthEos[iViewIdx], pcDepthPicYuvOrg, *m_picYuvDepthRec[iViewIdx], outputAccessUnits, iNumDepthEncoded, gopId ); -
branches/HTM-6.0-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp
r296 r303 3596 3596 #if H3D_IVMP 3597 3597 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 3598 #if FCO_FIX 3599 const Int extraMergeCand = ( ( ( getSlice()->getIsDepth() && m_pcSlice->getTexturePic() ) || getSlice()->getSPS()->getMultiviewMvPredMode() )? 1 : 0 ); 3600 #else 3598 3601 const Int extraMergeCand = ( ( getSlice()->getIsDepth() || getSlice()->getSPS()->getMultiviewMvPredMode() )? 1 : 0 ); 3602 #endif 3599 3603 #else 3600 3604 const Int extraMergeCand = ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); … … 3651 3655 if(!bNoPdmMerge) 3652 3656 { 3657 #if FCO_DVP_REFINE_C0132_C0170 3658 if( !getPic()->getDepthCoded() ) 3659 #endif 3653 3660 getDisMvpCandNBDV(uiPUIdx, uiAbsPartIdx, &cDisInfo , true 3654 3661 #if MERL_VSP_C0152 … … 3657 3664 ); 3658 3665 } 3666 #if FCO_DVP_REFINE_C0132_C0170 3667 if(getPic()->getDepthCoded() ) 3668 { 3669 TComPic* pcCodedDepthMap = getPic()->getRecDepthMap(); 3670 TComMv cColMv; 3671 3672 cColMv.setZero(); 3673 estimateDVFromDM(uiPUIdx, pcCodedDepthMap, uiAbsPartIdx, &cColMv, false); 3674 3675 cDisInfo.iN = 1; 3676 cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() ); 3677 cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() ); 3678 cDisInfo.m_aVIdxCan[0] = 0; 3679 3680 } 3681 #endif 3659 3682 if(cDisInfo.iN==0) 3660 3683 { … … 3669 3692 3670 3693 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 3694 #if FCO_FIX 3695 if( m_pcSlice->getIsDepth() && m_pcSlice->getTexturePic() ) 3696 #else 3671 3697 if( m_pcSlice->getIsDepth()) 3698 #endif 3672 3699 { 3673 3700 UInt uiPartIdxCenter; … … 6079 6106 DisInfo cDisInfo; 6080 6107 cDisInfo.iN = 0; 6108 #if FCO_DVP_REFINE_C0132_C0170 6109 if( !getPic()->getDepthCoded() ) 6110 #endif 6081 6111 getDisMvpCandNBDV(uiPartIdx, uiPartAddr, &cDisInfo, false 6082 6112 #if MERL_VSP_C0152 … … 6084 6114 #endif 6085 6115 ); 6116 #if FCO_DVP_REFINE_C0132_C0170 6117 if(getPic()->getDepthCoded() ) 6118 { 6119 TComPic* pcCodedDepthMap = getPic()->getRecDepthMap(); 6120 TComMv cColMv; 6121 6122 cColMv.setZero(); 6123 estimateDVFromDM(uiPartIdx, pcCodedDepthMap, uiPartAddr, &cColMv, false); 6124 6125 cDisInfo.iN = 1; 6126 cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() ); 6127 cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() ); 6128 cDisInfo.m_aVIdxCan[0] = 0; 6129 } 6130 #endif 6086 6131 if(cDisInfo.iN==0) 6087 6132 { … … 7921 7966 PartSize m_peSaved = getPartitionSize( 0 ); 7922 7967 m_pePartSize[0] = SIZE_2Nx2N; 7968 #if FCO_DVP_REFINE_C0132_C0170 7969 if(getPic()->getDepthCoded() ) 7970 { 7971 TComPic* pcCodedDepthMap = getPic()->getRecDepthMap(); 7972 TComMv cColMv; 7973 7974 cColMv.setZero(); 7975 estimateDVFromDM(0, pcCodedDepthMap, 0, &cColMv, false); 7976 7977 cDisInfo.iN = 1; 7978 cDisInfo.m_acMvCand[0].setHor( cColMv.getHor() ); 7979 cDisInfo.m_acMvCand[0].setVer( cColMv.getVer() ); 7980 cDisInfo.m_aVIdxCan[0] = 0; 7981 7982 } 7983 else 7984 #endif 7923 7985 getDisMvpCandNBDV( 0, 0, &cDisInfo, false ); 7924 7986 if( cDisInfo.iN == 0) -
branches/HTM-6.0-Mediatek/source/Lib/TLibCommon/TComPic.cpp
r296 r303 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; -
branches/HTM-6.0-Mediatek/source/Lib/TLibCommon/TComPic.h
r296 r303 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 -
branches/HTM-6.0-Mediatek/source/Lib/TLibCommon/TComPrediction.cpp
r296 r303 1434 1434 Int dstStride = dstPic->getStride(); 1435 1435 Int depStride = pPicBaseDepth->getStride(); 1436 1437 1436 Int depthPosX = Clip3(0, widthLuma - size_x - 1, (posX/nTxtPerDepthX) + (mv->getHor()>>2)); 1438 1437 Int depthPosY = Clip3(0, heightLuma- size_y - 1, (posY/nTxtPerDepthY) + (mv->getVer()>>2)); -
branches/HTM-6.0-Mediatek/source/Lib/TLibCommon/TComSlice.cpp
r296 r303 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 -
branches/HTM-6.0-Mediatek/source/Lib/TLibCommon/TComSlice.h
r296 r303 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; } -
branches/HTM-6.0-Mediatek/source/Lib/TLibCommon/TypeDef.h
r296 r303 171 171 #if FLEX_CODING_ORDER_M23723 172 172 #define DISABLE_FCO_FOR_VSO 0 // Optional compile settings to disable VSO with FCO. 173 #define FCO_DVP_REFINE_C0132_C0170 0 // depth oriented disparity vector prediction from JCT3V-C0132 and JCT3V-C0170 174 #define FCO_FIX 0 // Bug fix for C0137 and C0152 on FCO 175 #define FCO_FIX_SPS_CHANGE 0 // Sending camera parameters in SPS of depth for depth to disparity conversion used by VSP and DoDVP 176 #else 177 #define DISABLE_FCO_FOR_VSO 0 // Optional compile settings to disable VSO with FCO. 178 #define FCO_DVP_REFINE_C0132_C0170 0 // depth oriented disparity vector prediction from JCT3V-C0132 and JCT3V-C0170 179 #define FCO_FIX 0 // Fixing bugs from HTM 6.0 which 180 #define FCO_FIX_SPS_CHANGE 0 // Fixing bugs from HTM 6.0 which 173 181 #endif 174 182 -
branches/HTM-6.0-Mediatek/source/Lib/TLibDecoder/TDecCAVLC.cpp
r296 r303 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 -
branches/HTM-6.0-Mediatek/source/Lib/TLibDecoder/TDecTop.cpp
r296 r303 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 ); … … 1171 1176 } 1172 1177 #endif 1178 1179 #if FCO_DVP_REFINE_C0132_C0170 1180 if(m_bFirstSliceInPicture) 1181 { 1182 pcPic->setDepthCoded(false); 1183 1184 if(m_viewId != 0) 1185 { 1186 if( m_isDepth == 0) 1187 { 1188 TComPic * recDepthMapBuffer; 1189 recDepthMapBuffer = m_tAppDecTop->getPicFromView( m_viewId, pcSlice->getPOC(), true ); 1190 pcPic->setRecDepthMap(recDepthMapBuffer); 1191 1192 if(recDepthMapBuffer != NULL) 1193 { 1194 pcPic->setDepthCoded(true); 1195 } 1196 } 1197 } 1198 } 1199 #endif 1200 1173 1201 1174 1202 #if MERL_VSP_C0152 // set BW LUT -
branches/HTM-6.0-Mediatek/source/Lib/TLibEncoder/TEncCavlc.cpp
r296 r303 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 -
branches/HTM-6.0-Mediatek/source/Lib/TLibEncoder/TEncGOP.cpp
r296 r303 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 -
branches/HTM-6.0-Mediatek/source/Lib/TLibEncoder/TEncSlice.cpp
r296 r303 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 -
branches/HTM-6.0-Mediatek/source/Lib/TLibEncoder/TEncTop.cpp
r296 r303 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.