Changeset 1179 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
- Timestamp:
- 7 Apr 2015, 17:05:30 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 40 40 #include "SEIwrite.h" 41 41 #include "../TLibCommon/TypeDef.h" 42 42 #if H_3D_ANNEX_SELECTION_FIX 43 #include "TEncTop.h" 44 #endif 43 45 //! \ingroup TLibEncoder 44 46 //! \{ 47 45 48 46 49 #if ENC_DEC_TRACE … … 678 681 #endif 679 682 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); 683 #if !H_3D_DISABLE_CHROMA 680 684 assert(pcSPS->getChromaFormatIdc () == 1); 685 #endif 681 686 // in the first version chroma_format_idc can only be equal to 1 (4:2:0) 682 687 if( pcSPS->getChromaFormatIdc () == 3 ) … … 857 862 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 858 863 WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" ); 864 #if FIX_TICKET_95 865 if (pcPPS->getPpsInferScalingListFlag()) 866 { 867 WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" ); 868 } 869 #else 859 870 WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" ); 871 #endif 860 872 WRITE_UVLC( 0, "num_ref_loc_offsets" ); 861 873 WRITE_FLAG( 0 , "colour_mapping_enabled_flag" ); … … 889 901 WRITE_FLAG( sps3dExt->getQtPredFlag( d ) ? 1 : 0 , "qt_pred_flag" ); 890 902 WRITE_FLAG( sps3dExt->getInterSdcFlag( d ) ? 1 : 0 , "inter_sdc_flag" ); 903 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 904 WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "intra_skip_flag" ); 905 #else 891 906 WRITE_FLAG( sps3dExt->getIntraSingleFlag( d ) ? 1 : 0 , "intra_single_flag" ); 907 #endif 892 908 } 893 909 } … … 1365 1381 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1366 1382 { 1367 WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" );1368 1369 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )1370 {1371 WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" );1372 }1373 WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ), 4, "bit_depth_vps_luma_minus8" );1374 WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ), 4, "bit_depth_vps_chroma_minus8" );1383 WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" ); 1384 1385 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) 1386 { 1387 WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" ); 1388 } 1389 WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ), 4, "bit_depth_vps_luma_minus8" ); 1390 WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ), 4, "bit_depth_vps_chroma_minus8" ); 1375 1391 } 1376 1392 else … … 1598 1614 Void TEncCavlc::codeVPS3dExtension( TComVPS* pcVPS ) 1599 1615 { 1616 #if HHI_CAM_PARA_K0052 1617 WRITE_UVLC( pcVPS->getCpPrecision( ), "cp_precision" ); 1618 for (Int n = 1; n < pcVPS->getNumViews(); n++) 1619 { 1620 Int i = pcVPS->getViewOIdxList( n ); 1621 Int iInVps = pcVPS->getVoiInVps( i ); 1622 WRITE_CODE( pcVPS->getNumCp( iInVps ), 6, "num_cp" ); 1623 1624 if( pcVPS->getNumCp( iInVps ) > 0 ) 1625 { 1626 WRITE_FLAG( pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) ? 1 : 0 , "cp_in_slice_segment_header_flag" ); 1627 for( Int m = 0; m < pcVPS->getNumCp( iInVps ); m++ ) 1628 { 1629 WRITE_UVLC( pcVPS->getCpRefVoi( iInVps, m ), "cp_ref_voi" ); 1630 if( !pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) ) 1631 { 1632 Int j = pcVPS->getCpRefVoi( iInVps, m ); 1633 Int jInVps = pcVPS->getVoiInVps( j ); 1634 WRITE_SVLC( pcVPS->getVpsCpScale ( iInVps, jInVps ), "vps_cp_scale" ); 1635 WRITE_SVLC( pcVPS->getVpsCpOff ( iInVps, jInVps ), "vps_cp_off" ); 1636 WRITE_SVLC( pcVPS->getVpsCpInvScale( iInVps, jInVps ) + pcVPS->getVpsCpScale( iInVps, jInVps ), "vps_cp_inv_scale_plus_scale" ); 1637 WRITE_SVLC( pcVPS->getVpsCpInvOff ( iInVps, jInVps ) + pcVPS->getVpsCpOff ( iInVps, jInVps ), "vps_cp_inv_off_plus_off" ); 1638 } 1639 } 1640 } 1641 } 1642 #else 1600 1643 WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" ); 1601 1644 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++) … … 1617 1660 } 1618 1661 } 1662 #endif 1619 1663 } 1620 1664 #endif … … 1721 1765 1722 1766 // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present 1767 #if H_3D_DISABLE_CHROMA 1768 assert (pcSlice->getSPS()->getChromaFormatIdc() == 1 || pcSlice->getIsDepth() ); 1769 assert (pcSlice->getSPS()->getChromaFormatIdc() == 0 || !pcSlice->getIsDepth() ); 1770 #else 1723 1771 assert (pcSlice->getSPS()->getChromaFormatIdc() == 1 ); 1772 #endif 1724 1773 // if( separate_colour_plane_flag == 1 ) 1725 1774 // colour_plane_id u(2) … … 1895 1944 } 1896 1945 #endif 1946 1947 #if HHI_INTER_COMP_PRED_K0052 1948 #if H_3D 1949 if( getEncTop()->decProcAnnexI() ) 1950 { 1951 if ( pcSlice->getInCmpPredAvailFlag() ) 1952 { 1953 WRITE_FLAG( pcSlice->getInCompPredFlag(), "in_comp_pred_flag" ); 1954 } 1955 } 1956 #endif 1957 #endif 1897 1958 if(pcSlice->getSPS()->getUseSAO()) 1898 1959 { … … 1900 1961 { 1901 1962 WRITE_FLAG( pcSlice->getSaoEnabledFlag(), "slice_sao_luma_flag" ); 1963 #if H_3D_DISABLE_CHROMA 1964 if ( !pcSlice->getIsDepth() ) 1965 { 1902 1966 WRITE_FLAG( pcSlice->getSaoEnabledFlagChroma(), "slice_sao_chroma_flag" ); 1967 } 1968 #else 1969 WRITE_FLAG( pcSlice->getSaoEnabledFlagChroma(), "slice_sao_chroma_flag" ); 1970 #endif 1903 1971 } 1904 1972 } … … 2018 2086 } 2019 2087 #if H_3D_IC 2088 #if H_3D_ANNEX_SELECTION_FIX 2089 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) 2090 && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 2091 && getEncTop()->decProcAnnexI() 2092 ) 2093 #else 2020 2094 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 ) 2095 #endif 2021 2096 { 2022 2097 WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" ); … … 2073 2148 WRITE_FLAG(pcSlice->getLFCrossSliceBoundaryFlag()?1:0, "slice_loop_filter_across_slices_enabled_flag"); 2074 2149 } 2075 } 2150 #if HHI_CAM_PARA_K0052 2151 #if H_3D 2152 if (getEncTop()->decProcAnnexI() ) 2153 { 2154 Int voiInVps = vps->getVoiInVps( pcSlice->getViewIndex() ); 2155 if( vps->getCpInSliceSegmentHeaderFlag( voiInVps ) && !pcSlice->getIsDepth() ) 2156 { 2157 for( Int m = 0; m < vps->getNumCp( voiInVps ); m++ ) 2158 { 2159 Int jInVps = vps->getVoiInVps( vps->getCpRefVoi( voiInVps, m )); 2160 WRITE_SVLC( pcSlice->getCpScale ( jInVps ) , "cp_scale" ); 2161 WRITE_SVLC( pcSlice->getCpOff ( jInVps ) , "cp_off" ); 2162 WRITE_SVLC( pcSlice->getCpInvScale( jInVps ) + pcSlice->getCpScale( jInVps ) , "cp_inv_scale_plus_scale" ); 2163 WRITE_SVLC( pcSlice->getCpInvOff ( jInVps ) + pcSlice->getCpOff ( jInVps ) , "cp_inv_off_plus_off" ); 2164 } 2165 } 2166 } 2167 #endif 2168 #endif 2169 } 2170 2171 #if !HHI_CAM_PARA_K0052 2076 2172 #if H_3D 2077 2173 #if H_3D_FCO … … 2089 2185 } 2090 2186 } 2187 #endif 2091 2188 #endif 2092 2189 … … 2435 2532 assert(0); 2436 2533 } 2534 2535 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2536 Void TEncCavlc::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2537 { 2538 assert(0); 2539 } 2540 #else 2437 2541 #if H_3D_SINGLE_DEPTH 2438 2542 Void TEncCavlc::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) … … 2441 2545 } 2442 2546 #endif 2547 #endif 2548 2443 2549 Void TEncCavlc::codeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2444 2550 { … … 2544 2650 { 2545 2651 wpScalingParam *wp; 2652 #if H_3D_DISABLE_CHROMA 2653 Bool bChroma = !pcSlice->getIsDepth(); // color always present in HEVC ? 2654 #else 2546 2655 Bool bChroma = true; // color always present in HEVC ? 2656 #endif 2547 2657 Int iNbRef = (pcSlice->getSliceType() == B_SLICE ) ? (2) : (1); 2548 2658 Bool bDenomCoded = false;
Note: See TracChangeset for help on using the changeset viewer.