Changeset 528 in SHVCSoftware
- Timestamp:
- 24 Dec 2013, 18:24:19 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source/Lib
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r525 r528 2374 2374 #endif 2375 2375 #endif 2376 #if SCALINGLIST_INFERRING 2377 , m_inferScalingListFlag ( false ) 2378 , m_scalingListRefLayerId ( 0 ) 2379 #endif 2376 2380 #endif //SVC_EXTENSION 2377 2381 { … … 2397 2401 TComSPS::~TComSPS() 2398 2402 { 2403 #if SCALINGLIST_INFERRING 2404 if( !m_inferScalingListFlag ) 2405 #endif 2399 2406 delete m_scalingList; 2400 2407 m_RPSList.destroy(); … … 2574 2581 , m_listsModificationPresentFlag( 0) 2575 2582 , m_numExtraSliceHeaderBits(0) 2583 #if SCALINGLIST_INFERRING 2584 , m_inferScalingListFlag ( false ) 2585 , m_scalingListRefLayerId ( 0 ) 2586 #endif 2576 2587 { 2577 2588 m_scalingList = new TComScalingList; … … 2590 2601 m_puiRowHeight = NULL; 2591 2602 } 2603 2604 #if SCALINGLIST_INFERRING 2605 if( !m_inferScalingListFlag ) 2606 #endif 2592 2607 delete m_scalingList; 2593 2608 } -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r525 r528 1316 1316 UInt m_updateRepFormatIndex; 1317 1317 #endif 1318 #endif 1319 #if SCALINGLIST_INFERRING 1320 Bool m_inferScalingListFlag; 1321 UInt m_scalingListRefLayerId; 1318 1322 #endif 1319 1323 #endif //SVC_EXTENSION … … 1449 1453 #endif 1450 1454 1455 #if SCALINGLIST_INFERRING 1456 Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } 1457 #else 1451 1458 Void setScalingList ( TComScalingList *scalingList); 1459 #endif 1452 1460 TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS 1453 1461 … … 1508 1516 Void setUpdateRepFormatIndex(UInt index) { m_updateRepFormatIndex = index; } 1509 1517 #endif 1518 #endif 1519 #if SCALINGLIST_INFERRING 1520 Bool getInferScalingListFlag() { return m_inferScalingListFlag; } 1521 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } 1522 Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } 1523 Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } 1510 1524 #endif 1511 1525 #endif //SVC_EXTENSION … … 1609 1623 UInt m_log2ParallelMergeLevelMinus2; 1610 1624 Int m_numExtraSliceHeaderBits; 1625 1626 #if SCALINGLIST_INFERRING 1627 Bool m_inferScalingListFlag; 1628 UInt m_scalingListRefLayerId; 1629 #endif 1611 1630 1612 1631 public: … … 1720 1739 Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } 1721 1740 1741 #if SCALINGLIST_INFERRING 1742 UInt getLayerId() { return m_layerId; } 1743 Void setLayerId( UInt layerId ) { m_layerId = layerId; } 1744 Bool getInferScalingListFlag() { return m_inferScalingListFlag; } 1745 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } 1746 Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } 1747 Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } 1748 #endif 1722 1749 #if IL_SL_SIGNALLING_N0371 1723 1750 Void setLayerId(UInt layerId) { m_layerId = layerId; } … … 1733 1760 #endif 1734 1761 1762 #if SCALINGLIST_INFERRING 1763 Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } 1764 #else 1735 1765 Void setScalingList ( TComScalingList *scalingList); 1766 #endif 1736 1767 TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS 1737 1768 Bool getListsModificationPresentFlag () { return m_listsModificationPresentFlag; } -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r526 r528 64 64 65 65 #define IL_SL_SIGNALLING_N0371 0 ///< JCTVC-N0371: inter-layer scaling list 66 #define SCALINGLIST_INFERRING 1 ///< JCTVC-N0371: inter-layer scaling list 66 67 #define M0463_VUI_EXT_ILP_REF 0 ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling 67 68 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r525 r528 290 290 } 291 291 } 292 293 #if SCALINGLIST_INFERRING 294 if( pcPPS->getLayerId() > 0 ) 295 { 296 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); 297 pcPPS->setInferScalingListFlag( uiCode ); 298 } 299 300 if( pcPPS->getInferScalingListFlag() ) 301 { 302 READ_UVLC( uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setScalingListRefLayerId( uiCode ); 303 304 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 305 assert( pcPPS->getScalingListRefLayerId() <= 62 ); 306 307 pcPPS->setScalingListPresentFlag( false ); 308 } 309 else 310 { 311 #endif 312 292 313 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 293 314 … … 343 364 #endif 344 365 } 366 367 #if SCALINGLIST_INFERRING 368 } 369 #endif 345 370 346 371 READ_FLAG( uiCode, "lists_modification_present_flag"); … … 716 741 if(pcSPS->getScalingListFlag()) 717 742 { 743 #if SCALINGLIST_INFERRING 744 if( pcSPS->getLayerId() > 0 ) 745 { 746 READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setInferScalingListFlag( uiCode ); 747 } 748 749 if( pcSPS->getInferScalingListFlag() ) 750 { 751 READ_UVLC( uiCode, "sps_scaling_list_ref_layer_id" ); pcSPS->setScalingListRefLayerId( uiCode ); 752 753 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 754 assert( pcSPS->getScalingListRefLayerId() <= 62 ); 755 756 pcSPS->setScalingListPresentFlag( false ); 757 } 758 else 759 { 760 #endif 718 761 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode ); 719 762 if(pcSPS->getScalingListPresentFlag ()) … … 766 809 767 810 } 811 #if SCALINGLIST_INFERRING 812 } 813 #endif 768 814 } 769 815 READ_FLAG( uiCode, "amp_enabled_flag" ); pcSPS->setUseAMP( uiCode ); -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r526 r528 551 551 printf("\ninserting lost poc : %d\n",iLostPoc); 552 552 TComSlice cFillSlice; 553 #if SVC_EXTENSION554 cFillSlice.setSPS( m_parameterSetManagerDecoder[m_layerId].getFirstSPS() );555 cFillSlice.setPPS( m_parameterSetManagerDecoder[m_layerId].getFirstPPS() );556 cFillSlice.setVPS( m_parameterSetManagerDecoder[m_layerId].getFirstVPS() );557 cFillSlice.initSlice( m_layerId );558 #else559 553 cFillSlice.setSPS( m_parameterSetManagerDecoder.getFirstSPS() ); 560 554 cFillSlice.setPPS( m_parameterSetManagerDecoder.getFirstPPS() ); 555 #if SVC_EXTENSION 556 cFillSlice.setVPS( m_parameterSetManagerDecoder.getFirstVPS() ); 557 cFillSlice.initSlice( m_layerId ); 558 #else 561 559 cFillSlice.initSlice(); 562 560 #endif 563 561 TComPic *cFillPic; 564 562 xGetNewPicBuffer(&cFillSlice,cFillPic); 565 #if SVC_EXTENSION566 cFillPic->getSlice(0)->setSPS( m_parameterSetManagerDecoder[m_layerId].getFirstSPS() );567 cFillPic->getSlice(0)->setPPS( m_parameterSetManagerDecoder[m_layerId].getFirstPPS() );568 cFillPic->getSlice(0)->setVPS( m_parameterSetManagerDecoder[m_layerId].getFirstVPS() );569 cFillPic->getSlice(0)->initSlice( m_layerId );570 #else571 563 cFillPic->getSlice(0)->setSPS( m_parameterSetManagerDecoder.getFirstSPS() ); 572 564 cFillPic->getSlice(0)->setPPS( m_parameterSetManagerDecoder.getFirstPPS() ); 565 #if SVC_EXTENSION 566 cFillPic->getSlice(0)->setVPS( m_parameterSetManagerDecoder.getFirstVPS() ); 567 cFillPic->getSlice(0)->initSlice( m_layerId ); 568 #else 573 569 cFillPic->getSlice(0)->initSlice(); 574 570 #endif … … 613 609 Void TDecTop::xActivateParameterSets() 614 610 { 615 #if SVC_EXTENSION616 m_parameterSetManagerDecoder[m_layerId].applyPrefetchedPS();617 618 TComPPS *pps = m_parameterSetManagerDecoder[m_layerId].getPPS(m_apcSlicePilot->getPPSId());619 assert (pps != 0);620 621 TComSPS *sps = m_parameterSetManagerDecoder[m_layerId].getSPS(pps->getSPSId());622 assert (sps != 0);623 624 if( false == m_parameterSetManagerDecoder[m_layerId].activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->isIRAP()) )625 #else626 611 m_parameterSetManagerDecoder.applyPrefetchedPS(); 627 612 … … 633 618 634 619 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 635 #endif636 620 { 637 621 printf ("Parameter set activation failed!"); 638 622 assert (0); 639 623 } 624 625 #if SCALINGLIST_INFERRING 626 // scaling list settings and checks 627 TComVPS *activeVPS = m_parameterSetManagerDecoder.getActiveVPS(); 628 TComSPS *activeSPS = m_parameterSetManagerDecoder.getActiveSPS(); 629 TComPPS *activePPS = m_parameterSetManagerDecoder.getActivePPS(); 630 631 if( activeSPS->getInferScalingListFlag() ) 632 { 633 UInt refLayerId = activeSPS->getScalingListRefLayerId(); 634 TComSPS *refSps = m_ppcTDecTop[refLayerId]->getParameterSetManager()->getActiveSPS(); assert( refSps != NULL ); 635 636 // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0 637 if( activeVPS->getAvcBaseLayerFlag() ) 638 { 639 assert( refLayerId > 0 ); 640 } 641 642 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and 643 // sps_infer_scaling_list_flag in the SPS is equal to 1, sps_infer_scaling_list_flag shall be equal to 0 for the SPS that is active for the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id 644 assert( refSps->getInferScalingListFlag() == false ); 645 646 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB, 647 // the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB 648 assert( activeVPS->getRecursiveRefLayerFlag( activeSPS->getLayerId(), refLayerId ) == true ); 649 650 if( activeSPS->getScalingList() != refSps->getScalingList() ) 651 { 652 // delete created instance of scaling list since it will be inferred 653 delete activeSPS->getScalingList(); 654 655 // infer scaling list 656 activeSPS->setScalingList( refSps->getScalingList() ); 657 } 658 } 659 660 if( activePPS->getInferScalingListFlag() ) 661 { 662 UInt refLayerId = activePPS->getScalingListRefLayerId(); 663 TComPPS *refPps = m_ppcTDecTop[refLayerId]->getParameterSetManager()->getActivePPS(); assert( refPps != NULL ); 664 665 // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0 666 if( activeVPS->getAvcBaseLayerFlag() ) 667 { 668 assert( refLayerId > 0 ); 669 } 670 671 // It is a requirement of bitstream conformance that, when an PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and 672 // pps_infer_scaling_list_flag in the PPS is equal to 1, pps_infer_scaling_list_flag shall be equal to 0 for the PPS that is active for the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id 673 assert( refPps->getInferScalingListFlag() == false ); 674 675 // It is a requirement of bitstream conformance that, when an PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB, 676 // the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB 677 assert( activeVPS->getRecursiveRefLayerFlag( activePPS->getLayerId(), refLayerId ) == true ); 678 679 if( activePPS->getScalingList() != refPps->getScalingList() ) 680 { 681 // delete created instance of scaling list since it will be inferred 682 delete activePPS->getScalingList(); 683 684 // infer scaling list 685 activePPS->setScalingList( refPps->getScalingList() ); 686 } 687 688 } 689 #endif 640 690 641 691 if( pps->getDependentSliceSegmentsEnabledFlag() ) … … 709 759 TComPic*& pcPic = m_pcPic; 710 760 #if SVC_EXTENSION 711 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder [m_layerId].getPrefetchedVPS(0) );761 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getPrefetchedVPS(0) ); 712 762 #if OUTPUT_LAYER_SET_INDEX 713 763 // Following check should go wherever the VPS is activated … … 751 801 m_apcSlicePilot->setNumSamplePredRefLayers( getNumSamplePredRefLayers() ); 752 802 #endif 753 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder[m_layerId]); 754 #else 803 #endif 755 804 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 756 #endif757 805 758 806 // set POC for dependent slices in skipped pictures … … 950 998 { 951 999 #if AVC_BASE 952 if( m_layerId == 1 && m_parameterSetManagerDecoder [0].getPrefetchedVPS(0)->getAvcBaseLayerFlag() )1000 if( m_layerId == 1 && m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() ) 953 1001 { 954 1002 TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin()); … … 1187 1235 UInt refLayerIdc = i; 1188 1236 #if AVC_BASE 1189 if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder [0].getActiveVPS()->getAvcBaseLayerFlag() )1237 if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() ) 1190 1238 { 1191 1239 pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() ); … … 1278 1326 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i); 1279 1327 #if AVC_BASE 1280 if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder [0].getActiveVPS()->getAvcBaseLayerFlag() )1328 if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() ) 1281 1329 { 1282 1330 pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() ); … … 1431 1479 pcSlice->setScalingList ( pcSlice->getPPS()->getScalingList() ); 1432 1480 } 1481 #if SCALINGLIST_INFERRING 1482 if( m_layerId == 0 || ( m_layerId > 0 && !pcSlice->getPPS()->getInferScalingListFlag() && !pcSlice->getSPS()->getInferScalingListFlag() ) ) 1483 #endif 1433 1484 if(!pcSlice->getPPS()->getScalingListPresentFlag() && !pcSlice->getSPS()->getScalingListPresentFlag()) 1434 1485 { … … 1466 1517 1467 1518 m_cEntropyDecoder.decodeVPS( vps ); 1468 #if SVC_EXTENSION1469 m_parameterSetManagerDecoder[0].storePrefetchedVPS(vps);1470 #else1471 1519 m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 1472 #endif1473 1520 } 1474 1521 … … 1478 1525 #if SVC_EXTENSION 1479 1526 sps->setLayerId(m_layerId); 1480 m_cEntropyDecoder.decodeSPS( sps, &m_parameterSetManagerDecoder [0]);1481 m_parameterSetManagerDecoder [m_layerId].storePrefetchedSPS(sps);1527 m_cEntropyDecoder.decodeSPS( sps, &m_parameterSetManagerDecoder ); 1528 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 1482 1529 #if !REPN_FORMAT_IN_VPS // ILRP can only be initialized at activation 1483 1530 if(m_numLayer>0) … … 1496 1543 TComPPS* pps = new TComPPS(); 1497 1544 1498 #if IL_SL_SIGNALLING_N03711499 pps->setLayerId( m_layerId);1545 #if SCALINGLIST_INFERRING || IL_SL_SIGNALLING_N0371 1546 pps->setLayerId( m_layerId ); 1500 1547 #endif 1501 1548 1502 1549 m_cEntropyDecoder.decodePPS( pps ); 1503 #if SVC_EXTENSION1504 m_parameterSetManagerDecoder[m_layerId].storePrefetchedPPS( pps );1505 #else1506 1550 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 1507 #endif1508 1551 1509 1552 if( pps->getDependentSliceSegmentsEnabledFlag() ) … … 1533 1576 #endif 1534 1577 #if M0043_LAYERS_PRESENT_SEI 1535 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder [m_layerId].getActiveVPS(), m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );1536 #else 1537 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder [m_layerId].getActiveSPS() );1578 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1579 #else 1580 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1538 1581 #endif 1539 1582 } … … 1541 1584 { 1542 1585 #if M0043_LAYERS_PRESENT_SEI 1543 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder [m_layerId].getActiveVPS(), m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );1544 #else 1545 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder [m_layerId].getActiveSPS() );1586 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() ); 1587 #else 1588 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1546 1589 #endif 1547 1590 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); … … 1549 1592 { 1550 1593 SEIActiveParameterSets *seiAps = (SEIActiveParameterSets*)(*activeParamSets.begin()); 1551 m_parameterSetManagerDecoder [m_layerId].applyPrefetchedPS();1594 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1552 1595 assert(seiAps->activeSeqParamSetId.size()>0); 1553 if (! m_parameterSetManagerDecoder[m_layerId].activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))1596 if( !m_parameterSetManagerDecoder.activateSPSWithSEI( seiAps->activeSeqParamSetId[0] ) ) 1554 1597 { 1555 1598 printf ("Warning SPS activation with Active parameter set SEI failed"); … … 1606 1649 xDecodeVPS(); 1607 1650 #if AVC_BASE 1608 if( m_parameterSetManagerDecoder [0].getPrefetchedVPS(0)->getAvcBaseLayerFlag() )1651 if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() ) 1609 1652 { 1610 1653 if( !m_ppcTDecTop[0]->getBLReconFile()->good() ) … … 1632 1675 xDecodeSPS(); 1633 1676 #if AVC_BASE 1634 if( m_parameterSetManagerDecoder [0].getPrefetchedVPS(0)->getAvcBaseLayerFlag() )1677 if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() ) 1635 1678 { 1636 1679 TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin()); … … 1638 1681 { 1639 1682 // using EL SPS with spsId = 1 1640 TComSPS* sps = m_parameterSetManagerDecoder [nalu.m_layerId].getPrefetchedSPS(1);1683 TComSPS* sps = m_parameterSetManagerDecoder.getPrefetchedSPS(1); 1641 1684 Int numReorderPics[MAX_TLAYER]; 1642 1685 Window &conformanceWindow = sps->getConformanceWindow(); … … 1787 1830 TDecTop* TDecTop::getRefLayerDec( UInt refLayerIdc ) 1788 1831 { 1789 TComVPS* vps = m_parameterSetManagerDecoder [0].getActiveVPS();1832 TComVPS* vps = m_parameterSetManagerDecoder.getActiveVPS(); 1790 1833 if( vps->getNumDirectRefLayers( m_layerId ) <= 0 ) 1791 1834 { -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.h
r521 r528 72 72 73 73 TComList<TComPic*> m_cListPic; // Dynamic buffer 74 #if SVC_EXTENSION75 ParameterSetManagerDecoder m_parameterSetManagerDecoder[MAX_LAYERS]; // storage for parameter sets76 #else77 74 ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 78 #endif79 75 80 76 TComSlice* m_apcSlicePilot; … … 249 245 Void checkValueOfOutputLayerSetIdx(TComVPS *vps); 250 246 #endif 247 #if SCALINGLIST_INFERRING 248 ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; } 249 #endif 251 250 };// END CLASS DEFINITION TDecTop 252 251 -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r525 r528 220 220 } 221 221 } 222 223 #if SCALINGLIST_INFERRING 224 if( pcPPS->getLayerId() > 0 ) 225 { 226 WRITE_FLAG( pcPPS->getInferScalingListFlag() ? 1 : 0, "pps_infer_scaling_list_flag" ); 227 } 228 229 if( pcPPS->getInferScalingListFlag() ) 230 { 231 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 232 assert( pcPPS->getScalingListRefLayerId() <= 62 ); 233 234 WRITE_UVLC( pcPPS->getScalingListRefLayerId(), "pps_scaling_list_ref_layer_id" ); 235 } 236 else 237 { 238 #endif 239 222 240 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 223 241 … … 275 293 codeScalingList( m_pcSlice->getScalingList() ); 276 294 #endif 277 278 } 295 } 296 297 #if SCALINGLIST_INFERRING 298 } 299 #endif 300 279 301 WRITE_FLAG( pcPPS->getListsModificationPresentFlag(), "lists_modification_present_flag"); 280 302 WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); … … 553 575 if(pcSPS->getScalingListFlag()) 554 576 { 577 #if SCALINGLIST_INFERRING 578 if( pcSPS->getLayerId() > 0 ) 579 { 580 WRITE_FLAG( pcSPS->getInferScalingListFlag() ? 1 : 0, "sps_infer_scaling_list_flag" ); 581 } 582 583 if( pcSPS->getInferScalingListFlag() ) 584 { 585 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 586 assert( pcSPS->getScalingListRefLayerId() <= 62 ); 587 588 WRITE_UVLC( pcSPS->getScalingListRefLayerId(), "sps_scaling_list_ref_layer_id" ); 589 } 590 else 591 { 592 #endif 555 593 WRITE_FLAG( pcSPS->getScalingListPresentFlag() ? 1 : 0, "sps_scaling_list_data_present_flag" ); 556 594 if(pcSPS->getScalingListPresentFlag()) … … 606 644 607 645 } 646 #if SCALINGLIST_INFERRING 647 } 648 #endif 608 649 } 609 650 WRITE_FLAG( pcSPS->getUseAMP() ? 1 : 0, "amp_enabled_flag" ); -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r524 r528 683 683 else if(m_pcEncTop->getUseScalingListId() == SCALING_LIST_DEFAULT) 684 684 { 685 #if SCALINGLIST_INFERRING 686 // inferring of the scaling list can be moved to the config file 687 UInt refLayerId = 0; 688 if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) ) 689 { 690 m_pcEncTop->getSPS()->setInferScalingListFlag( true ); 691 m_pcEncTop->getSPS()->setScalingListRefLayerId( refLayerId ); 692 m_pcEncTop->getSPS()->setScalingListPresentFlag( false ); 693 m_pcEncTop->getPPS()->setInferScalingListFlag( false ); 694 m_pcEncTop->getPPS()->setScalingListPresentFlag( false ); 695 696 // infer the scaling list from the reference layer 697 pcSlice->setScalingList ( m_ppcTEncTop[refLayerId]->getScalingList() ); 698 } 699 else 700 { 701 #endif 685 702 #if IL_SL_SIGNALLING_N0371 686 703 pcSlice->getScalingList()->setLayerId( m_layerId ); … … 695 712 m_pcEncTop->getSPS()->setScalingListPresentFlag(false); 696 713 m_pcEncTop->getPPS()->setScalingListPresentFlag(false); 714 715 #if SCALINGLIST_INFERRING 716 } 717 #endif 718 697 719 m_pcEncTop->getTrQuant()->setScalingList(pcSlice->getScalingList()); 698 720 m_pcEncTop->getTrQuant()->setUseScalingList(true); … … 704 726 #endif 705 727 728 #if SCALINGLIST_INFERRING 729 // inferring of the scaling list can be moved to the config file 730 UInt refLayerId = 0; 731 if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) ) 732 { 733 m_pcEncTop->getSPS()->setInferScalingListFlag( true ); 734 m_pcEncTop->getSPS()->setScalingListRefLayerId( refLayerId ); 735 m_pcEncTop->getSPS()->setScalingListPresentFlag( false ); 736 m_pcEncTop->getPPS()->setInferScalingListFlag( false ); 737 m_pcEncTop->getPPS()->setScalingListPresentFlag( false ); 738 739 // infer the scaling list from the reference layer 740 pcSlice->setScalingList ( m_ppcTEncTop[refLayerId]->getScalingList() ); 741 } 742 else 743 { 744 #endif 745 706 746 if(pcSlice->getScalingList()->xParseScalingList(m_pcCfg->getScalingListFile())) 707 747 { … … 735 775 m_pcEncTop->getPPS()->setScalingListRefLayerId( 0 ); 736 776 } 777 #endif 778 779 #if SCALINGLIST_INFERRING 780 } 737 781 #endif 738 782 -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r507 r528 1074 1074 Void TEncTop::xInitPPS() 1075 1075 { 1076 #if IL_SL_SIGNALLING_N03711077 m_cPPS.setLayerId( m_layerId);1076 #if SCALINGLIST_INFERRING || IL_SL_SIGNALLING_N0371 1077 m_cPPS.setLayerId( m_layerId ); 1078 1078 #endif 1079 1079
Note: See TracChangeset for help on using the changeset viewer.