Changeset 1325 in SHVCSoftware
- Timestamp:
- 22 Jul 2015, 00:35:39 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1324 r1325 1203 1203 ("FieldCoding", m_isField, false, "Signals if it's a field based coding") 1204 1204 ("TopFieldFirst, Tff", m_isTopFieldFirst, false, "In case of field based coding, signals whether if it's a top field first or not") 1205 ("EfficientFieldIRAPEnabled", m_bEfficientFieldIRAPEnabled, true, "Enable to code fields in a specific, potentially more efficient, order.") 1205 1206 1206 1207 // Profile and level -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1324 r1325 88 88 Bool m_isField; ///< enable field coding 89 89 Bool m_isTopFieldFirst; 90 Bool m_bEfficientFieldIRAPEnabled; ///< enable an efficient field IRAP structure. 90 91 #else 91 92 Char* m_pchInputFile; ///< source file name … … 103 104 Bool m_isField; ///< enable field coding 104 105 Bool m_isTopFieldFirst; 106 Bool m_bEfficientFieldIRAPEnabled; ///< enable an efficient field IRAP structure. 105 107 106 108 Int m_conformanceWindowMode; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1324 r1325 716 716 m_acTEncTop[layer].setLog2MaxMvLengthVertical ( m_log2MaxMvLengthVertical ); 717 717 m_acTEncTop[layer].setElRapSliceTypeB (layer == 0? 0 : m_elRapSliceBEnabled); 718 m_acTEncTop[layer].setEfficientFieldIRAPEnabled ( m_bEfficientFieldIRAPEnabled ); 718 719 719 720 if( layer > 0 ) … … 1087 1088 m_cTEncTop.setLog2MaxMvLengthHorizontal ( m_log2MaxMvLengthHorizontal ); 1088 1089 m_cTEncTop.setLog2MaxMvLengthVertical ( m_log2MaxMvLengthVertical ); 1090 m_cTEncTop.setEfficientFieldIRAPEnabled ( m_bEfficientFieldIRAPEnabled ); 1089 1091 } 1090 1092 #endif //SVC_EXTENSION -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1319 r1325 864 864 } 865 865 866 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag )866 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, const bool bEfficientFieldIRAPEnabled) 867 867 #else 868 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic )868 Void TComSlice::decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled) 869 869 #endif 870 870 { … … 915 915 pocCRA = pocCurr; 916 916 } 917 #if EFFICIENT_FIELD_IRAP 918 bRefreshPending = true; 919 #endif 917 if (bEfficientFieldIRAPEnabled) 918 { 919 bRefreshPending = true; 920 } 920 921 } 921 922 else // CRA or No DR 922 923 { 923 #if EFFICIENT_FIELD_IRAP 924 if(getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL) 924 if(bEfficientFieldIRAPEnabled && (getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL)) 925 925 { 926 926 if (bRefreshPending==true && pocCurr > m_iLastIDR) // IDR reference marking pending … … 941 941 else 942 942 { 943 #endif944 943 if (bRefreshPending==true && pocCurr > pocCRA) // CRA reference marking pending 945 944 { … … 956 955 bRefreshPending = false; 957 956 } 958 #if EFFICIENT_FIELD_IRAP 959 } 960 #endif 957 } 961 958 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // CRA picture found 962 959 { … … 1664 1661 */ 1665 1662 #if ALLOW_RECOVERY_POINT_AS_RAP 1666 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint )1663 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled) 1667 1664 #else 1668 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP )1665 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled) 1669 1666 #endif 1670 1667 { … … 1675 1672 Int nrOfPositivePictures = 0; 1676 1673 TComReferencePictureSet* pcRPS = this->getLocalRPS(); 1677 #if EFFICIENT_FIELD_IRAP 1678 Bool irapIsInRPS = false; 1679 #endif 1674 Bool irapIsInRPS = false; // Used when bEfficientFieldIRAPEnabled==true 1680 1675 #if SVC_POC 1681 1676 Bool pocsAdjusted = false; … … 1714 1709 #endif 1715 1710 pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP)); 1716 #if ALLOW_RECOVERY_POINT_AS_RAP 1711 if (bEfficientFieldIRAPEnabled) 1712 { 1717 1713 #if SVC_POC 1718 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + deltaPOC < pocRandomAccess) );1714 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + deltaPOC < pocRandomAccess) ); 1719 1715 #else 1720 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) ); 1721 #endif 1722 #endif 1716 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) ); 1717 #endif 1718 } 1719 1723 1720 if(pcRPS->getDeltaPOC(k) < 0) 1724 1721 { … … 1727 1724 else 1728 1725 { 1729 #if EFFICIENT_FIELD_IRAP 1730 if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1) 1726 if(bEfficientFieldIRAPEnabled && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1) 1731 1727 { 1732 1728 irapIsInRPS = true; 1733 1729 } 1734 #endif1735 1730 nrOfPositivePictures++; 1736 1731 } … … 1740 1735 } 1741 1736 1742 #if EFFICIENT_FIELD_IRAP1743 1737 Bool useNewRPS = false; 1744 1738 // if current picture is complimentary field associated to IRAP, add the IRAP to its RPS. 1745 if( m_pcPic->isField() && !irapIsInRPS)1739 if(bEfficientFieldIRAPEnabled && m_pcPic->isField() && !irapIsInRPS) 1746 1740 { 1747 1741 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); … … 1759 1753 } 1760 1754 } 1761 #endif1762 1755 pcRPS->setNumberOfNegativePictures(nrOfNegativePictures); 1763 1756 pcRPS->setNumberOfPositivePictures(nrOfPositivePictures); … … 1766 1759 // inter RPS prediction with. Here we just use the reference used by pReferencePictureSet. 1767 1760 // If pReferencePictureSet is not inter_RPS_predicted, then inter_RPS_prediction is for the current RPS also disabled. 1768 if (!pReferencePictureSet->getInterRPSPrediction() 1769 #if EFFICIENT_FIELD_IRAP 1770 || useNewRPS 1771 #endif 1761 if (!pReferencePictureSet->getInterRPSPrediction() || useNewRPS 1772 1762 #if SVC_POC 1773 1763 || pocsAdjusted // inter RPS prediction does not work if POCs have been adjusted -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1319 r1325 489 489 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } 490 490 491 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) 492 { 493 m_enabledFlag = true; 494 m_winLeftOffset = offsetLeft; 495 m_winRightOffset = offsetLRight; 496 m_winTopOffset = offsetLTop; 497 m_winBottomOffset = offsetLBottom; 498 } 499 491 500 #if SVC_EXTENSION 492 501 Bool hasEqualOffset(const Window& ref) const … … 499 508 #endif 500 509 501 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom)502 {503 m_enabledFlag = true;504 m_winLeftOffset = offsetLeft;505 m_winRightOffset = offsetLRight;506 m_winTopOffset = offsetLTop;507 m_winBottomOffset = offsetLBottom;508 }509 510 }; 511 512 510 513 511 514 #if SVC_EXTENSION … … 2219 2222 #if NO_CLRAS_OUTPUT_FLAG 2220 2223 Void decodingRefreshMarking( TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag, UInt smallestLayerId = 0 ); 2221 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, Bool noClrasOutputFlag);2224 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled, Bool noClrasOutputFlag); 2222 2225 #else 2223 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic );2226 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled); 2224 2227 #endif 2225 2228 Void setSliceType( SliceType e ) { m_eSliceType = e; } … … 2306 2309 #if ALLOW_RECOVERY_POINT_AS_RAP 2307 2310 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); 2308 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false);2311 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint, const Bool bEfficientFieldIRAPEnabled); 2309 2312 #else 2310 2313 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); 2311 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP );2314 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, const TComReferencePictureSet *pReferencePictureSet, Bool isRAP, const Bool bEfficientFieldIRAPEnabled); 2312 2315 #endif 2313 2316 Void setMaxNumMergeCand(UInt val ) { m_maxNumMergeCand = val; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1324 r1325 165 165 166 166 #define HARMONIZE_GOP_FIRST_FIELD_COUPLE 1 167 #define EFFICIENT_FIELD_IRAP 1168 167 #define ALLOW_RECOVERY_POINT_AS_RAP 1 169 168 #define BUGFIX_INTRAPERIOD 1 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1324 r1325 370 370 371 371 Bool m_useStrongIntraSmoothing; ///< enable the use of strong intra smoothing (bi_linear interpolation) for 32x32 blocks when reference samples are flat. 372 Bool m_bEfficientFieldIRAPEnabled; ///< enable to code fields in a specific, potentially more efficient, order. 373 372 374 #if SVC_EXTENSION 373 375 UInt m_layerId; … … 896 898 Bool getUseStrongIntraSmoothing () { return m_useStrongIntraSmoothing; } 897 899 900 Void setEfficientFieldIRAPEnabled( Bool b ) { m_bEfficientFieldIRAPEnabled = b; } 901 Bool getEfficientFieldIRAPEnabled( ) const { return m_bEfficientFieldIRAPEnabled; } 902 898 903 Void setActiveParameterSetsSEIEnabled ( Int b ) { m_activeParameterSetsSEIEnabled = b; } 899 904 Int getActiveParameterSetsSEIEnabled () { return m_activeParameterSetsSEIEnabled; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1321 r1325 997 997 pictureTimingSEI->m_auCpbRemovalDelay = std::min<Int>(std::max<Int>(1, m_totalCoded - m_lastBPSEI), static_cast<Int>(pow(2, static_cast<Double>(hrd->getCpbRemovalDelayLengthMinus1()+1)))); // Syntax element signalled as minus, hence the . 998 998 pictureTimingSEI->m_picDpbOutputDelay = slice->getSPS()->getNumReorderPics(slice->getSPS()->getMaxTLayers()-1) + slice->getPOC() - m_totalCoded; 999 #if EFFICIENT_FIELD_IRAP 1000 if(IRAPGOPid > 0 && IRAPGOPid < m_iGopSize) 999 if(m_pcCfg->getEfficientFieldIRAPEnabled() && IRAPGOPid > 0 && IRAPGOPid < m_iGopSize) 1001 1000 { 1002 1001 // if pictures have been swapped there is likely one more picture delay on their tid. Very rough approximation 1003 1002 pictureTimingSEI->m_picDpbOutputDelay ++; 1004 1003 } 1005 #endif1006 1004 Int factor = hrd->getTickDivisorMinus2() + 2; 1007 1005 pictureTimingSEI->m_picDpbOutputDuDelay = factor * pictureTimingSEI->m_picDpbOutputDelay; … … 1285 1283 } 1286 1284 1287 #if EFFICIENT_FIELD_IRAP1288 1285 class EfficientFieldIRAPMapping 1289 1286 { … … 1300 1297 { } 1301 1298 1299 #if SVC_EXTENSION 1302 1300 Void initialize(const Bool isField, const Int picIdInGOP, const Int gopSize, const Int POCLast, const Int numPicRcvd, const Int lastIDR, TEncGOP *pEncGop, TEncCfg *pCfg); 1301 #else 1302 Void initialize(const Bool isField, const Int gopSize, const Int POCLast, const Int numPicRcvd, const Int lastIDR, TEncGOP *pEncGop, TEncCfg *pCfg); 1303 #endif 1303 1304 1304 1305 Int adjustGOPid(const Int gopID); … … 1422 1423 } 1423 1424 1424 #endif1425 1425 1426 1426 static UInt calculateCollocatedFromL1Flag(TEncCfg *pCfg, const Int GOPid, const Int gopSize) … … 1504 1504 SEIDecodingUnitInfo decodingUnitInfoSEI; 1505 1505 1506 #if EFFICIENT_FIELD_IRAP1507 1506 EfficientFieldIRAPMapping effFieldIRAPMap; 1507 if (m_pcCfg->getEfficientFieldIRAPEnabled()) 1508 { 1508 1509 #if SVC_EXTENSION 1509 effFieldIRAPMap.initialize(isField, iPicIdInGOP, m_iGopSize, iPOCLast, iNumPicRcvd, m_iLastIDR, this, m_pcCfg);1510 #else 1511 effFieldIRAPMap.initialize(isField, m_iGopSize, iPOCLast, iNumPicRcvd, m_iLastIDR, this, m_pcCfg);1512 #endif 1513 #endif 1510 effFieldIRAPMap.initialize(isField, iPicIdInGOP, m_iGopSize, iPOCLast, iNumPicRcvd, m_iLastIDR, this, m_pcCfg); 1511 #else 1512 effFieldIRAPMap.initialize(isField, m_iGopSize, iPOCLast, iNumPicRcvd, m_iLastIDR, this, m_pcCfg); 1513 #endif 1514 } 1514 1515 1515 1516 // reset flag indicating whether pictures have been encoded … … 1524 1525 #endif 1525 1526 { 1526 #if EFFICIENT_FIELD_IRAP 1527 iGOPid=effFieldIRAPMap.adjustGOPid(iGOPid); 1528 #endif 1527 if (m_pcCfg->getEfficientFieldIRAPEnabled()) 1528 { 1529 iGOPid=effFieldIRAPMap.adjustGOPid(iGOPid); 1530 } 1529 1531 1530 1532 //-- For time output for each slice … … 1555 1557 if(pocCurr>=m_pcCfg->getFramesToBeEncoded()) 1556 1558 { 1557 #if EFFICIENT_FIELD_IRAP 1558 iGOPid=effFieldIRAPMap.restoreGOPid(iGOPid); 1559 #endif 1559 if (m_pcCfg->getEfficientFieldIRAPEnabled()) 1560 { 1561 iGOPid=effFieldIRAPMap.restoreGOPid(iGOPid); 1562 } 1560 1563 continue; 1561 1564 } … … 1898 1901 } 1899 1902 } 1900 1901 #if EFFICIENT_FIELD_IRAP 1902 if ( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP1903 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL1904 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP1905 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL1906 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP1907 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // IRAP picture1908 {1909 m_associatedIRAPType = pcSlice->getNalUnitType();1903 if (m_pcCfg->getEfficientFieldIRAPEnabled()) 1904 { 1905 if ( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1906 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1907 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 1908 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL 1909 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 1910 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // IRAP picture 1911 { 1912 m_associatedIRAPType = pcSlice->getNalUnitType(); 1910 1913 #if SVC_POC 1911 m_associatedIRAPPOC = pcSlice->getPOC();1912 m_associatedIrapPocBeforeReset = pocCurr;1913 #else 1914 m_associatedIRAPPOC = pocCurr;1915 #endif 1916 }1917 pcSlice->setAssociatedIRAPType(m_associatedIRAPType);1918 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC);1914 m_associatedIRAPPOC = pcSlice->getPOC(); 1915 m_associatedIrapPocBeforeReset = pocCurr; 1916 #else 1917 m_associatedIRAPPOC = pocCurr; 1918 #endif 1919 } 1920 pcSlice->setAssociatedIRAPType(m_associatedIRAPType); 1921 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 1919 1922 #if SVC_POC 1920 pcSlice->setAssociatedIrapPocBeforeReset(m_associatedIrapPocBeforeReset);1921 #endif 1922 #endif 1923 pcSlice->setAssociatedIrapPocBeforeReset(m_associatedIrapPocBeforeReset); 1924 #endif 1925 } 1923 1926 // Do decoding refresh marking if any 1924 1927 #if NO_CLRAS_OUTPUT_FLAG 1925 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic, m_pc EncTop->getNoClrasOutputFlag());1926 #else 1927 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic );1928 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic, m_pcCfg->getEfficientFieldIRAPEnabled(), m_pcEncTop->getNoClrasOutputFlag()); 1929 #else 1930 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic, m_pcCfg->getEfficientFieldIRAPEnabled()); 1928 1931 #endif 1929 1932 #if SVC_POC … … 1933 1936 m_pcEncTop->selectReferencePictureSet(pcSlice, pocCurr, iGOPid); 1934 1937 pcSlice->getRPS()->setNumberOfLongtermPictures(0); 1935 #if !EFFICIENT_FIELD_IRAP 1936 if ( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1937 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1938 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 1939 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL 1940 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 1941 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // IRAP picture 1942 { 1943 m_associatedIRAPType = pcSlice->getNalUnitType(); 1944 m_associatedIRAPPOC = pocCurr; 1945 } 1946 pcSlice->setAssociatedIRAPType(m_associatedIRAPType); 1947 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 1948 #endif 1938 if (!m_pcCfg->getEfficientFieldIRAPEnabled()) 1939 { 1940 if ( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1941 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1942 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 1943 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL 1944 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 1945 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // IRAP picture 1946 { 1947 m_associatedIRAPType = pcSlice->getNalUnitType(); 1948 m_associatedIRAPPOC = pocCurr; 1949 } 1950 pcSlice->setAssociatedIRAPType(m_associatedIRAPType); 1951 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 1952 } 1949 1953 1950 1954 #if ALLOW_RECOVERY_POINT_AS_RAP 1951 1955 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false, m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3) != 0) || (pcSlice->isIRAP()) 1952 #if EFFICIENT_FIELD_IRAP 1953 || (isField && pcSlice->getAssociatedIRAPType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getAssociatedIRAPType() <= NAL_UNIT_CODED_SLICE_CRA && pcSlice->getAssociatedIRAPPOC() == pcSlice->getPOC()+1) 1954 #endif 1956 || (m_pcCfg->getEfficientFieldIRAPEnabled() && isField && pcSlice->getAssociatedIRAPType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getAssociatedIRAPType() <= NAL_UNIT_CODED_SLICE_CRA && pcSlice->getAssociatedIRAPPOC() == pcSlice->getPOC()+1) 1955 1957 ) 1956 1958 { 1957 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP(), m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3 );1959 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP(), m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3, m_pcCfg->getEfficientFieldIRAPEnabled()); 1958 1960 } 1959 1961 #else 1960 1962 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false) != 0) || (pcSlice->isIRAP())) 1961 1963 { 1962 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP() );1964 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP(), m_pcCfg->getEfficientFieldIRAPEnabled()); 1963 1965 } 1964 1966 #endif … … 2838 2840 } 2839 2841 2840 #if EFFICIENT_FIELD_IRAP 2841 xCreatePictureTimingSEI(effFieldIRAPMap.GetIRAPGOPid(), leadingSeiMessages, nestedSeiMessages, duInfoSeiMessages, pcSlice, isField, duData); 2842 #else 2843 xCreatePictureTimingSEI(0, leadingSeiMessages, nestedSeiMessages, duInfoSeiMessages, pcSlice, isField, duData); 2844 #endif 2842 xCreatePictureTimingSEI(m_pcCfg->getEfficientFieldIRAPEnabled()?effFieldIRAPMap.GetIRAPGOPid():0, leadingSeiMessages, nestedSeiMessages, duInfoSeiMessages, pcSlice, isField, duData); 2845 2843 if (m_pcCfg->getScalableNestingSEIEnabled()) 2846 2844 { … … 2894 2892 fflush(stdout); 2895 2893 2896 #if EFFICIENT_FIELD_IRAP 2897 iGOPid=effFieldIRAPMap.restoreGOPid(iGOPid); 2898 #endif 2894 if (m_pcCfg->getEfficientFieldIRAPEnabled()) 2895 { 2896 iGOPid=effFieldIRAPMap.restoreGOPid(iGOPid); 2897 } 2899 2898 } // iGOPid-loop 2900 2899 … … 3477 3476 } 3478 3477 3479 #if EFFICIENT_FIELD_IRAP 3480 if(isField && pocCurr == 1) 3478 if(m_pcCfg->getEfficientFieldIRAPEnabled() && isField && pocCurr == 1) 3481 3479 { 3482 3480 // to avoid the picture becoming an IRAP 3483 3481 return NAL_UNIT_CODED_SLICE_TRAIL_R; 3484 3482 } 3485 #endif3486 3483 3487 3484 #if ALLOW_RECOVERY_POINT_AS_RAP -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1318 r1325 306 306 307 307 eSliceType=B_SLICE; 308 #if EFFICIENT_FIELD_IRAP 309 if(!(isField && pocLast == 1)) 310 { 311 #endif // EFFICIENT_FIELD_IRAP 308 if(!(isField && pocLast == 1) || !m_pcCfg->getEfficientFieldIRAPEnabled()) 309 { 312 310 #if ALLOW_RECOVERY_POINT_AS_RAP 313 311 if(m_pcCfg->getDecodingRefreshType() == 3) … … 322 320 } 323 321 #endif 324 #if EFFICIENT_FIELD_IRAP 325 } 326 #endif 322 } 327 323 328 324 rpcSlice->setSliceType ( eSliceType ); … … 456 452 // restore original slice type 457 453 458 #if EFFICIENT_FIELD_IRAP 459 if(!(isField && pocLast == 1)) 460 { 461 #endif // EFFICIENT_FIELD_IRAP 454 if(!(isField && pocLast == 1) || !m_pcCfg->getEfficientFieldIRAPEnabled()) 455 { 462 456 #if ALLOW_RECOVERY_POINT_AS_RAP 463 457 if(m_pcCfg->getDecodingRefreshType() == 3) … … 472 466 } 473 467 #endif 474 #if EFFICIENT_FIELD_IRAP 475 } 476 #endif // EFFICIENT_FIELD_IRAP 468 } 477 469 478 470 #if SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.