Changeset 867 in 3DVCSoftware
- Timestamp:
- 15 Mar 2014, 08:37:13 (11 years ago)
- Location:
- branches/HTM-10.0-dev0/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSlice.cpp
r866 r867 112 112 , m_interLayerPredEnabledFlag (false) 113 113 , m_numInterLayerRefPicsMinus1 (0) 114 #if H_MV_HLS_7_POC_P0041 115 , m_sliceSegmentHeaderExtensionLength (0) 116 , m_pocResetIdc (0) 117 , m_pocResetPeriodId (0) 118 , m_fullPocResetFlag (false) 119 , m_pocLsbVal (0) 120 , m_pocMsbValPresentFlag (false) 121 , m_pocMsbVal (0) 122 , m_pocMsbValRequiredFlag ( false ) 123 #endif 114 124 #if H_3D_IC 115 125 , m_bApplyIC ( false ) -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSlice.h
r866 r867 2240 2240 Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; 2241 2241 2242 #if H_MV_HLS 7_GEN2242 #if H_MV_HLS_7_POC_P0041 2243 2243 Int m_sliceSegmentHeaderExtensionLength; 2244 2244 Int m_pocResetIdc; … … 2248 2248 Bool m_pocMsbValPresentFlag; 2249 2249 Int m_pocMsbVal; 2250 Bool m_pocMsbValRequiredFlag; 2250 2251 #endif 2251 2252 … … 2596 2597 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 2597 2598 2598 #if H_MV_HLS 7_GEN2599 #if H_MV_HLS_7_POC_P0041 2599 2600 Void setSliceSegmentHeaderExtensionLength( Int val ) { m_sliceSegmentHeaderExtensionLength = val; } 2600 2601 Int getSliceSegmentHeaderExtensionLength( ) { return m_sliceSegmentHeaderExtensionLength; } … … 2618 2619 Int getPocMsbVal( ) { return m_pocMsbVal; } 2619 2620 2621 Bool getPocMsbValRequiredFlag() { return m_pocMsbValRequiredFlag; } 2622 Void setPocMsbValRequiredFlag(Bool x) { m_pocMsbValRequiredFlag = x; } 2623 2624 UInt getPocLsbValLen() { return getSPS()->getBitsForPOC(); }; //log2_max_pic_order_cnt_lsb_minus4 + 4 2625 2626 Bool TComSlice::getBlaPicFlag () 2627 { 2628 return getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 2629 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 2630 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP; 2631 } 2632 Bool TComSlice::getCraPicFlag () 2633 { 2634 return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA; 2635 } 2620 2636 #endif 2621 2637 … … 2638 2654 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2639 2655 2640 #if H_MV_HLS7_GEN2641 Bool getPocMsbValRequiredFlag( ) { return };2642 UInt getPocLsbValLen() { return getSPS->getBitsForPOC(); }; //log2_max_pic_order_cnt_lsb_minus4 + 42643 #endif2644 2656 #endif 2645 2657 #if MTK_DDD_G0063 -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r866 r867 2733 2733 if(pps->getSliceHeaderExtensionPresentFlag()) 2734 2734 { 2735 #if !H_MV_HLS 7_GEN2735 #if !H_MV_HLS_7_POC_P0041 2736 2736 READ_UVLC(uiCode,"slice_header_extension_length"); 2737 2737 for(Int i=0; i<uiCode; i++) … … 2750 2750 READ_CODE( 2, uiCode, "poc_reset_idc" ); rpcSlice->setPocResetIdc( uiCode ); 2751 2751 } 2752 else 2753 { 2754 rpcSlice->setPocResetIdc( 0 ); 2755 } 2752 2756 2753 2757 if( rpcSlice->getPocResetIdc() != 0 ) 2754 2758 { 2755 2759 READ_CODE( 6, uiCode, "poc_reset_period_id" ); rpcSlice->setPocResetPeriodId( uiCode ); 2760 } 2761 else 2762 { 2763 // TODO Copy poc_reset_period from earlier picture 2764 rpcSlice->setPocResetPeriodId( 0 ); 2756 2765 } 2757 2766 … … 2762 2771 } 2763 2772 2764 if( !rpcSlice->getPocMsbValRequiredFlag() && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() ) 2773 // Derive the value of PocMsbValRequiredFlag 2774 rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag() 2775 /* || TODO related to vps_poc_lsb_aligned_flag */ 2776 ); 2777 2778 if( !rpcSlice->getPocMsbValRequiredFlag() /* TODO && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) 2765 2779 { 2766 2780 READ_FLAG( uiCode, "poc_msb_val_present_flag" ); rpcSlice->setPocMsbValPresentFlag( uiCode == 1 ); 2767 2781 } 2782 else 2783 { 2784 if( rpcSlice->getPocMsbValRequiredFlag() ) 2785 { 2786 rpcSlice->setPocMsbValPresentFlag( true ); 2787 } 2788 else 2789 { 2790 rpcSlice->setPocMsbValPresentFlag( false ); 2791 } 2792 } 2793 2768 2794 2769 2795 if( rpcSlice->getPocMsbValPresentFlag() ) … … 2772 2798 } 2773 2799 2774 while( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) < rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ) ;2800 while( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) < rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ) 2775 2801 { 2776 2802 READ_FLAG( uiCode, "slice_segment_header_extension_data_bit" ); 2777 2803 } 2778 assert( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) == rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 );2804 assert( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) == rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2779 2805 #else 2780 2806 READ_UVLC( uiCode, "slice_header_extension_length" ); … … 2787 2813 #endif 2788 2814 #endif 2815 } 2789 2816 2790 2817 -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r866 r867 2247 2247 #endif 2248 2248 2249 #if !H_MV_HLS 7_GEN2249 #if !H_MV_HLS_7_POC_P0041 2250 2250 #if PPS_FIX_DEPTH 2251 2251 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() ) … … 2258 2258 #endif 2259 2259 2260 #if H_MV_HLS 7_GEN2260 #if H_MV_HLS_7_POC_P0041 2261 2261 #if !H_MV 2262 2262 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) … … 2267 2267 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2268 2268 { 2269 // Derive the value of PocMsbValRequiredFlag 2270 pcSlice->setPocMsbValRequiredFlag( pcSlice->getCraPicFlag() || pcSlice->getBlaPicFlag() 2271 /* || related to vps_poc_lsb_aligned_flag */ 2272 ); 2273 2274 // Determine value of SH extension length. 2275 Int shExtnLengthInBit = 0; 2276 if (pcSlice->getPPS()->getPocResetInfoPresentFlag()) 2277 { 2278 shExtnLengthInBit += 2; 2279 } 2280 if (pcSlice->getPocResetIdc() > 0) 2281 { 2282 shExtnLengthInBit += 6; 2283 } 2284 if (pcSlice->getPocResetIdc() == 3) 2285 { 2286 shExtnLengthInBit += (pcSlice->getSPS()->getBitsForPOC() + 1); 2287 } 2288 2289 2290 if( !pcSlice->getPocMsbValRequiredFlag() /* TODO && pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) 2291 { 2292 shExtnLengthInBit++; // For poc_msb_val_present_flag 2293 } 2294 else 2295 { 2296 if( pcSlice->getPocMsbValRequiredFlag() ) 2297 { 2298 pcSlice->setPocMsbValPresentFlag( true ); 2299 } 2300 else 2301 { 2302 pcSlice->setPocMsbValPresentFlag( false ); 2303 } 2304 } 2305 2306 if( pcSlice->getPocMsbValPresentFlag() ) 2307 { 2308 Int iMaxPOClsb = 1<< pcSlice->getSPS()->getBitsForPOC(); 2309 2310 UInt lengthVal = 1; 2311 UInt tempVal = pcSlice->getPocMsbVal() + 1; 2312 assert ( tempVal ); 2313 while( 1 != tempVal ) 2314 { 2315 tempVal >>= 1; 2316 lengthVal += 2; 2317 } 2318 shExtnLengthInBit += lengthVal; 2319 } 2320 Int shExtnAdditionalBits = 0; 2321 if(shExtnLengthInBit % 8 != 0) 2322 { 2323 shExtnAdditionalBits = 8 - (shExtnLengthInBit % 8); 2324 } 2325 pcSlice->setSliceSegmentHeaderExtensionLength((shExtnLengthInBit + shExtnAdditionalBits) / 8); 2326 2327 2269 2328 WRITE_UVLC( pcSlice->getSliceSegmentHeaderExtensionLength( ), "slice_segment_header_extension_length" ); 2270 2329 UInt posFollSliceSegHeaderExtLen = m_pcBitIf->getNumberOfWrittenBits(); … … 2273 2332 WRITE_CODE( pcSlice->getPocResetIdc( ), 2, "poc_reset_idc" ); 2274 2333 } 2334 else 2335 { 2336 assert( pcSlice->getPocResetIdc( ) == 0 ); 2337 } 2275 2338 2276 2339 if( pcSlice->getPocResetIdc() != 0 ) … … 2282 2345 { 2283 2346 WRITE_FLAG( pcSlice->getFullPocResetFlag( ) ? 1 : 0 , "full_poc_reset_flag" ); 2284 WRITE_CODE( pcSlice->getPocLsbVal( ), getPocLsbValLen ), "poc_lsb_val" );2347 WRITE_CODE( pcSlice->getPocLsbVal( ), pcSlice->getPocLsbValLen() , "poc_lsb_val" ); 2285 2348 } 2286 2349 2287 if( !pcSlice->getPocMsbValRequiredFlag() && pcSlice->getVPS()->getVpsPocLsbAlignedFlag())2350 if( !pcSlice->getPocMsbValRequiredFlag() /* TODO && pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) 2288 2351 { 2289 2352 WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" ); … … 2294 2357 WRITE_UVLC( pcSlice->getPocMsbVal( ), "poc_msb_val" ); 2295 2358 } 2296 2297 while( ( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) < pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ) ;2359 2360 while( ( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) < pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ) 2298 2361 { 2299 2362 WRITE_FLAG( 0, "slice_segment_header_extension_data_bit" ); 2300 2363 } 2301 2364 2302 assert( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) == pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2365 assert( ( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) == pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2366 } 2303 2367 #endif 2304 2305 2368 #endif 2306 2369 }
Note: See TracChangeset for help on using the changeset viewer.