Changeset 872 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncGOP.cpp
- Timestamp:
- 27 Mar 2014, 10:11:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r773 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 105 105 #endif 106 106 #endif 107 #if FIX1172 108 m_associatedIRAPType = NAL_UNIT_CODED_SLICE_IDR_N_LP; 109 m_associatedIRAPPOC = 0; 110 #endif 107 111 return; 108 112 } … … 292 296 } 293 297 298 #if H_MV_HLS_7_SEI_P0204_26 299 SEISubBitstreamProperty *TEncGOP::xCreateSEISubBitstreamProperty( TComSPS *sps) 300 { 301 SEISubBitstreamProperty *seiSubBitstreamProperty = new SEISubBitstreamProperty(); 302 303 seiSubBitstreamProperty->m_activeVpsId = sps->getVPSId(); 304 /* These values can be determined by the encoder; for now we will use the input parameter */ 305 TEncTop *encTop = this->m_pcEncTop; 306 seiSubBitstreamProperty->m_numAdditionalSubStreams = encTop->getNumAdditionalSubStreams(); 307 seiSubBitstreamProperty->m_subBitstreamMode = encTop->getSubBitstreamMode(); 308 seiSubBitstreamProperty->m_outputLayerSetIdxToVps = encTop->getOutputLayerSetIdxToVps(); 309 seiSubBitstreamProperty->m_highestSublayerId = encTop->getHighestSublayerId(); 310 seiSubBitstreamProperty->m_avgBitRate = encTop->getAvgBitRate(); 311 seiSubBitstreamProperty->m_maxBitRate = encTop->getMaxBitRate(); 312 313 return seiSubBitstreamProperty; 314 } 315 #endif 316 294 317 Void TEncGOP::xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps) 295 318 { … … 342 365 delete sei; 343 366 } 367 #if H_MV_HLS_7_SEI_P0204_26 368 if( m_pcCfg->getSubBitstreamPropSEIEnabled() ) 369 { 370 SEISubBitstreamProperty *sei = xCreateSEISubBitstreamProperty ( sps ); 371 372 nalu = NALUnit(NAL_UNIT_PREFIX_SEI); 373 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 374 m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps); 375 writeRBSPTrailingBits(nalu.m_Bitstream); 376 accessUnit.push_back(new NALUnitEBSP(nalu)); 377 delete sei; 378 } 379 #endif 344 380 } 345 381 … … 472 508 } 473 509 474 if( getNalUnitType(pocCurr, m_iLastIDR ) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_N_LP )510 if( getNalUnitType(pocCurr, m_iLastIDR, isField) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR, isField) == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 475 511 { 476 512 m_iLastIDR = pocCurr; … … 551 587 #if H_MV 552 588 // Set the nal unit type 553 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR ));589 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR, isField)); 554 590 if( pcSlice->getSliceType() == B_SLICE ) 555 591 { … … 559 595 } 560 596 } 597 598 // To be checked! 599 if( pcSlice->getSliceType() == B_SLICE ) 600 { 601 if( m_pcCfg->getGOPEntry( ( pcSlice->getRapPicFlag() && getLayerId() > 0 ) ? MAX_GOP : iGOPid ).m_sliceType == 'I' ) 602 { 603 pcSlice->setSliceType( I_SLICE ); 604 } 605 } 561 606 #else 562 607 if(pcSlice->getSliceType()==B_SLICE&&m_pcCfg->getGOPEntry(iGOPid).m_sliceType=='P') … … 564 609 pcSlice->setSliceType(P_SLICE); 565 610 } 611 if(pcSlice->getSliceType()==B_SLICE&&m_pcCfg->getGOPEntry(iGOPid).m_sliceType=='I') 612 { 613 pcSlice->setSliceType(I_SLICE); 614 } 615 566 616 // Set the nal unit type 567 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR ));617 pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR, isField)); 568 618 #endif 569 619 if(pcSlice->getTemporalLayerNonReferenceFlag()) … … 589 639 m_pcEncTop->selectReferencePictureSet(pcSlice, pocCurr, iGOPid); 590 640 pcSlice->getRPS()->setNumberOfLongtermPictures(0); 591 592 #if FIX1071 641 #if FIX1172 642 if ( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 643 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 644 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 645 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL 646 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 647 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // IRAP picture 648 { 649 m_associatedIRAPType = pcSlice->getNalUnitType(); 650 m_associatedIRAPPOC = pocCurr; 651 } 652 pcSlice->setAssociatedIRAPType(m_associatedIRAPType); 653 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 654 #endif 655 593 656 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false) != 0) || (pcSlice->isIRAP())) 594 657 { 595 658 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP()); 596 659 } 597 #else598 if(pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false) != 0)599 {600 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS());601 }602 #endif603 660 pcSlice->applyReferencePictureSet(rcListPic, pcSlice->getRPS()); 604 661 605 if(pcSlice->getTLayer() > 0) 662 if(pcSlice->getTLayer() > 0 663 && !( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N // Check if not a leading picture 664 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_R 665 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N 666 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R ) 667 ) 606 668 { 607 669 if(pcSlice->isTemporalLayerSwitchingPoint(rcListPic) || pcSlice->getSPS()->getTemporalIdNestingFlag()) … … 613 675 else 614 676 { 615 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_T LA_R);677 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TSA_R); 616 678 } 617 679 } … … 907 969 pcPic->getSlice(pcSlice->getSliceIdx())->setMvdL1ZeroFlag(pcSlice->getMvdL1ZeroFlag()); 908 970 909 #if RATE_CONTROL_LAMBDA_DOMAIN910 971 Double lambda = 0.0; 911 972 Int actualHeadBits = 0; … … 944 1005 else if ( frameLevel == 0 ) // intra case, but use the model 945 1006 { 946 #if RATE_CONTROL_INTRA947 1007 m_pcSliceEncoder->calCostSliceI(pcPic); 948 #endif949 1008 if ( m_pcCfg->getIntraPeriod() != 1 ) // do not refine allocated bits for all intra case 950 1009 { 951 1010 Int bits = m_pcRateCtrl->getRCSeq()->getLeftAverageBits(); 952 #if RATE_CONTROL_INTRA953 1011 bits = m_pcRateCtrl->getRCPic()->getRefineBitsForIntra( bits ); 954 #else955 bits = m_pcRateCtrl->getRCSeq()->getRefineBitsForIntra( bits );956 #endif957 1012 if ( bits < 200 ) 958 1013 { … … 963 1018 964 1019 list<TEncRCPic*> listPreviousPicture = m_pcRateCtrl->getPicList(); 965 #if RATE_CONTROL_INTRA966 1020 m_pcRateCtrl->getRCPic()->getLCUInitTargetBits(); 967 1021 lambda = m_pcRateCtrl->getRCPic()->estimatePicLambda( listPreviousPicture, pcSlice->getSliceType()); 968 #else969 lambda = m_pcRateCtrl->getRCPic()->estimatePicLambda( listPreviousPicture );970 #endif971 1022 sliceQP = m_pcRateCtrl->getRCPic()->estimatePicQP( lambda, listPreviousPicture ); 972 1023 } … … 984 1035 #endif 985 1036 list<TEncRCPic*> listPreviousPicture = m_pcRateCtrl->getPicList(); 986 #if RATE_CONTROL_INTRA987 1037 lambda = m_pcRateCtrl->getRCPic()->estimatePicLambda( listPreviousPicture, pcSlice->getSliceType()); 988 #else989 lambda = m_pcRateCtrl->getRCPic()->estimatePicLambda( listPreviousPicture );990 #endif991 1038 sliceQP = m_pcRateCtrl->getRCPic()->estimatePicQP( lambda, listPreviousPicture ); 992 1039 #if KWU_RC_MADPRED_E0227 … … 1000 1047 m_pcSliceEncoder->resetQP( pcPic, sliceQP, lambda ); 1001 1048 } 1002 #endif1003 1049 1004 1050 UInt uiNumSlices = 1; … … 1203 1249 1204 1250 // SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas 1205 if( m_pcCfg->getSaoLcuBasedOptimization() && m_pcCfg->getSaoLcuBoundary() ) 1206 { 1207 m_pcSAO->resetStats(); 1208 m_pcSAO->calcSaoStatsCu_BeforeDblk( pcPic ); 1251 if( pcSlice->getSPS()->getUseSAO() && m_pcCfg->getSaoLcuBoundary() ) 1252 { 1253 m_pcSAO->getPreDBFStatistics(pcPic); 1209 1254 } 1210 1255 … … 1218 1263 m_pcLoopFilter->loopFilterPic( pcPic ); 1219 1264 1220 pcSlice = pcPic->getSlice(0);1221 if(pcSlice->getSPS()->getUseSAO())1222 {1223 std::vector<Bool> LFCrossSliceBoundaryFlag;1224 for(Int s=0; s< uiNumSlices; s++)1225 {1226 LFCrossSliceBoundaryFlag.push_back( ((uiNumSlices==1)?true:pcPic->getSlice(s)->getLFCrossSliceBoundaryFlag()) );1227 }1228 m_storedStartCUAddrForEncodingSlice.resize(uiNumSlices+1);1229 pcPic->createNonDBFilterInfo(m_storedStartCUAddrForEncodingSlice, 0, &LFCrossSliceBoundaryFlag ,pcPic->getPicSym()->getNumTiles() ,bLFCrossTileBoundary);1230 }1231 1232 1233 pcSlice = pcPic->getSlice(0);1234 1235 if(pcSlice->getSPS()->getUseSAO())1236 {1237 m_pcSAO->createPicSaoInfo(pcPic);1238 }1239 1240 1265 /////////////////////////////////////////////////////////////////////////////////////////////////// File writing 1241 1266 // Set entropy coder … … 1254 1279 writeRBSPTrailingBits(nalu.m_Bitstream); 1255 1280 accessUnit.push_back(new NALUnitEBSP(nalu)); 1256 #if RATE_CONTROL_LAMBDA_DOMAIN1257 1281 actualTotalBits += UInt(accessUnit.back()->m_nalUnitData.str().size()) * 8; 1258 #endif1259 1282 1260 1283 #if H_MV … … 1296 1319 writeRBSPTrailingBits(nalu.m_Bitstream); 1297 1320 accessUnit.push_back(new NALUnitEBSP(nalu)); 1298 #if RATE_CONTROL_LAMBDA_DOMAIN1299 1321 actualTotalBits += UInt(accessUnit.back()->m_nalUnitData.str().size()) * 8; 1300 #endif1301 1322 1302 1323 #if H_MV … … 1313 1334 writeRBSPTrailingBits(nalu.m_Bitstream); 1314 1335 accessUnit.push_back(new NALUnitEBSP(nalu)); 1315 #if RATE_CONTROL_LAMBDA_DOMAIN1316 1336 actualTotalBits += UInt(accessUnit.back()->m_nalUnitData.str().size()) * 8; 1317 #endif 1337 1318 1338 #if PPS_FIX_DEPTH 1319 1339 } … … 1343 1363 { 1344 1364 SOPcurrPOC += deltaPOC; 1345 SOPDescriptionSEI.m_sopDescVclNaluType[i] = getNalUnitType(SOPcurrPOC, m_iLastIDR );1365 SOPDescriptionSEI.m_sopDescVclNaluType[i] = getNalUnitType(SOPcurrPOC, m_iLastIDR, isField); 1346 1366 SOPDescriptionSEI.m_sopDescTemporalId[i] = m_pcCfg->getGOPEntry(j).m_temporalId; 1347 1367 SOPDescriptionSEI.m_sopDescStRpsIdx[i] = m_pcEncTop->getReferencePictureSetIdxForSOP(pcSlice, SOPcurrPOC, j); … … 1621 1641 } 1622 1642 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 1623 #if RATE_CONTROL_LAMBDA_DOMAIN1624 1643 tmpBitsBeforeWriting = m_pcEntropyCoder->getNumberOfWrittenBits(); 1625 #endif1626 1644 m_pcEntropyCoder->encodeSliceHeader(pcSlice); 1627 #if RATE_CONTROL_LAMBDA_DOMAIN1628 1645 actualHeadBits += ( m_pcEntropyCoder->getNumberOfWrittenBits() - tmpBitsBeforeWriting ); 1629 #endif1630 1646 1631 1647 // is it needed? … … 1748 1764 xAttachSliceDataToNalUnit(nalu, pcBitstreamRedirect); 1749 1765 accessUnit.push_back(new NALUnitEBSP(nalu)); 1750 #if RATE_CONTROL_LAMBDA_DOMAIN1751 1766 actualTotalBits += UInt(accessUnit.back()->m_nalUnitData.str().size()) * 8; 1752 #endif1753 1767 bNALUAlignedWrittenToList = true; 1754 1768 uiOneBitstreamPerSliceLength += nalu.m_Bitstream.getNumberOfWrittenBits(); // length of bitstream after byte-alignment … … 1794 1808 m_pcEntropyCoder->resetEntropy(); 1795 1809 m_pcEntropyCoder->setBitstream( m_pcBitCounter ); 1796 m_pcSAO->startSaoEnc(pcPic, m_pcEntropyCoder, m_pcEncTop->getRDSbacCoder(), m_pcEncTop->getRDGoOnSbacCoder()); 1797 SAOParam& cSaoParam = *pcSlice->getPic()->getPicSym()->getSaoParam(); 1798 1799 #if SAO_CHROMA_LAMBDA 1800 #if SAO_ENCODING_CHOICE 1801 m_pcSAO->SAOProcess(&cSaoParam, pcPic->getSlice(0)->getLambdaLuma(), pcPic->getSlice(0)->getLambdaChroma(), pcPic->getSlice(0)->getDepth()); 1802 #else 1803 m_pcSAO->SAOProcess(&cSaoParam, pcPic->getSlice(0)->getLambdaLuma(), pcPic->getSlice(0)->getLambdaChroma()); 1804 #endif 1805 #else 1806 m_pcSAO->SAOProcess(&cSaoParam, pcPic->getSlice(0)->getLambda()); 1807 #endif 1808 m_pcSAO->endSaoEnc(); 1810 Bool sliceEnabled[NUM_SAO_COMPONENTS]; 1811 m_pcSAO->initRDOCabacCoder(m_pcEncTop->getRDGoOnSbacCoder(), pcSlice); 1812 m_pcSAO->SAOProcess(pcPic 1813 , sliceEnabled 1814 , pcPic->getSlice(0)->getLambdas() 1815 #if SAO_ENCODE_ALLOW_USE_PREDEBLOCK 1816 , m_pcCfg->getSaoLcuBoundary() 1817 #endif 1818 ); 1809 1819 m_pcSAO->PCMLFDisableProcess(pcPic); 1810 } 1811 #if SAO_RDO 1812 m_pcEntropyCoder->setEntropyCoder ( m_pcCavlcCoder, pcSlice ); 1813 #endif 1814 processingState = ENCODE_SLICE; 1815 1820 1821 //assign SAO slice header 1816 1822 for(Int s=0; s< uiNumSlices; s++) 1817 1823 { 1818 if (pcSlice->getSPS()->getUseSAO())1819 {1820 pcPic->getSlice(s)->setSaoEnabledFlag((pcSlice->getPic()->getPicSym()->getSaoParam()->bSaoFlag[0]==1)?true:false);1824 pcPic->getSlice(s)->setSaoEnabledFlag(sliceEnabled[SAO_Y]); 1825 assert(sliceEnabled[SAO_Cb] == sliceEnabled[SAO_Cr]); 1826 pcPic->getSlice(s)->setSaoEnabledFlagChroma(sliceEnabled[SAO_Cb]); 1821 1827 } 1822 1828 } 1829 processingState = ENCODE_SLICE; 1823 1830 } 1824 1831 break; … … 1831 1838 } 1832 1839 } // end iteration over slices 1833 1834 if(pcSlice->getSPS()->getUseSAO())1835 {1836 if(pcSlice->getSPS()->getUseSAO())1837 {1838 m_pcSAO->destroyPicSaoInfo();1839 }1840 pcPic->destroyNonDBFilterInfo();1841 }1842 1840 #if H_3D 1843 1841 pcPic->compressMotion(2); … … 1919 1917 1920 1918 //In case of field coding, compute the interlaced PSNR for both fields 1921 if (isField && ((!pcPic->isTopField() && isTff) || (pcPic->isTopField() && !isTff)) )1919 if (isField && ((!pcPic->isTopField() && isTff) || (pcPic->isTopField() && !isTff)) && (pcPic->getPOC()%m_iGopSize != 1)) 1922 1920 { 1923 1921 //get complementary top field … … 1931 1929 xCalculateInterlacedAddPSNR(pcPicTop, pcPic, pcPicTop->getPicYuvRec(), pcPic->getPicYuvRec(), accessUnit, dEncTime ); 1932 1930 } 1931 else if (isField && pcPic->getPOC()!= 0 && (pcPic->getPOC()%m_iGopSize == 0)) 1932 { 1933 //get complementary bottom field 1934 TComPic* pcPicBottom; 1935 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 1936 while ((*iterPic)->getPOC() != pcPic->getPOC()+1) 1937 { 1938 iterPic ++; 1939 } 1940 pcPicBottom = *(iterPic); 1941 xCalculateInterlacedAddPSNR(pcPic, pcPicBottom, pcPic->getPicYuvRec(), pcPicBottom->getPicYuvRec(), accessUnit, dEncTime ); 1942 } 1933 1943 1934 1944 if (digestStr) … … 1947 1957 } 1948 1958 } 1949 #if RATE_CONTROL_LAMBDA_DOMAIN1950 1959 if ( m_pcCfg->getUseRateCtrl() ) 1951 1960 { 1952 #if !M0036_RC_IMPROVEMENT1953 Double effectivePercentage = m_pcRateCtrl->getRCPic()->getEffectivePercentage();1954 #endif1955 1961 Double avgQP = m_pcRateCtrl->getRCPic()->calAverageQP(); 1956 1962 Double avgLambda = m_pcRateCtrl->getRCPic()->calAverageLambda(); … … 1959 1965 avgLambda = lambda; 1960 1966 } 1961 #if M0036_RC_IMPROVEMENT1962 #if RATE_CONTROL_INTRA1963 1967 m_pcRateCtrl->getRCPic()->updateAfterPicture( actualHeadBits, actualTotalBits, avgQP, avgLambda, pcSlice->getSliceType()); 1964 #else1965 m_pcRateCtrl->getRCPic()->updateAfterPicture( actualHeadBits, actualTotalBits, avgQP, avgLambda );1966 #endif1967 #else1968 m_pcRateCtrl->getRCPic()->updateAfterPicture( actualHeadBits, actualTotalBits, avgQP, avgLambda, effectivePercentage );1969 #endif1970 1968 m_pcRateCtrl->getRCPic()->addToPictureLsit( m_pcRateCtrl->getPicList() ); 1971 1969 … … 1980 1978 } 1981 1979 } 1982 #else1983 if(m_pcCfg->getUseRateCtrl())1984 {1985 UInt frameBits = m_vRVM_RP[m_vRVM_RP.size()-1];1986 m_pcRateCtrl->updataRCFrameStatus((Int)frameBits, pcSlice->getSliceType());1987 }1988 #endif1989 1980 1990 1981 if( ( m_pcCfg->getPictureTimingSEIEnabled() || m_pcCfg->getDecodingUnitInfoSEIEnabled() ) && … … 2173 2164 delete[] pcSubstreamsOut; 2174 2165 } 2175 #if !KWU_FIX_URQ && !RATE_CONTROL_LAMBDA_DOMAIN2176 if(m_pcCfg->getUseRateCtrl())2177 {2178 m_pcRateCtrl->updateRCGOPStatus();2179 }2180 #endif2181 2166 delete pcBitstreamRedirect; 2182 2167 … … 2262 2247 m_pcEntropyCoder->resetEntropy (); 2263 2248 m_pcEntropyCoder->setBitstream ( m_pcBitCounter ); 2264 pcSlice = pcPic->getSlice(0);2265 if(pcSlice->getSPS()->getUseSAO())2266 {2267 std::vector<Bool> LFCrossSliceBoundaryFlag(1, true);2268 std::vector<Int> sliceStartAddress;2269 sliceStartAddress.push_back(0);2270 sliceStartAddress.push_back(pcPic->getNumCUsInFrame()* pcPic->getNumPartInCU());2271 pcPic->createNonDBFilterInfo(sliceStartAddress, 0, &LFCrossSliceBoundaryFlag);2272 }2273 2274 if( pcSlice->getSPS()->getUseSAO())2275 {2276 pcPic->destroyNonDBFilterInfo();2277 }2278 2279 2249 m_pcEntropyCoder->resetEntropy (); 2280 2250 ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits(); … … 2454 2424 case NAL_UNIT_CODED_SLICE_TRAIL_R: return "TRAIL_R"; 2455 2425 case NAL_UNIT_CODED_SLICE_TRAIL_N: return "TRAIL_N"; 2456 case NAL_UNIT_CODED_SLICE_T LA_R: return "TLA_R";2426 case NAL_UNIT_CODED_SLICE_TSA_R: return "TSA_R"; 2457 2427 case NAL_UNIT_CODED_SLICE_TSA_N: return "TSA_N"; 2458 2428 case NAL_UNIT_CODED_SLICE_STSA_R: return "STSA_R"; … … 2702 2672 for (Int x = 0; x < width; x++) 2703 2673 { 2704 dst[x] = isTff ? (UChar) top[x] : (UChar)bottom[x];2705 dst[stride+x] = isTff ? (UChar) bottom[x] : (UChar)top[x];2674 dst[x] = isTff ? top[x] : bottom[x]; 2675 dst[stride+x] = isTff ? bottom[x] : top[x]; 2706 2676 } 2707 2677 top += stride; … … 2862 2832 * This function checks the configuration and returns the appropriate nal_unit_type for the picture. 2863 2833 */ 2864 NalUnitType TEncGOP::getNalUnitType(Int pocCurr, Int lastIDR )2834 NalUnitType TEncGOP::getNalUnitType(Int pocCurr, Int lastIDR, Bool isField) 2865 2835 { 2866 2836 if (pocCurr == 0) … … 2868 2838 return NAL_UNIT_CODED_SLICE_IDR_W_RADL; 2869 2839 } 2870 if ( pocCurr% m_pcCfg->getIntraPeriod() == 0)2840 if ((pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0) 2871 2841 { 2872 2842 if (m_pcCfg->getDecodingRefreshType() == 1)
Note: See TracChangeset for help on using the changeset viewer.