Changeset 1386 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComSlice.cpp
- Timestamp:
- 13 Nov 2015, 16:29:39 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComSlice.cpp
r1321 r1386 118 118 , m_viewId (0) 119 119 , m_viewIndex (0) 120 #if NH_3D 120 #if NH_3D_VSO 121 121 , m_isDepth (false) 122 122 #endif … … 452 452 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr ) 453 453 { 454 if (!checkNumPocTotalCurr)455 {456 454 if (m_eSliceType == I_SLICE) 457 455 { … … 459 457 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 460 458 459 if (!checkNumPocTotalCurr) 460 { 461 461 return; 462 462 } 463 464 m_aiNumRefIdx[REF_PIC_LIST_0] = getNumRefIdx(REF_PIC_LIST_0);465 m_aiNumRefIdx[REF_PIC_LIST_1] = getNumRefIdx(REF_PIC_LIST_1);466 463 } 467 464 … … 536 533 if (m_eSliceType == I_SLICE) 537 534 { 538 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList));539 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx ));540 541 535 return; 542 536 } … … 545 539 // general tier and level limit: 546 540 assert(numPicTotalCurr <= 8); 547 548 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);549 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);550 541 } 551 542 … … 1932 1923 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) 1933 1924 { 1925 #if !NH_3D_FIX_TICKET_107 1934 1926 m_layerSetIdxForOlsMinus1[i] = -1; 1927 #endif 1935 1928 for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++) 1936 1929 { … … 2191 2184 } 2192 2185 2193 #if NH_3D 2194 Int TComVPS::getLayerIdInNuh( Int viewIndex, Bool depthFlag ) const2186 #if NH_3D_VSO 2187 Int TComVPS::getLayerIdInNuh( Int viewIndex, Bool depthFlag, Int auxId ) const 2195 2188 { 2196 2189 Int foundLayerIdinNuh = -1; … … 2199 2192 { 2200 2193 Int layerIdInNuh = getLayerIdInNuh( layerIdInVps ); 2194 #if !NH_3D 2195 if( ( getViewIndex( layerIdInNuh ) == viewIndex ) && ( getAuxId( layerIdInNuh ) == ( depthFlag ? 2 : 0 ) ) ) 2196 #else 2201 2197 if( ( getViewIndex( layerIdInNuh ) == viewIndex ) && ( getDepthId( layerIdInNuh ) == ( depthFlag ? 1 : 0 ) ) ) 2198 #endif 2202 2199 { 2203 2200 foundLayerIdinNuh = layerIdInNuh; … … 2207 2204 return foundLayerIdinNuh; 2208 2205 } 2209 2206 #endif 2207 #if NH_3D 2210 2208 Void TComVPS::createCamPars(Int iNumViews) 2211 2209 { … … 2767 2765 m_uiSpsMaxLatencyIncreasePlus1[i] = 0; 2768 2766 #else 2769 m_uiMaxLatencyIncrease [i] = 0;2767 m_uiMaxLatencyIncreasePlus1[i] = 0; 2770 2768 #endif 2771 2769 m_uiMaxDecPicBuffering[i] = 1; … … 3676 3674 } 3677 3675 tempRefPicInListsFlag = (getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0) && getDefaultRefViewIdxAvailableFlag(); 3678 m_nARPStepNum = tempRefPicInListsFlag ? H_3D_ARP_WFNR: 0;3676 m_nARPStepNum = tempRefPicInListsFlag ? 3 : 0; 3679 3677 } 3680 3678 … … 3866 3864 } 3867 3865 #endif 3868 #if NH_3D 3866 #if NH_3D_QTL 3869 3867 Void TComSlice::setIvPicLists( TComPicLists* m_ivPicLists ) 3870 3868 { … … 3873 3871 for ( Int depthId = 0; depthId < 2; depthId++ ) 3874 3872 { 3875 m_ivPicsCurrPoc[ depthId ][ i ] = ( i <= m_viewIndex ) ? m_ivPicLists->getPic( i, ( depthId == 1) , getPOC() ) : NULL;3873 m_ivPicsCurrPoc[ depthId ][ i ] = ( i <= m_viewIndex ) ? m_ivPicLists->getPic( i, ( depthId == 1) , 0, getPOC() ) : NULL; 3876 3874 } 3877 3875 } 3878 3876 } 3877 #endif 3878 #if NH_3D 3879 3879 Void TComSlice::setDepthToDisparityLUTs() 3880 3880 { … … 3937 3937 { 3938 3938 Int iInVoi = vps->getVoiInVps( i ); 3939 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC3939 #if ENC_DEC_TRACE && NH_MV_ENC_DEC_TRAC 3940 3940 if ( g_traceCameraParameters ) 3941 3941 { … … 4320 4320 const TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension(); 4321 4321 4322 m_ivMvPredFlag = sps3dExt->getIv MvPredFlag( depthFlag ) && nRLLG0 ;4323 m_ivMvScalingFlag = sps3dExt->getIvMvScal ingFlag( depthFlag ) ;4324 m_ivResPredFlag = sps3dExt->getIvResPred Flag( depthFlag ) && nRLLG0 ;4325 m_depthRefinementFlag = sps3dExt->getDepthRef inementFlag( depthFlag ) && getInCompPredFlag() && m_cpAvailableFlag;4326 m_viewSynthesisPredFlag = sps3dExt->getV iewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag;4327 m_depthBasedBlkPartFlag = sps3dExt->getD epthBasedBlkPartFlag( depthFlag ) && getInCompPredFlag();4328 m_mpiFlag = sps3dExt->get MpiFlag( depthFlag ) && getInCompPredFlag();4329 m_intraContourFlag = sps3dExt->getIntraContour Flag( depthFlag ) && getInCompPredFlag();4330 m_intraSdcWedgeFlag = sps3dExt->getIntra SdcWedgeFlag( depthFlag ) ;4331 m_qtPredFlag = sps3dExt->get QtPredFlag( depthFlag ) && getInCompPredFlag();4332 m_interSdcFlag = sps3dExt->getInter SdcFlag( depthFlag ) ;4333 m_depthIntraSkipFlag = sps3dExt->get DepthIntraSkipFlag( depthFlag ) ;4334 4335 m_subPbSize = 1 << ( sps3dExt->getLog2 SubPbSizeMinus3( depthFlag ) + 3 );4336 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2 MpiSubPbSizeMinus3( depthFlag ) + 3 );4337 4338 4339 #if H_3D_OUTPUT_ACTIVE_TOOLS4322 m_ivMvPredFlag = sps3dExt->getIvDiMcEnabledFlag ( depthFlag ) && nRLLG0 ; 4323 m_ivMvScalingFlag = sps3dExt->getIvMvScalEnabledFlag ( depthFlag ) ; 4324 m_ivResPredFlag = sps3dExt->getIvResPredEnabledFlag ( depthFlag ) && nRLLG0 ; 4325 m_depthRefinementFlag = sps3dExt->getDepthRefEnabledFlag ( depthFlag ) && getInCompPredFlag() && m_cpAvailableFlag; 4326 m_viewSynthesisPredFlag = sps3dExt->getVspMcEnabledFlag ( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag; 4327 m_depthBasedBlkPartFlag = sps3dExt->getDbbpEnabledFlag ( depthFlag ) && getInCompPredFlag(); 4328 m_mpiFlag = sps3dExt->getTexMcEnabledFlag ( depthFlag ) && getInCompPredFlag(); 4329 m_intraContourFlag = sps3dExt->getIntraContourEnabledFlag ( depthFlag ) && getInCompPredFlag(); 4330 m_intraSdcWedgeFlag = sps3dExt->getIntraDcOnlyWedgeEnabledFlag( depthFlag ) ; 4331 m_qtPredFlag = sps3dExt->getCqtCuPartPredEnabledFlag ( depthFlag ) && getInCompPredFlag(); 4332 m_interSdcFlag = sps3dExt->getInterDcOnlyEnabledFlag ( depthFlag ) ; 4333 m_depthIntraSkipFlag = sps3dExt->getSkipIntraEnabledFlag ( depthFlag ) ; 4334 4335 m_subPbSize = 1 << ( sps3dExt->getLog2IvmcSubPbSizeMinus3 ( depthFlag ) + 3 ); 4336 m_mpiSubPbSize = 1 << ( sps3dExt->getLog2TexmcSubPbSizeMinus3( depthFlag ) + 3 ); 4337 4338 4339 #if NH_3D_OUTPUT_ACTIVE_TOOLS 4340 4340 std::cout << "Layer: :" << getLayerId() << std::endl; 4341 4341 std::cout << "DepthFlag: :" << getIsDepth() << std::endl; … … 4415 4415 if( !getIsDepth() ) 4416 4416 { 4417 m_inCmpPredAvailFlag = sps3dExt->getV iewSynthesisPredFlag( getIsDepth() ) ||4418 sps3dExt->getD epthBasedBlkPartFlag( getIsDepth() ) ||4419 sps3dExt->getDepthRef inementFlag ( getIsDepth() );4417 m_inCmpPredAvailFlag = sps3dExt->getVspMcEnabledFlag( getIsDepth() ) || 4418 sps3dExt->getDbbpEnabledFlag( getIsDepth() ) || 4419 sps3dExt->getDepthRefEnabledFlag ( getIsDepth() ); 4420 4420 } 4421 4421 else 4422 4422 { 4423 m_inCmpPredAvailFlag = sps3dExt->getIntraContour Flag( getIsDepth() ) ||4424 sps3dExt->get QtPredFlag( getIsDepth() ) ||4425 sps3dExt->get MpiFlag( getIsDepth() );4423 m_inCmpPredAvailFlag = sps3dExt->getIntraContourEnabledFlag( getIsDepth() ) || 4424 sps3dExt->getCqtCuPartPredEnabledFlag( getIsDepth() ) || 4425 sps3dExt->getTexMcEnabledFlag( getIsDepth() ); 4426 4426 } 4427 4427 } … … 4545 4545 } 4546 4546 4547 Bool TComScalingList::xParseScalingList( Char* pchFile)4547 Bool TComScalingList::xParseScalingList(const std::string &fileName) 4548 4548 { 4549 4549 static const Int LINE_SIZE=1024; 4550 4550 FILE *fp = NULL; 4551 Char line[LINE_SIZE];4552 4553 if ( pchFile == NULL)4551 TChar line[LINE_SIZE]; 4552 4553 if (fileName.empty()) 4554 4554 { 4555 4555 fprintf(stderr, "Error: no scaling list file specified. Help on scaling lists being output\n"); … … 4560 4560 return true; 4561 4561 } 4562 else if ((fp = fopen( pchFile,"r")) == (FILE*)NULL)4563 { 4564 fprintf(stderr, "Error: cannot open scaling list file %s for reading\n", pchFile);4562 else if ((fp = fopen(fileName.c_str(),"r")) == (FILE*)NULL) 4563 { 4564 fprintf(stderr, "Error: cannot open scaling list file %s for reading\n", fileName.c_str()); 4565 4565 return true; 4566 4566 } … … 4590 4590 while ((!feof(fp)) && (!bFound)) 4591 4591 { 4592 Char *ret = fgets(line, LINE_SIZE, fp);4593 Char *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType[sizeIdc][listIdc]);4592 TChar *ret = fgets(line, LINE_SIZE, fp); 4593 TChar *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType[sizeIdc][listIdc]); 4594 4594 // This could be a match against the DC string as well, so verify it isn't 4595 4595 if (findNamePosition!= NULL && (MatrixType_DC[sizeIdc][listIdc]==NULL || strstr(line, MatrixType_DC[sizeIdc][listIdc])==NULL)) … … 4600 4600 if (!bFound) 4601 4601 { 4602 fprintf(stderr, "Error: cannot find Matrix %s from scaling list file %s\n", MatrixType[sizeIdc][listIdc], pchFile);4602 fprintf(stderr, "Error: cannot find Matrix %s from scaling list file %s\n", MatrixType[sizeIdc][listIdc], fileName.c_str()); 4603 4603 return true; 4604 4604 } … … 4609 4609 if (fscanf(fp, "%d,", &data)!=1) 4610 4610 { 4611 fprintf(stderr, "Error: cannot read value #%d for Matrix %s from scaling list file %s at file position %ld\n", i, MatrixType[sizeIdc][listIdc], pchFile, ftell(fp));4611 fprintf(stderr, "Error: cannot read value #%d for Matrix %s from scaling list file %s at file position %ld\n", i, MatrixType[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 4612 4612 return true; 4613 4613 } 4614 4614 if (data<0 || data>255) 4615 4615 { 4616 fprintf(stderr, "Error: QMatrix entry #%d of value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", i, data, MatrixType[sizeIdc][listIdc], pchFile, ftell(fp));4616 fprintf(stderr, "Error: QMatrix entry #%d of value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", i, data, MatrixType[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 4617 4617 return true; 4618 4618 } … … 4630 4630 while ((!feof(fp)) && (!bFound)) 4631 4631 { 4632 Char *ret = fgets(line, LINE_SIZE, fp);4633 Char *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType_DC[sizeIdc][listIdc]);4632 TChar *ret = fgets(line, LINE_SIZE, fp); 4633 TChar *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType_DC[sizeIdc][listIdc]); 4634 4634 if (findNamePosition!= NULL) 4635 4635 { … … 4640 4640 if (!bFound) 4641 4641 { 4642 fprintf(stderr, "Error: cannot find DC Matrix %s from scaling list file %s\n", MatrixType_DC[sizeIdc][listIdc], pchFile);4642 fprintf(stderr, "Error: cannot find DC Matrix %s from scaling list file %s\n", MatrixType_DC[sizeIdc][listIdc], fileName.c_str()); 4643 4643 return true; 4644 4644 } … … 4647 4647 if (fscanf(fp, "%d,", &data)!=1) 4648 4648 { 4649 fprintf(stderr, "Error: cannot read DC %s from scaling list file %s at file position %ld\n", MatrixType_DC[sizeIdc][listIdc], pchFile, ftell(fp));4649 fprintf(stderr, "Error: cannot read DC %s from scaling list file %s at file position %ld\n", MatrixType_DC[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 4650 4650 return true; 4651 4651 } 4652 4652 if (data<0 || data>255) 4653 4653 { 4654 fprintf(stderr, "Error: DC value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", data, MatrixType[sizeIdc][listIdc], pchFile, ftell(fp));4654 fprintf(stderr, "Error: DC value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", data, MatrixType[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 4655 4655 return true; 4656 4656 }
Note: See TracChangeset for help on using the changeset viewer.