Changeset 578 in SHVCSoftware for branches/SHM-5.0-dev/source
- Timestamp:
- 29 Jan 2014, 02:28:07 (11 years ago)
- Location:
- branches/SHM-5.0-dev/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r577 r578 1447 1447 1448 1448 #if VPS_DPB_SIZE_TABLE 1449 vps->deriveNumberOfSubDpbs(); 1450 for(i = 1; i < vps->getNumOutputLayerSets(); i++) 1451 { 1452 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag[i]"); vps->setSubLayerFlagInfoPresentFlag( i, uiCode ? true : false ); 1453 for(j = 0; j < vps->getMaxTLayers(); j++) 1454 { 1455 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1456 { 1457 READ_FLAG( uiCode, "sub_layer_dpb_info_present_flag[i]"); vps->setSubLayerDpbInfoPresentFlag( i, j, uiCode ? true : false); 1458 } 1459 else 1460 { 1461 if( j == 0 ) // Always signal for the first sub-layer 1462 { 1463 vps->setSubLayerDpbInfoPresentFlag( i, j, true ); 1464 } 1465 else // if (j != 0) && !vps->getSubLayerFlagInfoPresentFlag(i) 1466 { 1467 vps->setSubLayerDpbInfoPresentFlag( i, j, false ); 1468 } 1469 } 1470 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) // If sub-layer DPB information is present 1471 { 1472 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1473 { 1474 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1[i][k][j]" ); vps->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1475 } 1476 READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" ); vps->setMaxVpsNumReorderPics( i, j, uiCode); 1477 READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" ); vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode); 1478 } 1479 } 1480 } 1481 #endif 1449 parseVpsDpbSizeTable(vps); 1450 #endif 1451 1482 1452 #if VPS_EXTN_DIRECT_REF_LAYERS 1483 1453 READ_UVLC( uiCode, "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2); … … 1611 1581 READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" ); repFormat->setBitDepthVpsChroma( uiCode + 8 ); 1612 1582 #endif 1583 } 1584 #endif 1585 #if VPS_DPB_SIZE_TABLE 1586 Void TDecCavlc::parseVpsDpbSizeTable( TComVPS *vps ) 1587 { 1588 UInt uiCode; 1589 vps->deriveNumberOfSubDpbs(); 1590 for(Int i = 1; i < vps->getNumOutputLayerSets(); i++) 1591 { 1592 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag[i]"); vps->setSubLayerFlagInfoPresentFlag( i, uiCode ? true : false ); 1593 for(Int j = 0; j < vps->getMaxTLayers(); j++) 1594 { 1595 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1596 { 1597 READ_FLAG( uiCode, "sub_layer_dpb_info_present_flag[i]"); vps->setSubLayerDpbInfoPresentFlag( i, j, uiCode ? true : false); 1598 } 1599 else 1600 { 1601 if( j == 0 ) // Always signal for the first sub-layer 1602 { 1603 vps->setSubLayerDpbInfoPresentFlag( i, j, true ); 1604 } 1605 else // if (j != 0) && !vps->getSubLayerFlagInfoPresentFlag(i) 1606 { 1607 vps->setSubLayerDpbInfoPresentFlag( i, j, false ); 1608 } 1609 } 1610 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) // If sub-layer DPB information is present 1611 { 1612 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1613 { 1614 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1[i][k][j]" ); vps->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1615 } 1616 READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" ); vps->setMaxVpsNumReorderPics( i, j, uiCode); 1617 READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" ); vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode); 1618 } 1619 } 1620 } 1613 1621 } 1614 1622 #endif -
branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r494 r578 83 83 Void parseRepFormat ( RepFormat *repFormat ); 84 84 #endif 85 #if VPS_DPB_SIZE_TABLE 86 Void parseVpsDpbSizeTable( TComVPS *vps ); 87 #endif 85 88 Void parseSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ); 86 89 Void parseSPSExtension ( TComSPS* pcSPS ); -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r577 r578 1075 1075 #endif 1076 1076 #if VPS_DPB_SIZE_TABLE 1077 for(i = 1; i < vps->getNumOutputLayerSets(); i++) 1078 { 1079 WRITE_FLAG( vps->getSubLayerFlagInfoPresentFlag( i ), "sub_layer_flag_info_present_flag[i]"); 1080 for(j = 0; j < vps->getMaxTLayers(); j++) 1081 { 1082 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1083 { 1084 WRITE_FLAG( vps->getSubLayerDpbInfoPresentFlag( i, j), "sub_layer_dpb_info_present_flag[i]"); 1085 } 1086 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) 1087 { 1088 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1089 { 1090 WRITE_UVLC( vps->getMaxVpsDecPicBufferingMinus1( i, k, j), "max_vps_dec_pic_buffering_minus1[i][k][j]" ); 1091 } 1092 WRITE_UVLC( vps->getMaxVpsNumReorderPics( i, j), "max_vps_num_reorder_pics[i][j]" ); 1093 WRITE_UVLC( vps->getMaxVpsLatencyIncreasePlus1( i, j), "max_vps_latency_increase_plus1[i][j]" ); 1094 } 1095 } 1096 } 1077 codeVpsDpbSizeTable(vps); 1097 1078 #endif 1098 1079 #if VPS_EXTN_DIRECT_REF_LAYERS … … 1230 1211 #endif 1231 1212 1213 } 1214 #endif 1215 #if VPS_DPB_SIZE_TABLE 1216 Void TEncCavlc::codeVpsDpbSizeTable(TComVPS *vps) 1217 { 1218 for(Int i = 1; i < vps->getNumOutputLayerSets(); i++) 1219 { 1220 WRITE_FLAG( vps->getSubLayerFlagInfoPresentFlag( i ), "sub_layer_flag_info_present_flag[i]"); 1221 for(Int j = 0; j < vps->getMaxTLayers(); j++) 1222 { 1223 if( j > 0 && vps->getSubLayerFlagInfoPresentFlag(i) ) 1224 { 1225 WRITE_FLAG( vps->getSubLayerDpbInfoPresentFlag( i, j), "sub_layer_dpb_info_present_flag[i]"); 1226 } 1227 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) 1228 { 1229 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1230 { 1231 WRITE_UVLC( vps->getMaxVpsDecPicBufferingMinus1( i, k, j), "max_vps_dec_pic_buffering_minus1[i][k][j]" ); 1232 } 1233 WRITE_UVLC( vps->getMaxVpsNumReorderPics( i, j), "max_vps_num_reorder_pics[i][j]" ); 1234 WRITE_UVLC( vps->getMaxVpsLatencyIncreasePlus1( i, j), "max_vps_latency_increase_plus1[i][j]" ); 1235 } 1236 } 1237 } 1232 1238 } 1233 1239 #endif -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.h
r556 r578 98 98 Void codeRepFormat ( RepFormat *repFormat ); 99 99 #endif 100 #if VPS_DPB_SIZE_TABLE 101 Void codeVpsDpbSizeTable (TComVPS *vps); 102 #endif 100 103 Void codeVUI ( TComVUI *pcVUI, TComSPS* pcSPS ); 101 104 Void codeSPS ( TComSPS* pcSPS );
Note: See TracChangeset for help on using the changeset viewer.