Changeset 767 in 3DVCSoftware for branches/HTM-9.2-dev0/source/Lib/TLibDecoder
- Timestamp:
- 12 Jan 2014, 04:39:11 (11 years ago)
- Location:
- branches/HTM-9.2-dev0/source/Lib/TLibDecoder
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r766 r767 215 215 } 216 216 217 #if DLT_DIFF_CODING_IN_PPS217 #if H_3D 218 218 Void TDecCavlc::parsePPS(TComPPS* pcPPS, TComVPS* pcVPS ) 219 219 #else … … 368 368 if (uiCode) 369 369 { 370 #if DLT_DIFF_CODING_IN_PPS370 #if H_3D 371 371 parsePPSExtension( pcPPS, pcVPS ); 372 372 READ_FLAG( uiCode, "pps_extension2_flag"); … … 378 378 READ_FLAG( uiCode, "pps_extension_data_flag"); 379 379 } 380 #if DLT_DIFF_CODING_IN_PPS381 } 382 #endif 383 } 384 } 385 386 #if DLT_DIFF_CODING_IN_PPS380 #if H_3D 381 } 382 #endif 383 } 384 } 385 386 #if H_3D 387 387 Void TDecCavlc::parsePPSExtension( TComPPS* pcPPS, TComVPS* pcVPS ) 388 388 { 389 //Ed.(GT): pcVPS should not be used here. Needs to be fixed. 389 390 UInt uiCode = 0; 390 391 TComDLT* pcDLT = new TComDLT; … … 1005 1006 } 1006 1007 #endif 1007 1008 #if !CAM_HLS_F0136_F0045_F00821009 UInt uiCamParPrecision = 0;1010 Bool bCamParSlice = false;1011 if ( !depthFlag )1012 {1013 READ_UVLC( uiCamParPrecision, "cp_precision" );1014 READ_FLAG( uiCode, "cp_in_slice_header_flag" ); bCamParSlice = ( uiCode == 1 );1015 if( !bCamParSlice )1016 {1017 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )1018 {1019 Int iCode;1020 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;1021 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;1022 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];1023 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];1024 }1025 }1026 }1027 pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );1028 #endif1029 1008 } 1030 1009 #endif … … 1132 1111 #if H_3D 1133 1112 m_pcBitstream->readOutTrailingBits(); 1134 #if CAM_HLS_F0136_F0045_F00821135 1113 pcVPS->createCamPars(pcVPS->getNumViews()); 1136 #endif1137 1114 parseVPSExtension2( pcVPS ); 1138 1115 READ_FLAG( uiCode, "vps_extension3_flag" ); … … 1742 1719 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false ); 1743 1720 // READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPreFlag ( i, uiCode == 1 ? true : false ); 1744 #if H_3D_DIM_DLT1745 #if !DLT_DIFF_CODING_IN_PPS1746 if( pcVPS->getVpsDepthModesFlag( i ) )1747 {1748 READ_FLAG( uiCode, "dlt_flag[i]" ); pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false );1749 }1750 if( pcVPS->getUseDLTFlag( i ) )1751 {1752 // decode mapping1753 UInt uiNumDepthValues;1754 // parse number of values in DLT1755 READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");1756 1757 // parse actual DLT values1758 Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));1759 for(Int d=0; d<uiNumDepthValues; d++)1760 {1761 READ_UVLC(uiCode, "dlt_depth_value[i][d]");1762 aiIdx2DepthValue[d] = (Int)uiCode;1763 }1764 1765 pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);1766 1767 // clean memory1768 free(aiIdx2DepthValue);1769 }1770 #endif1771 #endif1772 1721 #if H_3D_INTER_SDC 1773 1722 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); … … 1776 1725 } 1777 1726 } 1778 #if CAM_HLS_F0136_F0045_F0082 1727 1779 1728 UInt uiCamParPrecision = 0; 1780 1729 Bool bCamParSlice = false; … … 1802 1751 } 1803 1752 } 1804 #endif 1753 1805 1754 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1806 1755 } … … 2462 2411 } 2463 2412 2464 #if CAM_HLS_F0044 2465 #if CAM_HLS_F0136_F0045_F0082 2413 #if H_3D 2466 2414 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() ) 2467 #else2468 if( rpcSlice->getSPS()->hasCamParInSliceHeader() )2469 #endif2470 2415 { 2471 2416 UInt uiViewIndex = rpcSlice->getViewIndex(); … … 2479 2424 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset ); 2480 2425 } 2481 2482 2426 #endif 2483 2427 … … 2485 2429 { 2486 2430 READ_UVLC(uiCode,"slice_header_extension_length"); 2487 #if H_3D && !CAM_HLS_F0044 2488 #if CAM_HLS_F0136_F0045_F0082 2489 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() ) 2490 #else 2491 if( rpcSlice->getSPS()->hasCamParInSliceHeader() ) 2492 #endif 2493 { 2494 UInt uiViewIndex = rpcSlice->getViewIndex(); 2495 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ ) 2496 { 2497 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode; 2498 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode; 2499 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ]; 2500 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ]; 2501 } 2502 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset ); 2503 } 2504 2505 READ_FLAG(uiCode,"slice_segment_header_extension2_flag"); 2506 if ( uiCode ) 2507 { 2508 READ_UVLC(uiCode,"slice_header_extension2_length"); 2509 for(Int i=0; i<uiCode; i++) 2510 { 2511 UInt ignore; 2512 READ_CODE(8,ignore,"slice_header_extension2_data_byte"); 2513 } 2514 } 2515 } 2516 #else 2431 2517 2432 for(Int i=0; i<uiCode; i++) 2518 2433 { … … 2521 2436 } 2522 2437 } 2523 #endif 2438 2524 2439 m_pcBitstream->readByteAlignment(); 2525 2440 -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r766 r767 96 96 #endif 97 97 98 #if H_3D && DLT_DIFF_CODING_IN_PPS98 #if H_3D 99 99 Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ); 100 100 Void parsePPSExtension ( TComPPS* pcPPS, TComVPS* pcVPS ); -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r765 r767 754 754 { 755 755 #if H_3D 756 #if DLT_DIFF_CODING_IN_PPS757 756 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 758 #else 759 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 760 #endif 761 { 762 #if DLT_DIFF_CODING_IN_PPS 763 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 764 #else 765 pReco [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 766 #endif 767 } 768 else 769 { 770 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] ); 771 } 757 { 758 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 759 } 760 else 761 { 762 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] ); 763 } 772 764 #endif 773 765 pRecIPred[ uiX ] = pReco[ uiX ]; … … 979 971 { 980 972 #if H_3D_DIM_DLT 981 #if DLT_DIFF_CODING_IN_PPS982 973 Pel pPredIdx = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 983 974 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 984 975 Pel pRecoValue = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx ); 985 #else986 Pel pPredIdx = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] );987 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);988 Pel pRecoValue = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx );989 #endif990 976 991 977 apDCResiValues[uiSegment] = pRecoValue - apDCPredValues[uiSegment]; -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecEntropy.h
r758 r767 71 71 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; 72 72 #endif 73 #if DLT_DIFF_CODING_IN_PPS73 #if H_3D 74 74 virtual Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ) = 0; 75 75 #else … … 152 152 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 153 153 #endif 154 #if DLT_DIFF_CODING_IN_PPS154 #if H_3D 155 155 Void decodePPS ( TComPPS* pcPPS, TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS, pcVPS); } 156 156 #else -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r764 r767 442 442 443 443 #if H_3D_DIM_DLT 444 #if DLT_DIFF_CODING_IN_PPS445 444 UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() ); 446 #else447 UInt uiMaxResidualBits = pcCU->getSlice()->getVPS()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );448 #endif449 445 #else 450 446 UInt uiMaxResidualBits = g_bitDepthY; … … 470 466 UInt uiCount = 0; 471 467 #if H_3D_DIM_DLT 472 #if DLT_DIFF_CODING_IN_PPS473 468 UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 474 #else475 UInt uiNumDepthValues = pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );476 #endif477 469 #else 478 470 UInt uiNumDepthValues = ((1 << g_bitDepthY)-1); -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecSbac.h
r764 r767 81 81 Void parseSPS ( TComSPS* /*pcSPS*/ ) {} 82 82 #endif 83 #if DLT_DIFF_CODING_IN_PPS83 #if H_3D 84 84 Void parsePPS ( TComPPS* /*pcPPS*/, TComVPS* /*pcVPS*/ ) {} 85 85 #else -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r766 r767 228 228 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, uiViewIndex ); 229 229 m_aiViewId[ uiViewIndex ] = pcSlice->getViewId(); 230 #if CAM_HLS_F0136_F0045_F0082 230 231 231 if( uiViewIndex == 1 ) 232 232 { … … 239 239 AOF( m_bCamParsVaryOverTime == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) ); 240 240 } 241 #else 242 if( uiViewIndex == 1 ) 243 { 244 m_uiCamParsCodedPrecision = pcSlice->getSPS()->getCamParPrecision (); 245 m_bCamParsVaryOverTime = pcSlice->getSPS()->hasCamParInSliceHeader (); 246 } 247 else if( uiViewIndex > 1 ) 248 { 249 AOF( m_uiCamParsCodedPrecision == pcSlice->getSPS()->getCamParPrecision () ); 250 AOF( m_bCamParsVaryOverTime == pcSlice->getSPS()->hasCamParInSliceHeader () ); 251 } 252 #endif 241 253 242 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ ) 254 243 { … … 264 253 else 265 254 { 266 #if CAM_HLS_F0136_F0045_F0082267 255 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedScale (uiViewIndex) [ uiBaseIndex ]; 268 256 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedOffset (uiViewIndex) [ uiBaseIndex ]; 269 257 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ]; 270 258 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ]; 271 #else272 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getSPS()->getCodedScale () [ uiBaseIndex ];273 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getSPS()->getCodedOffset () [ uiBaseIndex ];274 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getSPS()->getInvCodedScale () [ uiBaseIndex ];275 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseIndex ];276 #endif277 259 xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 278 260 xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); … … 306 288 CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice ) 307 289 { 308 #if !CAM_HLS_F0136_F0045_F0082309 UInt uiViewIndex = pcSlice->getViewIndex();310 311 pcSlice->getSPS()->initCamParaSPS( uiViewIndex, m_uiCamParsCodedPrecision, m_bCamParsVaryOverTime, m_aaiCodedScale, m_aaiCodedOffset );312 #endif313 290 if( m_bCamParsVaryOverTime ) 314 291 { … … 1111 1088 m_pcCamParsCollector->setSlice( pcSlice ); 1112 1089 } 1113 #if H_3D_IV_MERGE1114 if( pcSlice->getIsDepth() )1115 {1116 #if !CAM_HLS_F0136_F0045_F00821117 pcSlice->getSPS()->setHasCamParInSliceHeader( false );1118 #endif1119 }1120 #endif1121 1090 #endif 1122 1091 m_bFirstSliceInPicture = false; … … 1158 1127 pps->setLayerId( getLayerId() ); 1159 1128 #endif 1160 #if DLT_DIFF_CODING_IN_PPS1129 #if H_3D 1161 1130 // Assuming that all PPS indirectly refer to the same VPS via different SPS 1162 1131 // There is no parsing dependency in decoding DLT in PPS. … … 1165 1134 // Step 1) decoding DLT tables based on the number of depth layers, and 1166 1135 // Step 2) mapping DLT tables to the depth layers 1167 // as descri pted in the 3D-HEVC WD.1136 // as described in the 3D-HEVC WD. 1168 1137 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1169 1138 m_cEntropyDecoder.decodePPS( pps, vps );
Note: See TracChangeset for help on using the changeset viewer.