Changeset 194 in 3DVCSoftware for branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 26 Nov 2012, 18:35:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.0-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
r189 r194 1338 1338 } 1339 1339 } 1340 1340 #if MVHEVC 1341 Void TDecCavlc::parseVPS(TComVPS* pcVPS) 1342 { 1343 UInt uiCode; 1344 READ_CODE( 4, uiCode, "video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 1345 READ_FLAG( uiCode, "temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 1346 READ_CODE( 2, uiCode, "vps_reserved_zero_2bits" ); assert( !uiCode ); 1347 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 ); 1348 READ_CODE( 3, uiCode, "vps_max_sub_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); 1349 READ_CODE( 12, uiCode, "vps_extension_offset" ); assert( !uiCode ); 1350 for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++) 1351 { 1352 READ_UVLC( uiCode, "max_dec_pic_buffering[i]" ); pcVPS->setMaxDecPicBuffering( uiCode, i ); 1353 READ_UVLC( uiCode, "num_reorder_pics[i]" ); pcVPS->setNumReorderPics( uiCode, i ); 1354 READ_UVLC( uiCode, "max_latency_increase[i]" ); pcVPS->setMaxLatencyIncrease( uiCode, i ); 1355 } 1356 READ_UVLC( uiCode, "vps_num_hrd_parameters" ); pcVPS->setNumHRDParameters(uiCode); 1357 assert(pcVPS->getNumHRDParameters()==0); 1358 for ( UInt i = 0; i < pcVPS->getNumHRDParameters(); i ++) 1359 { 1360 // if( i > 0 ) 1361 //{ 1362 // READ_UVLC (0, "op_num_layer_id_values_minus1[ opIdx ]"); 1363 // for( i = 0; i <= op_num_layer_id_values_minus1[ opIdx ]; i++ ) 1364 // READ_UVLC(0, 6, "op_layer_id[ opIdx ][ i ]"); 1365 //} 1366 //hrd_parameters( i = = 0, vps_max_sub_layers_minus1 ); 1367 } 1368 1369 READ_CODE( 1, uiCode, "bit_equal_to_one" ); assert( uiCode ); 1370 //vps_extension_byte_alignment_reserved_one_bit 1371 xReadVPSAlignOne(); 1372 READ_CODE( 8, uiCode, "num_additional_layer_operation_points" ); pcVPS->setNumAddiLayerOperationPoints( uiCode ); 1373 READ_CODE( 8, uiCode, "num_additional_profile_level_sets" ); pcVPS->setNumAddiProLevelSets( uiCode); 1374 1375 1376 for(UInt i=0; i <= pcVPS->getMaxLayers()-1; i++) 1377 { 1378 READ_CODE( 4, uiCode, "num_types_zero_4bits[i]" ); assert( !uiCode ); 1379 READ_CODE( 4, uiCode, "type_zero_4bits[i]" ); assert( !uiCode ); 1380 READ_CODE( 8, uiCode, "view_id[i]" ); pcVPS->setViewId(uiCode, i); 1381 // WRITE_SVLC( pcVPS->getViewOrderIdx(i), "view_order_idx[i]" ); 1382 if(i) 1383 { 1384 READ_CODE( 6, uiCode, "num_direct_ref_layers[ i ]" ); pcVPS->setNumDirectRefLayer(uiCode, i); 1385 for (UInt j = 0; j< pcVPS->getNumDirectRefLayer(i); j++) 1386 { 1387 READ_CODE( 6, uiCode, "ref_layer_id[i][j]" ); pcVPS->setDirectRefLayerId (uiCode, i, j); 1388 } 1389 } 1390 } 1391 for( UInt i=1; i<=pcVPS->getNumAddiProLevelSets(); i++) 1392 { 1393 //profile_tier_level 1394 } 1395 for( UInt i=1; i<= pcVPS->getNumAddiLayerOperationPoints(); i++) 1396 { 1397 if(pcVPS->getMaxLayers() == 3) 1398 { 1399 pcVPS->setNumOpLayerIdMinus1((i < pcVPS->getNumAddiLayerOperationPoints() ? 1: 2), (i-1)); 1400 } 1401 else if( i==1 ) 1402 { 1403 assert(pcVPS->getNumAddiLayerOperationPoints()==1); 1404 pcVPS->setNumOpLayerIdMinus1(pcVPS->getMaxLayers()-1, (i-1)); 1405 } 1406 READ_UVLC( uiCode, "op_num_layer_id_values_minus1[ opIdx ]" ); pcVPS->setNumOpLayerIdMinus1(uiCode, i-1); 1407 for(UInt j = 0; j <= pcVPS->getNumOpLayerIdMinus1(i-1); j++ ) 1408 { 1409 READ_UVLC( uiCode, "op_layer_id[ opIdx ][ i ]" ); pcVPS->setNumOpLayerId(uiCode, i-1, j); 1410 } 1411 if (pcVPS->getNumAddiProLevelSets()) 1412 { 1413 //profile_level_idx[ i ] 1414 } 1415 } 1416 return; 1417 } 1418 #else 1341 1419 #if VIDYO_VPS_INTEGRATION 1342 1420 Void TDecCavlc::parseVPS(TComVPS* pcVPS) … … 1389 1467 1390 1468 #endif 1391 1469 #endif 1392 1470 #if HHI_MPI 1393 1471 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth) … … 1401 1479 1402 1480 UInt uiCode; 1481 #if !MVHEVC 1403 1482 Int iCode; 1404 1483 #endif 1405 1484 READ_CODE( 8, uiCode, "profile_idc" ); pcSPS->setProfileIdc( uiCode ); 1406 1485 READ_CODE( 8, uiCode, "reserved_zero_8bits" ); … … 1645 1724 #endif 1646 1725 READ_FLAG( uiCode, "sps_extension_flag"); 1726 #if !MVHEVC 1647 1727 if(uiCode) 1648 1728 { … … 1803 1883 } 1804 1884 } 1885 #endif 1805 1886 } 1806 1887 … … 1907 1988 } 1908 1989 #endif 1990 #if QC_REM_IDV 1991 #if !MVHEVC 1992 if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getSPS()->getViewId() == 0) 1993 #else 1994 if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getViewId() == 0) 1995 #endif 1996 #else 1909 1997 if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR) 1998 #endif 1910 1999 { 1911 2000 READ_UVLC( uiCode, "idr_pic_id" ); //ignored … … 1941 2030 } 1942 2031 rpcSlice->setPOC( iPOCmsb+iPOClsb ); 1943 2032 #if QC_REM_IDV 2033 #if !MVHEVC 2034 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getSPS()->getViewId() && rpcSlice->getPOC() == 0 ) 2035 #else 2036 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getViewId() && rpcSlice->getPOC() == 0 ) 2037 #endif 2038 #else 1944 2039 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 ) 2040 #endif 1945 2041 { 1946 2042 TComReferencePictureSet* rps = rpcSlice->getLocalRPS(); … … 2082 2178 { 2083 2179 #if H0412_REF_PIC_LIST_RESTRICTION 2180 #if MVHEVC 2181 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2182 #else 2084 2183 if( !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2184 #endif 2085 2185 { 2086 2186 refPicListModification->setRefPicListModificationFlagL0( 0 ); … … 2153 2253 { 2154 2254 #if H0412_REF_PIC_LIST_RESTRICTION 2255 #if MVHEVC 2256 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2257 #else 2155 2258 if( !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2259 #endif 2156 2260 { 2157 2261 refPicListModification->setRefPicListModificationFlagL1( 0 ); … … 2237 2341 2238 2342 #if H0412_REF_PIC_LIST_RESTRICTION 2239 if(rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2343 #if MVHEVC 2344 if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2345 #else 2346 if(rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2347 #endif 2240 2348 { 2241 2349 #endif … … 2944 3052 } 2945 3053 3054 #if MVHEVC 3055 /** Parse VPS alignment one bits. 3056 * \returns Void 3057 */ 3058 Void TDecCavlc::xReadVPSAlignOne( ) 3059 { 3060 UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned(); 3061 3062 if(uiNumberOfBits) 3063 { 3064 UInt uiBits; 3065 UInt uiSymbol; 3066 3067 for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++) 3068 { 3069 xReadFlag( uiSymbol ); 3070 3071 if(!uiSymbol) 3072 { 3073 printf("\nWarning! vps_extension_byte_alignment_reserved_one_bit include a non-zero value.\n"); 3074 } 3075 } 3076 } 3077 } 3078 #endif 2946 3079 /** Parse PCM alignment zero bits. 2947 3080 * \returns Void
Note: See TracChangeset for help on using the changeset viewer.