Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r166 r193 1757 1757 } 1758 1758 } 1759 #if VSP_N 1760 if( pcSPS->getViewId() ) 1761 { 1762 READ_FLAG( uiCode, "vsp_present_flag" ); 1763 pcSPS->setVspPresentFlag( (Bool)uiCode ); 1764 #if VSP_CFG 1765 if( pcSPS->getVspPresentFlag() ) 1766 { 1767 READ_FLAG( uiCode, "vsp_depth_present_flag" ); 1768 pcSPS->setVspDepthPresentFlag( (Bool)uiCode ); 1769 } 1770 #endif 1771 } 1772 #endif 1759 1773 READ_FLAG( uiCode, "sps_extension2_flag"); 1760 1774 if (uiCode) … … 1781 1795 UInt uiCode; 1782 1796 Int iCode; 1783 1797 #if VSP_CFG 1798 Int iNumOfVspRefsL0 = 0; 1799 Int iNumOfVspRefsL1 = 0; 1800 #endif 1784 1801 #if ENC_DEC_TRACE 1785 1802 xTraceSliceHeader(rpcSlice); … … 2006 2023 READ_UVLC ( uiCode, "aps_id" ); rpcSlice->setAPSId(uiCode); 2007 2024 } 2025 2026 #if VSP_SLICE_HEADER && VSP_CFG 2027 if( rpcSlice->getSPS()->getViewId()!=0 2028 && rpcSlice->getSliceType() != I_SLICE 2029 && rpcSlice->getSPS()->getVspPresentFlag() 2030 ) 2031 { 2032 if( !rpcSlice->getSPS()->isDepth() || rpcSlice->getSPS()->getVspDepthPresentFlag() ) 2033 { 2034 READ_UVLC( uiCode, "num_vsp_ref_pics"); 2035 rpcSlice->setVspFlag( uiCode > 0 ? true : false ); 2036 rpcSlice->setNumVspRefPics( uiCode ); 2037 //printf("SH:num_vsp_ref_pics(%d)\n",uiCode); 2038 for( UInt i = 0; i < rpcSlice->getNumVspRefPics(); i++ ) 2039 { 2040 READ_UVLC( uiCode, "vsp_ref_list0_pos"); 2041 rpcSlice->setVspRefPos( REF_PIC_LIST_0, i, uiCode ); 2042 //printf("SH:vsp_ref_list0_pos(%d)\n",uiCode); 2043 if( rpcSlice->getSliceType() == B_SLICE ) 2044 { 2045 READ_UVLC( uiCode, "vsp_ref_list1_pos"); 2046 rpcSlice->setVspRefPos( REF_PIC_LIST_1, i, uiCode ); 2047 //printf("SH:vsp_ref_list1_pos(%d)\n",uiCode); 2048 } 2049 } 2050 iNumOfVspRefsL0 = ( (rpcSlice->getSPS()->getViewId()==0 2051 || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth()) 2052 || !rpcSlice->getVspFlag() 2053 || rpcSlice->getVspRefPos(REF_PIC_LIST_0, 0) == 0 ) ? 0 : 1 ); 2054 iNumOfVspRefsL1 = ( (rpcSlice->getSPS()->getViewId()==0 2055 || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth()) 2056 || !rpcSlice->getVspFlag() 2057 || rpcSlice->getVspRefPos(REF_PIC_LIST_1, 0) == 0 ) ? 0 : 1 ); 2058 } 2059 } 2060 #endif 2061 2008 2062 if (!rpcSlice->isIntra()) 2009 2063 { … … 2011 2065 if (uiCode) 2012 2066 { 2013 READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 ); 2067 READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" ); 2068 #if VSP_CFG 2069 rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 + iNumOfVspRefsL0 ); 2070 #else 2071 rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 ); 2072 #endif 2014 2073 if (rpcSlice->isInterB()) 2015 2074 { 2016 READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 ); 2075 READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" ); 2076 #if VSP_CFG 2077 rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 + iNumOfVspRefsL1 ); 2078 #else 2079 rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 ); 2080 #endif 2017 2081 } 2018 2082 else … … 2183 2247 if(uiCode) 2184 2248 { 2185 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2249 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); 2250 #if VSP_CFG 2251 rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 + iNumOfVspRefsL0 ); 2252 #else 2253 rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2254 #endif 2186 2255 2187 2256 #if H0412_REF_PIC_LIST_RESTRICTION … … 2348 2417 #endif 2349 2418 2419 #if !VSP_CFG 2350 2420 #if VSP_SLICE_HEADER 2351 2421 if( rpcSlice->getSPS()->getViewId()!=0 2352 #if VSP_TEXT_ONLY 2353 && !(rpcSlice->getSPS()->isDepth()) 2354 #endif 2422 && rpcSlice->getSPS()->getVspPresentFlag() 2355 2423 ) 2356 2424 { 2357 2425 READ_FLAG( uiCode, "vsp_flag" ); 2358 2426 rpcSlice->setVspFlag( uiCode ? true : false ); 2359 } 2427 if( rpcSlice->getVspFlag() ) 2428 { 2429 READ_FLAG( uiCode, "vsp_depth_disable_flag" ); 2430 rpcSlice->setVspDepthDisableFlag( uiCode ? true : false ); 2431 } 2432 } 2433 #endif 2360 2434 #endif 2361 2435
Note: See TracChangeset for help on using the changeset viewer.