Changeset 767 in 3DVCSoftware for branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 12 Jan 2014, 04:39:11 (10 years ago)
- File:
-
- 1 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
Note: See TracChangeset for help on using the changeset viewer.