Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 4 May 2015, 17:47:40 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1179 r1196 39 39 #include "SEIread.h" 40 40 #include "TDecSlice.h" 41 #if H_3D _ANNEX_SELECTION_FIX41 #if H_3D 42 42 #include "TDecTop.h" 43 43 #endif … … 93 93 TDecCavlc::TDecCavlc() 94 94 { 95 #if !HHI_CAM_PARA_K005296 #if H_3D97 m_aaiTempScale = new Int* [ MAX_NUM_LAYERS ];98 m_aaiTempOffset = new Int* [ MAX_NUM_LAYERS ];99 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )100 {101 m_aaiTempScale [ uiVId ] = new Int [ MAX_NUM_LAYERS ];102 m_aaiTempOffset [ uiVId ] = new Int [ MAX_NUM_LAYERS ];103 }104 #endif105 #endif106 95 } 107 96 108 97 TDecCavlc::~TDecCavlc() 109 98 { 110 #if !HHI_CAM_PARA_K0052111 #if H_3D112 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )113 {114 delete [] m_aaiTempScale [ uiVId ];115 delete [] m_aaiTempOffset [ uiVId ];116 }117 delete [] m_aaiTempScale;118 delete [] m_aaiTempOffset;119 #endif120 #endif121 99 } 122 100 … … 1048 1026 READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 ); 1049 1027 READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 ); 1050 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331051 1028 READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 ); 1052 #else1053 READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );1054 #endif1055 1029 } 1056 1030 } … … 1063 1037 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 1064 1038 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 1065 #if FIX_TICKET_951066 1039 if (pcPPS->getPpsInferScalingListFlag()) 1067 1040 { 1068 1041 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1069 1042 } 1070 #else1071 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );1072 #endif1073 1043 1074 1044 UInt numRefLocOffsets;; … … 1336 1306 } 1337 1307 1338 #if HHI_INTER_COMP_PRED_K00521339 1308 #if H_3D 1340 1309 pcVPS->initViewCompLayer( ); 1341 #endif1342 1310 #endif 1343 1311 … … 1929 1897 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS ) 1930 1898 { 1931 #if HHI_CAM_PARA_K00521932 1899 UInt uiCode; 1933 1900 READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ; … … 1959 1926 } 1960 1927 pcVPS->deriveCpPresentFlag(); 1961 #else1962 UInt uiCode;1963 1964 UInt uiCamParPrecision = 0;1965 Bool bCamParSlice = false;1966 Bool bCamParPresentFlag = false;1967 1968 READ_UVLC( uiCamParPrecision, "cp_precision" );1969 #if HHI_VIEW_ID_LIST_I5_J01071970 for (Int n = 1; n < pcVPS->getNumViews(); n++)1971 {1972 Int viewIndex = pcVPS->getViewOIdxList( n );1973 #else1974 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)1975 {1976 #endif1977 pcVPS->setCamParPresent ( viewIndex, false );1978 pcVPS->setHasCamParInSliceHeader( viewIndex, false );1979 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1);1980 if ( bCamParPresentFlag )1981 {1982 READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" ); bCamParSlice = ( uiCode == 1);1983 if ( !bCamParSlice )1984 {1985 #if HHI_VIEW_ID_LIST_I5_J01071986 for( UInt m = 0; m < n; n++ )1987 {1988 Int uiBaseIndex = pcVPS->getViewOIdxList ( m );1989 Int iCode;1990 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;1991 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;1992 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];1993 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];1994 }1995 }1996 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );1997 #else1998 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )1999 {2000 Int iCode;2001 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;2002 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;2003 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];2004 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];2005 }2006 }2007 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );2008 #endif2009 }2010 }2011 #endif2012 1928 } 2013 1929 #endif … … 2070 1986 #endif 2071 1987 rpcSlice->setSPS(sps); 2072 #if !HHI_INTER_COMP_PRED_K00522073 #if H_3D2074 rpcSlice->init3dToolParameters();2075 #endif2076 #endif2077 1988 rpcSlice->setPPS(pps); 2078 1989 if( pps->getDependentSliceSegmentsEnabledFlag() && ( !firstSliceSegmentInPic )) … … 2468 2379 } 2469 2380 } 2470 #if HHI_INTER_COMP_PRED_K00522471 2381 #if H_3D 2472 2382 if ( getDecTop()->decProcAnnexI() ) … … 2481 2391 #endif 2482 2392 #endif 2483 #endif2484 2393 if(sps->getUseSAO()) 2485 2394 { … … 2488 2397 if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 ) 2489 2398 { 2490 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);2491 }2399 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); 2400 } 2492 2401 else 2493 2402 { 2494 2403 rpcSlice->setSaoEnabledFlagChroma( false ); 2495 2404 } 2496 2497 2405 #else 2498 2406 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); … … 2662 2570 } 2663 2571 #if H_3D_IC 2664 #if H_3D_ANNEX_SELECTION_FIX2665 2572 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) 2666 2573 && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 2667 2574 && getDecTop()->decProcAnnexI() 2668 2575 ) 2669 #else2670 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )2671 #endif2672 2576 { 2673 2577 UInt uiCodeTmp = 0; … … 2766 2670 rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false); 2767 2671 2768 #if HHI_CAM_PARA_K00522769 2672 #if H_3D 2770 2673 if ( getDecTop()->decProcAnnexI() ) … … 2784 2687 } 2785 2688 #endif 2786 #endif2787 2689 } 2788 2690 … … 2808 2710 } 2809 2711 2810 #if !HHI_CAM_PARA_K00522811 #if H_3D2812 #if H_3D_FCO2813 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && rpcSlice->getIsDepth() )2814 #else2815 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() )2816 #endif2817 {2818 UInt uiViewIndex = rpcSlice->getViewIndex();2819 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )2820 {2821 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;2822 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;2823 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];2824 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];2825 }2826 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );2827 }2828 #endif2829 #endif2830 2712 2831 2713 if(pps->getSliceHeaderExtensionPresentFlag()) … … 3100 2982 assert(0); 3101 2983 } 3102 3103 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2984 #if H_3D 3104 2985 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 3105 2986 { 3106 2987 assert(0); 3107 2988 } 3108 #else3109 #if H_3D_SINGLE_DEPTH3110 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )3111 {3112 assert(0);3113 }3114 #endif3115 2989 #endif 3116 2990
Note: See TracChangeset for help on using the changeset viewer.