Changeset 1211 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder
- Timestamp:
- 8 Jul 2015, 23:11:18 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1209 r1211 1592 1592 if(pcSlice->isTemporalLayerSwitchingPoint(rcListPic) || pcSlice->getSPS()->getTemporalIdNestingFlag()) 1593 1593 { 1594 #if SVC_EXTENSION && !Q0108_TSA_STSA1595 if( pcSlice->getLayerId() > 0 )1596 {1597 Bool oneRefLayerTSA = false, oneRefLayerNotTSA = false;1598 for( Int i = 0; i < pcSlice->getLayerId(); i++)1599 {1600 TComList<TComPic *> *cListPic = m_ppcTEncTop[i]->getListPic();1601 TComPic *lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC());1602 if( lowerLayerPic && pcSlice->getVPS()->getDirectDependencyFlag(pcSlice->getLayerId(), i) )1603 {1604 if( ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ) ||1605 ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_R )1606 )1607 {1608 if(pcSlice->getTemporalLayerNonReferenceFlag() )1609 {1610 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_N);1611 }1612 else1613 {1614 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R );1615 }1616 oneRefLayerTSA = true;1617 }1618 else1619 {1620 oneRefLayerNotTSA = true;1621 }1622 }1623 }1624 assert( !( oneRefLayerNotTSA && oneRefLayerTSA ) ); // Only one variable should be true - failure of this assert means1625 // that two independent reference layers that are not dependent on1626 // each other, but are reference for current layer have inconsistency1627 if( oneRefLayerNotTSA /*&& !oneRefLayerTSA*/ ) // No reference layer is TSA - set current as TRAIL1628 {1629 if(pcSlice->getTemporalLayerNonReferenceFlag() )1630 {1631 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_N );1632 }1633 else1634 {1635 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_R );1636 }1637 }1638 else // This means there is no reference layer picture for current picture in this AU1639 {1640 if(pcSlice->getTemporalLayerNonReferenceFlag() )1641 {1642 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_N);1643 }1644 else1645 {1646 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R );1647 }1648 }1649 }1650 #else1651 1594 if(pcSlice->getTemporalLayerNonReferenceFlag()) 1652 1595 { … … 1657 1600 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R); 1658 1601 } 1659 #endif1660 1602 } 1661 1603 else if(pcSlice->isStepwiseTemporalLayerSwitchingPointCandidate(rcListPic)) … … 1691 1633 if(isSTSA==true) 1692 1634 { 1693 #if SVC_EXTENSION && !Q0108_TSA_STSA1694 if( pcSlice->getLayerId() > 0 )1695 {1696 Bool oneRefLayerSTSA = false, oneRefLayerNotSTSA = false;1697 for( Int i = 0; i < pcSlice->getLayerId(); i++)1698 {1699 TComList<TComPic *> *cListPic = m_ppcTEncTop[i]->getListPic();1700 TComPic *lowerLayerPic = pcSlice->getRefPic(*cListPic, pcSlice->getPOC());1701 if( lowerLayerPic && pcSlice->getVPS()->getDirectDependencyFlag(pcSlice->getLayerId(), i) )1702 {1703 if( ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ) ||1704 ( lowerLayerPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R )1705 )1706 {1707 if(pcSlice->getTemporalLayerNonReferenceFlag() )1708 {1709 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_N);1710 }1711 else1712 {1713 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_R );1714 }1715 oneRefLayerSTSA = true;1716 }1717 else1718 {1719 oneRefLayerNotSTSA = true;1720 }1721 }1722 }1723 assert( !( oneRefLayerNotSTSA && oneRefLayerSTSA ) ); // Only one variable should be true - failure of this assert means1724 // that two independent reference layers that are not dependent on1725 // each other, but are reference for current layer have inconsistency1726 if( oneRefLayerNotSTSA /*&& !oneRefLayerSTSA*/ ) // No reference layer is STSA - set current as TRAIL1727 {1728 if(pcSlice->getTemporalLayerNonReferenceFlag() )1729 {1730 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_N );1731 }1732 else1733 {1734 pcSlice->setNalUnitType( NAL_UNIT_CODED_SLICE_TRAIL_R );1735 }1736 }1737 else // This means there is no reference layer picture for current picture in this AU1738 {1739 if(pcSlice->getTemporalLayerNonReferenceFlag() )1740 {1741 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_N);1742 }1743 else1744 {1745 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_R );1746 }1747 }1748 }1749 #else1750 1635 if(pcSlice->getTemporalLayerNonReferenceFlag()) 1751 1636 { … … 1756 1641 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_STSA_R); 1757 1642 } 1758 #endif1759 1643 } 1760 1644 } … … 1809 1693 } 1810 1694 } 1811 #endif //SVC_EXTENSION 1812 1813 #if Q0108_TSA_STSA 1695 1814 1696 if( ( pcSlice->getTLayer() == 0 && pcSlice->getLayerId() > 0 ) // only for enhancement layer and with temporal layer 0 1815 1697 && !( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N … … 1880 1762 } 1881 1763 } 1882 #endif 1764 #endif //SVC_EXTENSION 1883 1765 1884 1766 #if ADAPTIVE_QP_SELECTION
Note: See TracChangeset for help on using the changeset viewer.